Are you the author? Sign in to claim
Keep AI-driven work tracked in Linear: a Claude Code / Codex skill + hook that find or create a ticket and move it throu
A small Claude Code / Codex plugin that keeps AI-driven work tracked in Linear. It's two pieces — a skill and a hook — plus the official Linear MCP, wired together so that the moment an agent starts deliberate work, a ticket exists and moves through your workflow on its own.
We built this for ourselves at Prime Radiant and use it every day. We're publishing it as an example of how we work, so you can see the pattern and adapt it to your team.
When you ask an agent to build, fix, refactor, or otherwise produce something, the plugin makes sure that work is tracked:
linear-ticket-lifecycle skill resolves a
ticket from what you said, the branch name, a Linear search, or — if nothing
fits — by creating one. You always end up with a ticket.UserPromptSubmit hook reminds the
agent to invoke the skill, escalating when there are uncommitted changes.The agent never closes tickets. Only humans move work to a terminal state.
| Piece | File | Role |
|---|---|---|
| Skill | skills/linear-ticket-lifecycle/SKILL.md | The workflow the agent follows |
| Hook | hooks/hooks.json + scripts/ticket-phase-reminder.sh | Nudges the agent each turn |
| MCP | .mcp.json | The official Linear remote MCP (https://mcp.linear.app/mcp) |
/plugin marketplace add prime-radiant-inc/agent-plugin-linear-use
/plugin install linear-use@prime-radiant
Then connect Linear: run /mcp and complete the OAuth flow for the bundled
linear server. That's the only setup — the skill speaks the official Linear
MCP's tool vocabulary, so once you're authorized it just works.
The skill ships configured for an example team. Three knobs to change:
ENG (e.g. ENG-123, branch match eng-(\d+)).
Replace ENG throughout SKILL.md with your Linear team key.In Progress (which ships with every Linear
workspace) and In Review (common, but not a default — add it if your
workspace doesn't have one). Rename them in SKILL.md to match your team;
we use In Dev internally.LINEAR_USE_REPO_MATCH to a substring of your repos' origin
URLs (e.g. export LINEAR_USE_REPO_MATCH=my-org); the hook then fires only
when origin contains that substring. Leave it unset to fire everywhere.hookSpecificOutput.additionalContext, the documented way for a
UserPromptSubmit hook to add context Claude will read.@primeradianthq/streamlinear,
an API-key-driven Linear MCP server, for environments where the hosted OAuth
server isn't a fit. This plugin bundles the official one because it's the
easiest to set up and matches the skill's tool names. If you swap in another
Linear MCP, make sure its tools match (get_issue, list_issues,
save_issue, save_comment, list_issue_statuses, list_projects).test/ticket-phase-reminder.test.sh
Exercises the hook's branches: outside a git repo (silent), clean tree (gentle
reminder), dirty tree (escalated reminder), and the LINEAR_USE_REPO_MATCH
filter.
MIT — see LICENSE.
Blocks dangerous git and shell commands from being executed by AI coding agents
One command to install 6 essential safety hooks in 10 seconds — zero dependencies
Give Claude Code memory that evolves with your codebase via hooks and LLM-compiled knowledge
Rule enforcement plugin — save rules with natural language, enforce with 17 lifecycle hooks