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 skills add vinta/hal-9000 --skill refactor-claude-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-claude-md)<a href="https://agentmods.dev/skills/vinta/hal-9000/refactor-claude-md"><img src="https://agentmods.dev/badge/skills/vinta/hal-9000/refactor-claude-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.1 | $0.00025 | $0.01689 |
| Opus 5 | $0.00013 | $0.00844 |
| Sonnet 5 | $0.00005 | $0.00338 |
| Haiku 4.5 | $0.00003 | $0.00169 |
Grade A, and why
refactor-claude-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 yesterday.
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 — 58 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Overview
Refactor a CLAUDE.md. Every line it keeps is loaded into every session the file covers, and a frontier model follows only around 150 to 200 standing instructions consistently, so each line competes for that budget. Everything else moves down the ladder or out of the file.
The file serves every model the user runs, not only the one this session runs on, so audit it against both Claude Fable 5.1 and Claude Opus 5. Claude Code assembles its system prompt per model: a line that merely restates the prompt under one model can be the only copy under the other.
Instructions
-
Pick the target. If the invocation names one, use it. Otherwise ask with
AskUserQuestion, one option per file that exists, with the resolved path in the label:- The user-level CLAUDE.md at
~/.claude/CLAUDE.md - The current project's CLAUDE.md
- The user-level CLAUDE.md at
-
Fetch the yardsticks. Fetch these pages. They calibrate the delete and rewrite verdicts below:
- https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices
- https://www.aihero.dev/a-complete-guide-to-agents-md
- The pages for both models, regardless of which one this session runs on:
-
Audit. Read the file and give every instruction exactly one verdict, judged against the target's bar below. Done when no instruction lacks one.
- contradiction: conflicts with another instruction, or the two model pages pull it opposite ways: one says to remove it while the other model still needs it, or no single wording satisfies both pages. Record both sides.
- delete: fails the no-op test on both models, meaning each would behave the same without it, or a model page says to remove it because it was written for an earlier model's habits and the other model does not need it either. Judge defaults against the fetched pages and the probe below, not memory. Covers instructions the models already follow by default, instructions too vague to act on, and platitudes like "write clean code". A line only one model needs is a keep.
- demote: real instruction that only applies to some paths or tasks. Pick its destination from the bar. If it describes a multi-step workflow, propose a skill instead. Name the destination in the sign-off.
- rewrite: right meaning, phrasing falls short of the fetched best practices. Where a model page gives measured wording for the same instruction and the other model's page allows it, use that wording. Voice follows the system prompt: a line addresses the model as "you" and names the human as "the user", so "I" or "my" for the human, and "Claude" or "the agent" for the model, are rewrites; words quoted as user speech keep their own voice.
- keep: earns its always-loaded cost as written.
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.
- yesterday Changed · +14 lines · +1 tokens per session ba7c10392775
- 7d ago First seen · 44 lines · 24 tokens per session scan A a958638eba1d
refactor-claude-md is a skill published in the GitHub repository vinta/hal-9000 (127 stars, last pushed yesterday), licensed MIT. It adds 25 tokens to every session and 1,689 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
tiny-web-crawler
Crawl from one or more starting web pages, fetch readable content, search within pages, follow relevant links, and stop when the requested information is found or a bounded limit is reached.
live-tutorial
Create an annotated MP4 tutorial from real screenshots of a workflow on the owner's computer. Use only when the owner explicitly asks for a tutorial video, not merely when they ask to watch an action happen live.
query-snmp-traps
Query SNMP trap logs through Netdata Cloud or directly from a Netdata Agent. Use when the user asks about SNMP traps, trap journal entries, trap severities, trap categories, trap senders, deduplication summaries, decode errors, TRAP fields, TRAPVAR indexed varbind fields, TRAPJSON varbind audit data, or how to inspect…
agent-tool
Add a new tool/function the AI agent can call (e.g. look something up, hit an external API, perform an action). Use when extending the assistant's capabilities, wiring a new function into the agent, or when the model needs a new action. This project uses {{ cookiecutter.aiframework }}.
background-task
Add or modify work that runs outside the request/response cycle — emails, document ingestion, webhooks, cleanups, scheduled jobs. Use when something is slow or fire-and-forget, or when adding a periodic/cron task. This project's queue is {{ cookiecutter.backgroundtasks }}.
rag-knowledge
Work with the RAG knowledge base — ingest documents, run semantic search, manage collections, or add a sync source/connector (Google Drive, S3). Use when populating or debugging the knowledge base, tuning retrieval, or adding a new document source. This project uses {{ cookiecutter.vectorstore }} + {{…