/hal-skills:refactor-agents-mdfrom HAL Skills
Refactors CLAUDE.md or AGENTS.md instruction files by auditing each line against reader platform requirements. Use before any edit to these files, no matter how small.
Ships in HAL Skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Refactor an instruction file (CLAUDE.md or AGENTS.md). Every retained instruction competes for attention in the sessions that load it.
The file serves every agent and model that reads it, not only this session's. The filename does not say who reads it, since Claude Code reads AGENTS.md too. Each reader assembles its own system prompt, so a line that restates one reader's prompt can be the only copy for another. Audit each line against every reader.
Use AskUserQuestion in Claude Code or request_user_input in Codex when available.
Pick the target and its readers. If the invocation names a file, use it. Otherwise discover candidate files using the reader platforms' loading rules in the references below, and ask only if the target remains ambiguous. Resolve the readers from the invocation and context; ask only when uncertain. Read one reference per reader platform, both when both read the file:
For a targeted change, the verdicts below cover only the lines it adds or touches: the rest of the file stays as it is, and anything noticed there is a follow-up.
Fetch the guides. Follow each loaded reference's guide-fetching instructions, for a one-line change too: a verdict without the guides rests on memory. Read each page's full text, not a fetch tool's summary of it: a summary misquotes long pages and misses parts of them. Reuse current guidance already fetched in this conversation. Done when each page a reference lists has been fetched for each reader in this session.
Audit. Read the file and give every instruction in scope exactly one verdict, judged against the target's bar below. Done when no instruction in scope lacks one.
A delete that rests on the shipped system prompt already saying the same thing needs the probe evidence from references/claude-code.md for each Claude reader.
The bar per target:
Get decisions. Reuse changes and verdicts the user already authorized. Resolve contradictions from instruction priority and explicit user intent where possible; for each unresolved one, ask with AskUserQuestion or request_user_input, each conflicting version an option. Present any remaining delete and demote proposals, with the per-reader probe result beside each prompt-dependent delete, and collect sign-off; rewrites need none unless the user asked to review them first. Leave unapproved proposals untouched.
Rewrite. Apply the authorized changes, the resolved contradictions, the rewrites, and the signed-off deletes and demotes in one pass, without asking again; they are the request. Apply only those: anything else noticed while editing is a follow-up to report in the final message. Search references before removing or moving guidance, and update affected pointers. Done when every audited instruction landed where its verdict says: kept, rewritten, demoted, or deleted.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
claude-md, agents-md, instruction-files, system-prompt, file-audit
13 skills in this plugin
/audit-agent-settingsUse when auditing Claude Code or Codex settings and env vars against the latest docs to suggest tailored changes/best-practicesUse when about to choose, configure, or refine a tool, library, config format, API pattern, or project setup, or before proposing a design or fix of your own — research current guidance, pitfalls, and prior art for the problem it solves first; already knowing an approach, or assuming no prior art exists, is not an exemption. Also use when the user asks about best practices, gotchas, or recommended patterns/blindspotUse when the user asks for a blindspot pass or to find their unknown unknowns, or signals unfamiliarity with a domain, tool, or codebase area ("never used X", "first time doing Y", "no idea where to start", "don't know what I don't know") before working there. Maps the areas their request leaves unnamed, purpose and shape before mechanics, shows how people usually answer each and why, and asks which to explore next, so unknown unknowns become known unknowns they can prompt with. Recommendations on a tool already chosen belong to best-practices/commitUse when making any git commit. Pass the failure, false claim, or risk the changes fix as the argument; for an addition or a filled gap, pass what it adds — never an invented why./differenceCompare A vs B, weigh pros and cons of A, B, C, ..., or explain the nuance between sentences — a quick answer from what the model already knows/fuck-over-engineeringUse when the user asks what could be deleted or reduced to simplify a codebase, says "simplify", "over-engineered", or wants a repo-, folder-, or file-wide audit for over-engineering — hunts dead code, reinvented stdlib, needless dependencies, and single-implementation abstractions, reports ranked cuts, applies only the picks. Not a diff review and not a bug huntnpx claudepluginhub vinta/hal-9000 --plugin hal-skillsOther plugins' skills for the same job