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 agents/johanthoren/jeff/cook-refactorgit clone --depth 1 https://github.com/johanthoren/jeffWhat 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.00039 | $0.00861 |
| Opus 5 | $0.00019 | $0.00430 |
| Sonnet 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 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 — 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.
- 2d ago First seen · 33 lines · 39 tokens per session scan A 750811f3f535
cook-refactor is an agent published in the GitHub repository johanthoren/jeff (4 stars, last pushed 5d ago), licensed Apache-2.0. It adds 39 tokens to every session and 861 once invoked, about $0.0002 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 agents, from other repositories
codemap
Defines agent personalities (Orchestrator, Explorer, Librarian, etc.) and manages their configuration lifecycle. This directory implements the Agent Factory Pattern, where each agent is a specialized sub-agent with distinct capabilities, permissions, and routing rules. The Orchestrator agent (src/agents/index.ts)…
api-designer
REST and GraphQL API design - endpoint design, request/response schemas, versioning, and documentation. Use for designing new APIs or evolving existing ones.
shep-web-route-creator
Scaffolds ONE new Next.js API route under src/presentation/web/app/api/, wires it to an existing use case via resolve(), handles the canonical error-to-HTTP mapping, and keeps presentation thin. Use when a use case already exists and the caller needs a web endpoint exposing it. Does NOT create the use case, does NOT…
python-pro
Python 3.13 language expert for the ClosedLoop plugin monorepo. Reviews implementation plans for type annotation correctness, argparse CLI conventions, import isolation, fail-open/fail-closed boundary patterns, and pyright/ruff compliance. Produces type-patterns.md in legacy mode.
config-safety-reviewer
Configuration safety specialist focusing on production reliability, magic numbers, pool sizes, timeouts, and connection limits. Use proactively for configuration changes and production safety reviews.
Audit
Deep security + performance audit of a specific diff. Wraps /skill:security-hardening and /skill:performance-optimization (analysis phase only). Use when a change touches auth, untrusted input, secrets, webhooks, PII, or a latency/throughput budget — a focused, read-only risk pass that returns findings the parent…