Factory Kit
Factory Kit is a portable software-factory playbook for Claude and Codex. One canonical Open Agent Skills tree contains the knowledge, ticket workflows, and specialist workflows. Claude commands and subagents are thin compatibility adapters over that tree.
The kit separates stack-independent principles from the opinionated Factory recipe: Next.js, Drizzle, Better Auth, Mantine or shadcn, Cloud Run, Linear, and the operational failure modes learned across production builds.
Install
Choose either the universal npm bootstrap or a native plugin marketplace. They are alternative installation methods, not prerequisites for each other.
Universal npm bootstrap
npx @nonlinear-labs/factory-kit install --target auto
auto detects whether Claude or Codex invoked the installer. If both or neither host can be identified, the command fails with an explicit --target claude|codex|all choice instead of guessing.
factory-kit install --target claude
factory-kit install --target codex
factory-kit install --target all
factory-kit install --target auto --global-guidance
factory-kit install --target auto --skip-linear
Running npx @nonlinear-labs/factory-kit without arguments retains the original Claude-only bootstrap target. Global guidance is still opt-in.
The bootstrap installs directory symlinks for canonical skills. Claude also receives the existing command and subagent names. Re-running is idempotent. Factory Kit-owned legacy flat links are migrated; user-owned files and unrelated symlinks are preserved as conflicts.
From a local clone:
./install.sh
Claude plugin marketplace
claude plugin marketplace add nonlinear-xyz/factory-kit
claude plugin install factory-kit@factory-kit
Codex plugin marketplace
codex plugin marketplace add nonlinear-xyz/factory-kit
codex plugin add factory-kit@factory-kit
The repository contains both catalogs and both manifests over the same root skills/ tree. Native installs bundle the official Linear HTTP MCP endpoint; the host requests authorization.
Pasteable agent prompt
Install Factory Kit with npx @nonlinear-labs/factory-kit install --target auto. Preserve all existing global instructions and user-owned files. Leave global guidance disabled unless I explicitly request it. If host detection is ambiguous, stop and tell me to choose Claude or Codex.
Global guidance
Factory Kit never replaces a global instruction file. Guidance is installed only through a marked, reversible block assembled from shared content plus a host adapter.
factory-kit guidance add --target claude
factory-kit guidance add --target codex
factory-kit guidance add --target all
factory-kit guidance remove --target claude
factory-kit guidance remove --target codex
factory-kit guidance remove --target all
The managed block lives in ~/.claude/CLAUDE.md or ~/.codex/AGENTS.md. Updates replace only that block. Removal preserves the surrounding file byte-for-byte.
Linear workflows
Project configuration belongs at .factory-kit/linear.json:
{
"teamKey": "NON",
"teamId": "<uuid>",
"projectId": "<optional-uuid>",
"projectName": "<optional-name>",
"states": {
"inReview": "In Review",
"done": "Done"
},
"branchPattern": "<owner>/<team-key>-<number>-<topic>"
}
.claude/linear.json remains a read-only migration fallback. The setup-linear workflow writes the canonical path. The npm bootstrap registers Linear by default without storing credentials; --skip-linear leaves host MCP configuration untouched.
Diagnostics
factory-kit doctor --target claude
factory-kit doctor --target codex
factory-kit doctor --target all
doctor reports canonical skill links, native plugin detection, managed guidance, stale flat links, and the duplicate-skill risk when native and symlink installs coexist.
Architecture
factory-kit/
├── skills/<factory-name>/SKILL.md # canonical knowledge and workflows
├── commands/*.md # thin Claude slash-command adapters
├── agents/*.md # thin Claude agents with skill preloads
├── guidance/
│ ├── shared.md
│ ├── claude.md
│ └── codex.md
├── .claude-plugin/
│ ├── plugin.json
│ └── marketplace.json
├── .codex-plugin/plugin.json
├── .agents/plugins/marketplace.json
├── .mcp.json # official Linear HTTP MCP
├── bin/factory-kit.js # universal installer and doctor
├── check/ # deterministic conformance engine
└── templates/factory-conformance.yml
There are 47 canonical skills: