Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/nonlinear-xyz/factory-kit/factory-closenpx skills add nonlinear-xyz/factory-kit --skill factory-closegit clone --depth 1 https://github.com/nonlinear-xyz/factory-kitWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/nonlinear-xyz/factory-kit/factory-close)<a href="https://agentmods.dev/skills/nonlinear-xyz/factory-kit/factory-close"><img src="https://agentmods.dev/badge/skills/nonlinear-xyz/factory-kit/factory-close.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00026 | $0.00981 |
| Opus 5 | $0.00013 | $0.00491 |
| Sonnet 5 | $0.00005 | $0.00196 |
| Haiku 4.5 | $0.00003 | $0.00098 |
Grade A, and why
factory-close scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 58 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You're finishing a ticket. This command:
- Drafts a closing comment summarizing what shipped
- Moves the Linear issue to
Done - Cleans up the local branch and worktree
It 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.
What to do
-
Read project configuration. Prefer
.factory-kit/linear.json; use legacy.claude/linear.jsononly as a migration fallback. If neither exists, stop and direct the user to setup-linear. PullteamKeyandstates.done(default"Done"). -
Resolve the issue ID the same way
/submitdoes:- Argument provided → normalize (prepend
<teamKey>-if numeric). - Otherwise → parse current branch (
git rev-parse --abbrev-ref HEAD) for<teamKey>-<num>(case-insensitive). - If nothing matches, ask the user.
- Argument provided → normalize (prepend
-
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.- Linked PR state if discoverable (inspect Linear issue attachments through the connected integration, or run
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.mdshape — 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>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:
- Post the comment through the Linear integration with the issue ID and body.
- Move the issue to Done through the Linear integration, using the configured
donevalue. Resolve a state UUID by listing team statuses if names aren't accepted.
-
Clean up local state. Confirm once more before any branch-deletion step — destructive operations aren't pre-authorized.
- If the current directory is a worktree (
git rev-parse --show-topleveldiffers 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. - Otherwise:
git checkout main(or the project's default branch) thengit branch -d <branch>. Use-Donly if-drefuses and the user explicitly approves (work is unmerged, confirm intent).
- If the current directory is a worktree (
-
Confirm completion. Print:
<KEY-N> closed. Branch deleted. Worktree exited (if applicable).
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 4d ago First seen · 58 lines · 26 tokens per session scan A 1e1166b9150d
factory-close is a skill published in the GitHub repository nonlinear-xyz/factory-kit (9 stars, last pushed 1mo ago), licensed MIT. It adds 26 tokens to every session and 981 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
dev-finish
Close out a session — summarise what changed, capture what was learned, and prepare the commit.
scaffold
Set up or align a non-code ops/PM repo with the ops folder structure, CLAUDE.md, and INDEX.md hierarchy.
roadmap
· Capture, track, and prioritize ideas in gitignored ROADMAP.md. Triggers: 'roadmap', 'ideas', 'feature ideas', 'competitive analysis', 'what should I build', 'feature backlog'. Not for project management or code review.
dev-cycle
Run a feature end to end — scout the code, plan it, build it, and keep a session file so a closed terminal doesn't lose the thread.
sibling-sync
Bilateral SYNERGY/UPSTREAM reconciliation across sibling projects. Use when the user wants to sync sibling SYNERGY/UPSTREAM files, compare both sides to surface drift, find reciprocation gaps (entries here but not there, or vice versa), flag stale-aligned rows, detect status drift across sides, surface friction the…
synergy-tracker
Manage cross-project synergy tracking between sibling projects. Use when the user wants to log a shared pattern, a divergence, an extraction candidate, or something a sibling project has that this one doesn't. Also use when the user wants to promote synergy entries to Basic Memory (workflow 5). NOT for upstream…