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-stacknpx skills add nonlinear-xyz/factory-kit --skill factory-stackgit clone --depth 1 https://github.com/nonlinear-xyz/factory-kitWhat 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.00061 | $0.01020 |
| Opus 5 | $0.00030 | $0.00510 |
| Sonnet 5 | $0.00012 | $0.00204 |
| Haiku 4.5 | $0.00006 | $0.00102 |
Grade A, and why
factory-stack 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 2d 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 — 71 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Factory stack
Locked decisions (no per-project relitigation)
| Layer | Choice | Why |
|---|---|---|
| Runtime | Next.js App Router | Convergent across all customer repos; ecosystem fit for tRPC / server actions / Vercel deploy |
| Language | TypeScript | Convergent; non-negotiable |
| Validation | Zod | Pairs with both tRPC and server actions; field registry pattern depends on it |
| Server state | TanStack Query | Convergent across all repos that need server state |
| DB | Postgres via Neon (dev branches) or RDS (compliance) | Convergent |
| Forms | react-hook-form + Zod via resolver | Convergent |
| Resend | Convergent | |
| Linting | ESLint + Prettier + ESLint Drizzle rules where applicable | Convergent |
| Env vars | t3-oss/env-nextjs (Zod-validated, server/client split) | Convergent |
Decision-criteria choices (pick per project; document in project's CLAUDE.md or DECISIONS.md)
ORM — Drizzle vs Supabase auto-types vs raw pg
- Drizzle — default. Schema partitioning by domain (
_shared.ts,<domain>.ts) + sharedtimestampshelper.pgTableCreator()for prefixing if the DB is shared. - Supabase auto-generated types — when Supabase Auth + RLS is already doing real work. RLS policies are the contract; auto-types are a free byproduct.
- Raw
pg— never for new projects. Migrate if encountered.
Auth — Better Auth + orgs vs Supabase Auth + RLS vs Clerk
- Better Auth + organization plugin — default. Org + RBAC + 2FA out of the box; pairs with Drizzle.
- Supabase Auth + RLS — when RLS pays for itself (multi-role partner/distributor model, deeply branched authz at row level).
- Clerk — consumer/SSO-heavy, or when managed auth UI components matter.
The wrapper interface is the same regardless: requireAuth(), requireRole(), withOrgContext(). See factory-auth.md (Phase B) for the canonical wrapper shape.
API style — server actions vs tRPC
- Server actions — default for feature-folder-colocated apps with one frontend consumer. Pairs with TanStack Query (
useMutationwrapping the action). - tRPC — when typed RPC contracts add leverage: ≥3 entities with cross-feature queries, multiple consumers, or a public API surface.
- Pitfall: don't import both. Pick a side per project.
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.
- 2d ago First seen · 71 lines · 61 tokens per session scan A a10330467276
factory-stack is a skill published in the GitHub repository nonlinear-xyz/factory-kit (9 stars, last pushed 28d ago), licensed MIT. It adds 61 tokens to every session and 1,020 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.
Other skills, from other repositories
hook-template
Generate hook script from template. Use when adding a new hook, wiring a PreToolUse/PostToolUse/Stop/Notification hook, or scaffolding hook config for settings.json.
prompt-sensei
Stage-aware prompt coaching, prompt improvement, lookback analysis, prompting habit feedback, and local reports about prompt quality for AI coding agents such as Claude Code or Codex.
skill-template
Generate custom skill/command from template. Use when creating a new skill or slash command from scratch, or scaffolding a skill file with correct frontmatter.
agent-template
Generate custom agent from template. Use when creating a new subagent from scratch, or scaffolding an agent file with correct frontmatter.
workflow
Run the complete 5-step development workflow: focus problem → prevent over-development → test-first (TDD) → document → smart commit. Use when starting a new feature, or when the user runs /workflow or asks for the full development flow.
check-environment
Verify Claude, Codex, and Grok availability plus Director guidance, relay, agents, and skills. Audit optional hooks only when selected. Use after installation or when a native surface misbehaves.