/setup-linear
Synced from
factory-kit/commands/setup-linear.mdat v0.1.2. The source of truth is the factory-kit repo.
You’re configuring this project to use the Linear command set (/standup, /entry, /submit, /close). The other commands read .claude/linear.json from the project root — this command creates it.
What to do
Section titled “What to do”-
Check if config already exists. Read
.claude/linear.json. If it’s present, show the current contents and ask whether the user wants to overwrite, edit, or abort. -
Discover Linear context. Use Linear MCP tools to help the user pick:
mcp__linear__list_teams— list teams the user has access to. Showkey — name (id)lines.- Ask which team to use (AskUserQuestion). Capture both
key(e.g.,NON) andid(UUID). mcp__linear__list_projectsfiltered to the chosen team — optional. Ask if the user wants to scope/standupto a specific active project; “no” is fine and means team-wide.- If a project is chosen, capture
idandname.
-
Confirm state names. Defaults are
"In Review"and"Done". Runmcp__linear__list_issue_statusesfor the chosen team and verify both names exist. If not, ask the user for the actual names used by their team. -
Write
.claude/linear.jsonwith this shape:{"teamKey": "NON","teamId": "<uuid>","projectId": "<uuid-or-omit>","projectName": "<name-or-omit>","states": {"inReview": "In Review","done": "Done"},"branchPattern": "<owner>/<teamKey-lower>-<number>-<topic>"}projectId/projectNameare optional — omit the keys entirely if the user didn’t pick a project.branchPatternis documentation-only —/submitand/closeparse the branch with a regex (-(\d+)-) and don’t depend on this string. Include it so future readers know the convention.
-
Show the file path and confirm — print “Wrote .claude/linear.json. You can now use /standup, /entry
, /submit, /close.” Don’t commit it (the user decides whether to check it in).
Direct, minimal back-and-forth. If the user has only one team, skip the question — just use it. If they don’t pick a project, that’s fine — many repos don’t have one.