factory-tune

factory-tune is a command for Claude Code from addyosmani/factory. It costs 33 tokens per session (957 once invoked), scanned A, original, MIT.

A scheduled review command for deciding whether a software factory’s constraints should become stricter or looser. Constraints are rules that determine which automated changes may proceed.

In plain words
What is it for?
Use it monthly or after a defect reaches the main branch to review merged pull requests, failed verifications, review bottlenecks, and the effectiveness of existing gates.
Why use it?
Rules can either block useful work or allow defects through. The command uses recent factory runs, escaped defects, rejected reviews, triage accuracy, queue depth, and gate settings to propose changes without editing the charter.

Command for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Use it monthly or after a defect reaches the main branch to review merged pull requests, failed verifications, review bottlenecks, and the effectiveness of existing gates.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/addyosmani/factory/factory-tune
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.

Clone the repo
git clone --depth 1 https://github.com/addyosmani/factory

Made for: Claude Code.

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-tune

README.md
[![agentmods](https://agentmods.dev/badge/commands/addyosmani/factory/factory-tune/github.svg)](https://agentmods.dev/commands/addyosmani/factory/factory-tune)
Your own site
<a href="https://agentmods.dev/commands/addyosmani/factory/factory-tune"><img src="https://agentmods.dev/badge/commands/addyosmani/factory/factory-tune/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for factory-tune

Your own site · 80×15
<a href="https://agentmods.dev/commands/addyosmani/factory/factory-tune"><img src="https://agentmods.dev/badge/commands/addyosmani/factory/factory-tune.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 33 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 957 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00033 $0.00957
Opus 5.5 $0.00013 $0.00383
Sonnet 5.5 $0.00007 $0.00191
Haiku 4.5 $0.00003 $0.00096

Measured 2mo ago against content hash 053228a5786b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

factory-tune 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 2mo 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.

template/.claude/commands/factory-tune.md · 97 lines

How it starts

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

Constraints set once become either a permanent tax or a permanent hole. This command is the scheduled review that keeps them honest. Run it monthly, or after any escaped defect.

It proposes. It never edits CHARTER.md itself. A factory that can rewrite its own constraints has none.

Gather evidence

Look at the last 30 days (or since LAST_REVIEWED in the charter). Use immutable records under docs/factory/runs/ plus GitHub issue and PR timestamps:

  1. Merged factory PRs. How many, and how many needed human fixes after merge?
  2. Escaped defects. Anything that reached the default branch and later needed a fix. For each, trace which gate should have caught it. This is the single most valuable input here.
  3. Rejected verifications. What did the verifier catch, and is there a pattern? A repeated catch is a candidate for a new deterministic gate, which is strictly better than catching it with a model every time.
  4. Triage accuracy. Items marked ready-to-implement that turned out to need a spec. A high rate means the charter's AUTOMATABLE list is too generous.
  5. Review queue depth over time. Was the human review queue the bottleneck?
  6. Gate configuration. Which runs were MISCONFIGURED? Which optional gates reported SKIP, and should any become required?
  7. Flow. Median queue age, implementation duration where records are complete, and time from awaiting-review to the human decision. State when records are incomplete; do not manufacture precision.

Propose

Tighten when

  • An escaped defect traces to an automated gate you trusted. Say exactly which gate and what it missed. Tighten immediately; this is not a judgment call.
  • A category keeps arriving in review needing real fixes.
  • The verifier catches the same class of problem repeatedly. Propose the deterministic check that would catch it instead, because a gate cannot be talked out of its verdict and a reviewer can.

Loosen when

Read the full file on GitHub · 97 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. 2mo ago First seen · 97 lines · 33 tokens per session scan A 053228a5786b

Subscribe to this mod's changes

factory-tune is a command published in the GitHub repository addyosmani/factory (324 stars, last pushed 2mo ago), licensed MIT. It adds 33 tokens to every session and 957 once invoked, about $0.0001 per session on Opus 5.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-30.

Related

factory-tune compared with commands from other repositories

factory-tune next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
factory-tuneaddyosmani/factoryCommand3242mo agoMITA33Claude Code
implementshanraisshan/claude-code-best-practiceCommand69kyesterdayMITA6Claude Code
ticketowainlewis/youtube-tutorialsCommand4121mo agoMITA19Claude Code
session-stopsageox/oxCommand67yesterdayMITA0Claude Code
scantrustmybot/pluginCommand6yesterdayMITA51Claude Code
speckit.archive.runracecraft-lab/PaddockCommand124mo agoMITA16Claude Code
skill-go-gin-apidewtech-technologies/dare-methodCommand53mo agoMITA0Claude Code