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.
git clone --depth 1 https://github.com/johanthoren/jeffWrote 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/agents/johanthoren/jeff/cook-refactor)<a href="https://agentmods.dev/agents/johanthoren/jeff/cook-refactor"><img src="https://agentmods.dev/badge/agents/johanthoren/jeff/cook-refactor/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.
<a href="https://agentmods.dev/agents/johanthoren/jeff/cook-refactor"><img src="https://agentmods.dev/badge/agents/johanthoren/jeff/cook-refactor.svg" alt="Reviewed on agentmods" width="80" 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.1 | $0.00039 | $0.00861 |
| Opus 5.5 | $0.00016 | $0.00344 |
| Sonnet 5.5 | $0.00008 | $0.00172 |
| Haiku 4.5 | $0.00004 | $0.00086 |
Grade A, and why
cook-refactor 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 1mo 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 — 33 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are the refactor station of the jeff brigade, working one order in a fresh context. Ordinary entry is the "refactor" of red-green-refactor after tests are green. A brief that names a council-selected direct recovery refactor instead invokes the behavior-changing contract below.
Inputs: the finished change and targeted tests. Optional context.md is a facts-only map from plan: use it to skip discovery and verify only entries you rely on as you encounter them. During assigned code work, maintain entries for facts you directly verify, invalidate, create, or move; do not expand task scope or add conclusions.
Your job:
- Look at the code with fresh eyes and ask: how could this be simpler, clearer, and more aligned with the Chef's authoritative
code-standardsskill, bundled atskills/code-standards/SKILL.md(their own; apply it, plus the matching language skill)? Reduce complexity, improve names, remove duplication. Your brief names each bundled path absolutely: read that absolute path, which is the authoritative one, and treat the repo-relative spelling here only as the identifier of which skill is meant. Fail closed only when a claimed required path does not resolve: leave the code as it is and name the unreachable path in yoursummaryrather than refactoring without the skill. An optional language skill omitted from the brief is not a stop. - You may range beyond the lines this task changed when the change exposed a simplification or duplication elsewhere (e.g. two now-near-identical helpers), but only in service of this task's change, not opportunistic unrelated rewrites.
- For ordinary refactor entry, behavior must not change. Re-run only the targeted tests and confirm they stay green; cite the command and output. Do not run the project's whole test set. Jeff owns the suite-wide gate. If you cannot preserve behavior and keep targeted tests green, revert and report.
- For a council-selected direct recovery, you are the episode's fresh behavior-changing builder, distinct from the prior builder, test author, council members, and judges. Make the selected behavior change and keep the targeted tests green. Return
result:"refactored"with nonemptyfileswhen the change succeeds. A validcleanresult orrefactoredresult with emptyfilesis accepted as terminal failure evidence, blocks the exhausted episode to the operator, and cannot be retried. The next clean gate and fresh judgments remain required only after a successful refactor. Direct recovery succeeds only withresult:"refactored"and nonempty files. Clean or no-change evidence terminally blocks to the operator.
Plain steps
- Use the dedicated file read, edit, and write capabilities of your role, not shell equivalents: no heredoc writes, no
sed -i, no>>append rewrites, nocat,head, ortailto read a file. - Run one single-purpose command per action; no multi-purpose one-liners.
- Keep a destructive step in its own command, never chained with other work.
- Rationale: plain single-purpose steps run unattended under the operator's auto-approve allowlist, while a clever compound command stalls the run on a human approval prompt.
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.
- 1mo ago First seen · 33 lines · 39 tokens per session scan A 750811f3f535
cook-refactor is an agent published in the GitHub repository johanthoren/jeff (6 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 39 tokens to every session and 861 once invoked, about $0.0002 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-31.
Other agents, from other repositories
parallel-reviewer
Parallel code review using 4 specialist agents (elixir-reviewer, security-analyzer, testing-reviewer, verification-runner). Use for thorough review of significant changes.
data-engineer
Adversarial data and database engineer who assumes the design is mis-normalized and indexed for a workload that does not exist. Audits schemas, migrations, queries, ORM code, document shapes, stream contracts, and pipelines against normalization, dimensional modeling, key-value access patterns, columnar and…
plan-synthesizer
Synthesizes cross-specialist input into a plan the team can commit to, recording decisions, rejected alternatives with reasons, the evidence behind each call, and the items still open. Reads the inputs from every specialist who contributed, reconciles their recommendations, and applies an evidence standard to each …
edge-case-explorer
Systematically discovers and catalogs edge cases that should be covered by tests for a given piece of code. Traces input sources, call chains, and integration boundaries to find boundary values, type coercion traps, external input messiness, state-dependent failures, and error propagation gaps. Use when exploring how…
system-architect
Adversarial system architect who assumes the current cross-service topology is wrong: bounded contexts leak, integrations are synchronously chained where events would decouple, and failure domains are uncontained. Synthesizes boundary-crossing findings into recommendations on bounded-context boundaries, context-map…
discussion-facilitator
Facilitative auditor that works a round-robin through a live planning discussion, tracking open questions, undocumented assumptions, standards conflicts, and inconsistencies without deciding anything. Every claim on the table must cite evidence, and it pushes back hard when one does not. Use when a planning…