factory-commits

factory-commits is a skill for Claude Code from nonlinear-xyz/factory-kit. It costs 58 tokens per session (2,108 once invoked), scanned A, original, MIT.

A set of rules for writing commit messages and naming branches. It uses Conventional Commits, requires a Linear issue reference, and includes checks that enforce the format.

In plain words
What is it for?
Use it when setting up commit hooks, commitlint, Husky, or AI-assisted commit creation. It helps enforce issue-linked commit messages with a consistent structure.
Why use it?
It makes the reason for each code change easier to find later by linking commits to work items. Automated commit checks prevent inconsistent messages from entering the repository.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: positional $N argument.

Part of the factory-kit plugin — 37 skills, 8 commands, 12 agents, 1 MCP server shipped together

Install

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.

agentmods
npx agentmods add skills/nonlinear-xyz/factory-kit/factory-commits
Any agent
npx skills add nonlinear-xyz/factory-kit --skill factory-commits
Clone the repo
git clone --depth 1 https://github.com/nonlinear-xyz/factory-kit

Made for: Claude Code.

Or install factory-kit, the plugin that ships this one along with the rest of its 37 skills, 8 commands, 12 agents, 1 MCP server.

Wrote 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.

agentmods badge for factory-commits

README.md
[![agentmods](https://agentmods.dev/badge/skills/nonlinear-xyz/factory-kit/factory-commits.svg)](https://agentmods.dev/skills/nonlinear-xyz/factory-kit/factory-commits)
Your own site
<a href="https://agentmods.dev/skills/nonlinear-xyz/factory-kit/factory-commits"><img src="https://agentmods.dev/badge/skills/nonlinear-xyz/factory-kit/factory-commits.svg" alt="Measured on agentmods" height="20"></a>
Per session 58 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,108 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00058 $0.02108
Opus 5 $0.00029 $0.01054
Sonnet 5 $0.00012 $0.00422
Haiku 4.5 $0.00006 $0.00211

Measured 6d ago against content hash a0996c147c7e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

factory-commits 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 6d 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.

skills/factory-commits/SKILL.md · 181 lines

How it starts

The opening of the file, as written. The whole thing — 181 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Factory commits

Each section leads with Principle (one sentence, stack-agnostic), then Why (constraint → option → tradeoff), then Recipe (the commitlint / Husky / opencommit shape we use), and Failure mode when there's one to name.

Tie every commit to a Linear issue

Principle. Every commit references a Linear issue ID in the subject or body; the commit hook enforces it.

Why. Code changes without ticket linkage are unsearchable history — six months later, "why did we change this?" has no answer that doesn't require a full archaeology session. Linear linkage makes the graph dense: ticket → PR → commit → context → decision. Each link is cheap up front; the lookup savings compound. Enforcement via commit-msg hook is the difference between "we should" and "we do."

Recipe. A commit message MUST:

  1. Start with a Conventional Commits header: <type>(<scope>)?: <subject> (scope optional).
  2. Contain a Linear issue ID (<TEAM>-<NUM>, e.g. NON-45) somewhere — subject or body.
  3. Use a Linear magic word + ID for the commit that should close the issue.

A commit message SHOULD keep the subject under 72 chars, imperative mood, no trailing period. Put the why in the body when the diff doesn't make it obvious.

Failure mode. Commits with no Linear linkage — months later, archaeology requires reading the diff itself because there's no ticket trail.

Subject describes the change; magic word lives in the body

Principle. The subject describes what changed; the Linear magic word goes in the body.

Why. "feat(auth): closes NON-45" looks tidy but conflates two things — what the commit does and what ticket it closes. The subject is the scannable description; the body is where automation hooks. Keeping the magic word in the body means the subject reads as a changelog entry, not a ticket-management instruction.

Recipe.

✓ feat(auth): add SSO callback handler

  Closes NON-45.

✓ fix: prevent duplicate org invites (Fixes NON-87)

✓ refactor(forms): extract field registry — refs NON-103

✗ feat: add login flow
   (no Linear ID anywhere — commit-msg hook rejects)

✗ feat(auth): closes NON-45
   (subject is the magic word; subject should describe the change)

Read the full file on GitHub · 181 lines

Changes

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.

  1. 6d ago First seen · 181 lines · 58 tokens per session scan A a0996c147c7e

Subscribe to this mod's changes

factory-commits is a skill published in the GitHub repository nonlinear-xyz/factory-kit (9 stars, last pushed 1mo ago), licensed MIT. It adds 58 tokens to every session and 2,108 once invoked, about $0.0003 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.