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/vinta/hal-9000/refactor-agents-mdnpx skills add vinta/hal-9000 --skill refactor-agents-mdgit clone --depth 1 https://github.com/vinta/hal-9000Wrote 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/skills/vinta/hal-9000/refactor-agents-md)<a href="https://agentmods.dev/skills/vinta/hal-9000/refactor-agents-md"><img src="https://agentmods.dev/badge/skills/vinta/hal-9000/refactor-agents-md.svg" alt="Measured on agentmods" 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 | $0.00022 | $0.00716 |
| Opus 5 | $0.00011 | $0.00358 |
| Sonnet 5 | $0.00004 | $0.00143 |
| Haiku 4.5 | $0.00002 | $0.00072 |
Grade A, and why
refactor-agents-md 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 5d 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 — 37 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Refactor AGENTS.md
Refactor an AGENTS.md toward progressive disclosure. Every retained line enters each Codex session in its scope, so it must earn that attention. Move narrower guidance to the closest applicable scope or a reusable skill, and remove instructions that do not change behavior.
Instructions
-
Pick the target. Use a target named by the invocation. Otherwise ask the user to choose among the files that exist:
- The user-level file at
$CODEX_HOME/AGENTS.md, defaulting to~/.codex/AGENTS.mdwhenCODEX_HOMEis unset. - The current project's root
AGENTS.md. - Any nested
AGENTS.mdon the path from the project root to the current working directory.
- The user-level file at
-
Fetch the yardsticks. Fetch these pages to calibrate the audit:
-
Audit. Read the target and applicable broader
AGENTS.mdfiles. Give every instruction in the target exactly one verdict against the target's bar below. Finish only when every instruction has a verdict.- contradiction: conflicts with another applicable instruction. Record both instructions and their source files.
- delete: fails the no-op test because Codex would behave the same without it. This includes default behavior, vague directions, and platitudes such as "write clean code."
- demote: changes behavior but applies only to a narrower directory or task. Choose and name its destination. Put directory-specific guidance in the closest nested
AGENTS.md; put a multi-step task workflow in a skill; put reference material in a linked document. - rewrite: has the right scope and meaning, but its phrasing falls short of the fetched prompting guidance.
- keep: earns its always-loaded cost as written.
Apply the bar for the target:
- User-level: a keep must apply across all projects. Demote project or directory guidance to the applicable project's
AGENTS.md, and task workflows to skills. - Project or nested: a keep must apply to every task and file in the target directory's subtree and be underivable from the repository. Keep concise project context, commands Codex would otherwise guess wrong, domain concepts, constraints, and gotchas. Delete restatements of the code and volatile inventories such as file trees. Demote narrower guidance to a closer nested
AGENTS.md, a linked document, or a skill.
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 5d ago First seen · 37 lines · 22 tokens per session scan A 32d32030c03d
refactor-agents-md is a skill published in the GitHub repository vinta/hal-9000 (125 stars, last pushed 7d ago), licensed MIT. It adds 22 tokens to every session and 716 once invoked, about $0.0001 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-30.
Other skills, from other repositories
configure-nightwatch
Configures Laravel Nightwatch data collection, sampling rates, filtering rules, and redaction policies. Use when setting up Nightwatch, managing data volume, protecting sensitive data (PII), or optimizing event collection for production workloads.
laravel-actions
Build, refactor, and troubleshoot Laravel Actions using lorisleiva/laravel-actions. Use when implementing reusable action classes (object/controller/job/listener/command), converting service classes/controllers/jobs into actions, orchestrating workflows via faked actions, or debugging action entrypoints and wiring.
debugging-output-and-previewing-html-using-ray
Use when user says "send to Ray," "show in Ray," "debug in Ray," "log to Ray," "display in Ray," or wants to visualize data, debug output, or show diagrams in the Ray desktop application.
fortify-development
ACTIVATE when the user works on authentication in Laravel. This includes login, registration, password reset, email verification, two-factor authentication (2FA/TOTP/QR codes/recovery codes), passkeys, profile updates, password confirmation, or any auth-related routes and controllers. Activate when the user mentions…
pest-testing
Use this skill for Pest PHP testing in Laravel projects only. Trigger whenever any test is being written, edited, fixed, or refactored — including fixing tests that broke after a code change, adding assertions, converting PHPUnit to Pest, adding datasets, and TDD workflows. Always activate when the user asks how to…
configuring-horizon
Use this skill whenever the user mentions Horizon by name in a Laravel context. Covers the full Horizon lifecycle: installing Horizon (horizon:install, Sail setup), configuring config/horizon.php (supervisor blocks, queue assignments, balancing strategies, minProcesses/maxProcesses), fixing the dashboard…