/factory-kit:factory-close <issue-id> (optional — auto-detected from branch if omitted)from factory-kit
Closes a Linear issue by moving it to Done, drafting a closing comment, and cleaning up the local branch/worktree. Useful for post-merge ticket cleanup.
Ships in factory-kit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You're finishing a ticket. This command:
DoneIt does not merge a PR or push code — that's expected to have happened already.
Invocation input: an optional issue identifier. If omitted, auto-detect it from the current branch name.
Read project configuration. Prefer .factory-kit/linear.json; use legacy .claude/linear.json only as a migration fallback. If neither exists, stop and direct the user to setup-linear. Pull teamKey and states.done (default "Done").
Resolve the issue ID the same way /submit does:
<teamKey>- if numeric).git rev-parse --abbrev-ref HEAD) for <teamKey>-<num> (case-insensitive).Pre-flight checks. Run these in parallel, surface what they show, and gate on user confirmation before mutating anything:
git status — any uncommitted changes? If yes, warn and ask before proceeding.git log <main-or-default>..HEAD --oneline — commits since divergence. Use this for the closing comment.git diff --stat <main-or-default>...HEAD — top-level files touched.gh pr list --head <branch>). If a PR exists and isn't merged, warn — close is normally a post-merge action.Draft the closing comment (≤ 150 words) in the factory-voice.md shape — bold labels, short sentences, omit empty sections. The closing comment is the densest node in the decision graph for this issue; link liberally.
**Outcome:** <one or two lines on what shipped — not a diff dump>
**Why:** <the underlying constraint or principle the work satisfied>
**Tradeoff:** <non-obvious tradeoffs worth recording — omit if the diff is self-explanatory>
**Open:** <deferred work or follow-ups; file each as its own issue if substantial and link the IDs here>
**Refs:** <PR # / merge commit SHA / related issue IDs / customer feedback URL if this resolved a customer ask>
Build Tradeoff and Open from the working doc's ## Decisions and ## Findings (factory-log.md), not from memory of the chat. Link the doc rather than restating it. If the Now block still lists anything under Needs you, put it under Open and flag it before closing.
The reader is someone scanning the issue six months from now to understand why this exists. Skip the play-by-play; record the load-bearing decisions. If a follow-up was punted, prefer "filed as <KEY-N>" over "TBD" — convert open questions into graph nodes.
Show the draft and ask for approval. The user can edit tone or pull anything sensitive before it lands in Linear.
On approval, in this order:
done value. Resolve a state UUID by listing team statuses if names aren't accepted.agentLabels in config) so the issue drops out of the review queue, and replace the working doc's Now block with **Now:** closed.Clean up local state. Confirm once more before any branch-deletion step — destructive operations aren't pre-authorized.
git rev-parse --show-toplevel differs from the main repo root), use the host's worktree-exit capability when available; otherwise use safe git worktree commands matching the user's confirmed merge-or-discard choice.git checkout main (or the project's default branch) then git branch -d <branch>. Use -D only if -d refuses and the user explicitly approves (work is unmerged, confirm intent).Check the learn slice (only if the ticket's plan had one). If the rep was done but isn't in the track file under ~/.factory/learner/, record it now per factory-learn.md. If it was skipped, record it as skipped with one line on why. Nothing about the rep goes into the closing comment. If the rep ran as a Linear thread, leave the thread where it is.
Confirm completion. Print: <KEY-N> closed. Branch deleted. Worktree exited (if applicable).
Follow factory-voice.md. Three gates: pre-flight review → closing comment approval → branch deletion confirmation. Don't skip any. The closing comment is the historical record — future readers will judge whether to revisit this decision based on what you write. Name principles, not symptoms. If the issue is already Done, still offer the cleanup steps (sometimes Linear gets updated before the branch does).
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub nonlinear-xyz/factory-kit --plugin factory-kit47 skills in this plugin
/factory-animationMotion discipline distilled across builds. Attention as a fixed per-viewport budget, figure/ground separation (calm the ground, load motion into the figure), one focal point of motion per screen, diegetic-over-decorative test, trigger-on-intent-then-settle over perpetual loops, and the prefers-reduced-motion fallback. Recipe pairs Astro with a Remotion video kit (rendered assets in public/). Read whenever you add motion to a marketing surface or any page where movement competes with reading. Paired with factory-design, which owns the static visual vocabulary motion sits on top of./factory-apiAPI conventions for both server actions and tRPC builds. Covers the decision between them, per-mutation Zod input schemas, central router composition, pagination shape, multi-field search via Drizzle `ilike` + `or()`, mutation lifecycle hooks, conditional query enabling, stale-time defaults, error response shape and custom error class taxonomy, mutation-boundary audit logging, fetch adapter for tRPC routes. Read when designing or implementing any data-mutation endpoint./factory-api-route-engineerUse when designing or implementing API endpoints — server actions, tRPC procedures, REST routes for external consumers. Carries the factory's API conventions — the server actions vs tRPC decision, procedure tier stacking, per-mutation Zod schemas, central router composition with manual registration, pagination (limit/offset/orderBy default; cursor only when needed), multi-field search via `ilike` + `or()`, aggregated stats in list queries, mutation lifecycle hooks, stale-time defaults, custom error class taxonomy, fetch adapter for tRPC in App Router. Outputs endpoints that fit the house style — not bespoke per-route handlers.Other plugins' skills for the same job