improve-agent-instructions
Skill34 starsChanged 8 days agoApache-2.0View on GitHub
Audit a repository's agent instruction files (AGENTS.md, CLAUDE.md and scoped files) and workspace skills against the actual repository, CI and agent loading rules, then fix stale, missing or misleading guidance in separate verified commits. Use only when a human explicitly invokes $improve-agent-instructions or asks to improve the repository's agent instructions and skills so that AI agents work well.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- nielsmadan/skillstheir own version, first seen Sep 5, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- nielsmadan/skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository34 other files it gives its agents.
- AGENTS.mdAGENTS.md
- activity-updateSkill
- add-issueSkill
- autofixSkill
- auto-post-textSkill
- auto-review-pr-querySkill
- auto-review-prSkill
- auto-review-pr-strictSkill
- auto-settle-t3-threadSkill
- collect-reviewSkill
- create-human-reviewed-prSkill
- create-prSkill
- design-uiSkill
- fork-gungraun-optimizeSkill
- improve-skill-efficiencySkill
- iterate-with-reviewSkill
- list-good-prsSkill
- main-qaSkill
- maintain-deviceSkill
- manage-stacked-prsSkill
- merge-prSkill
- post-textSkill
- repair-prSkill
- research-commentSkill
- review-onceSkill
- review-prSkill
- slop-fix-batchSkill
- slop-fix-issueSkill
- static-analysisSkill
- update-pr-descriptionSkill
- write-blog-postSkill
- write-marketing-copySkill
- write-prdSkill
- write-steSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
15 rules. About 0 are common, 10 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈10
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 11
Run this skill only when a human explicitly invokes it.
- Distinctive: line 13
Write messages to the user in the language of the user's request.
- Very specific: line 19
Do not push, open a PR or post anything.
- Distinctive: line 23
Read the root instruction file and every scoped instruction file.
- Distinctive: line 29
Run the helper from any directory and save its JSON output in the task's temporary directory:
- Very specific: line 50
Treat each finding as a candidate, not as a confirmed problem.
- Very specific: line 58
Facts: Check each concrete claim: file and script names, dev and test commands, package and project lists, tool versions and statements …
- Very specific: line 60
Skills: Check that each repository-owned skill's invocation settings match its description, that its referenced files and commands exist, …
- Distinctive: line 61
Navigation: Check that each scoped instruction file names the documents that own its directory, and that the root file routes to them.
- Distinctive: line 68
Put each rule in the file that the repository rules name as its owner.
- Distinctive: line 69
Do not delete, merge or simplify existing content unless it is confirmed wrong.
- Very specific: line 70
Before you document a command, run it, or run a dry run when it has side effects (for example turbo run <task> --filter=<package> …
- Distinctive: line 71
Do not add a CLAUDE.md to a repository that relies on AGENTS.md unless the repository rules ask for one.
- Distinctive: line 76
Commit each coherent fix separately, for example one commit for the skill settings, one for the validation commands and one for one stale …
- Distinctive: line 77
Before each commit, run the checks that apply to the changed files, at least the repository's formatter check.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Improve Agent Instructions
Make a repository's agent instructions and skills match the repository, so that agents run the right checks, find the right files and start skills only when they should. Fix only confirmed problems. Every change must be backed by evidence from the repository, its CI or the official agent documentation.
Run this skill only when a human explicitly invokes it. Editing, testing or reviewing this skill does not start it.
Write messages to the user in the language of the user's request. Write repository text in the language that the repository requires.
Scope
- In scope: agent instruction files (
AGENTS.md,CLAUDE.md,.claude/CLAUDE.md,GEMINI.md,.github/copilot-instructions.mdand their scoped copies), repository-owned skills under.agents/skills/,.claude/skills/or.codex/skills/, and the repository documents that own the rules for these files. - Out of scope: product source, CI workflows, imported skills and lock files. Imported skills are the entries in
skills-lock.json; their content and hashes stay upstream. Report a problem in these files instead of changing it. - Do not push, open a PR or post anything. When the human asks for a PR, use
$create-pr.
1. Read the rules
- Read the root instruction file and every scoped instruction file. Read the documentation catalog and the documents that the instructions name as owners of instruction, skill, validation, release and commit rules.
- Record the repository's rules for this work: where each kind of rule lives (instruction file or contract document), rules against deleting or simplifying documentation, the required language, commit message format, formatter and pre-commit hooks.
- Obey these rules in every later step. When a repository rule and this skill disagree, the repository rule wins.
2. Collect facts with the helper
Run the helper from any directory and save its JSON output in the task's temporary directory:
node <skill-dir>/scripts/audit.mjs audit <repository-path> > <tmp>/audit.jsonThe helper reads files only. It reports:
instructionFiles: the instruction files and whether each one is a symlink.skills: each skill with its name,imported(listed inskills-lock.json),explicitOnlyWording(the description asks for explicit invocation),disableModelInvocation(Claude Code) andcodexImplicitInvocation(agents/openai.yaml;nullwhen the file does not exist).packages: workspace package directories, names and scripts.nameDiffersFromDirmarks a package that a directory-name filter does not select.ciCommands: commands ofrun:steps in.github/workflows/, withmentioned: falsewhen no instruction file contains the command key.findings: candidates of these kinds:claude-md-hides-agents-md: aCLAUDE.md,.claude/CLAUDE.mdorCLAUDE.local.mdthat neither imports nor links toAGENTS.md. Claude Code then reads it instead of theAGENTS.mdfiles in that directory and below.skill-explicit-only-without-claude-settingandskill-explicit-only-without-codex-setting: the description asks for explicit invocation, but an agent can still select the skill. The settings aredisable-model-invocation: trueinSKILL.mdandpolicy.allow_implicit_invocation: falseinagents/openai.yaml.skill-invocation-mismatch: Claude Code and Codex differ about implicit invocation.skill-duplicate: two directories with the same skill name.interactive-command: an instruction tells agents to run a command that prompts in a terminal, such aspnpm changeset.unknown-package-filter: a--filter=value that matches no package name.missing-pathandbroken-link: a referenced path that does not exist.
Treat each finding as a candidate, not as a confirmed problem. For example, a missing-path can be a path that the documents mark as planned, and a path that an instruction forbids is not missing by mistake.
3. Check what the helper cannot
Compare each instruction with the repository. Check at least these areas:
- Loading. Confirm how each agent that the repository supports reads its instruction files and skills. Read the current official documentation (for example the Claude Code memory and skills pages and the Codex
AGENTS.mddocumentation); do not rely on memory, because loading rules change between versions. Check that each scoped rule sits where the agents load it. - Validation commands. For each source domain (for example Rust, Go, frontend, tooling scripts, workflows and schemas), compare the commands that the instructions tell agents to run with the commands that CI runs (
ciCommands) and with the package scripts. Look for missing checks (for example a linter or formatter that only CI runs), commands that name only one of several packages, and filters that select nothing. - Facts. Check each concrete claim: file and script names,
devandtestcommands, package and project lists, tool versions and statements such as "every app does X". Open the files that the claim describes. - Interactive steps. For each command that prompts, check that the instructions give a way for an agent without a terminal: the file that the command writes, a non-interactive flag or a request to the human.
- Skills. Check that each repository-owned skill's invocation settings match its description, that its referenced files and commands exist, and that the skill directories follow the repository's layout rules (for example a
.claude/skillssymlink to.agents/skills). - Navigation. Check that each scoped instruction file names the documents that own its directory, and that the root file routes to them.
Record each confirmed problem with its evidence: the file and line, the observed repository fact and the source of that fact.
4. Fix the confirmed problems
- Change the smallest text that fixes each problem. Keep the structure, voice and terms of the surrounding text.
- Put each rule in the file that the repository rules name as its owner. When a contract document owns the rule, change the document and keep the instruction file as a short pointer, as the repository already does.
- Do not delete, merge or simplify existing content unless it is confirmed wrong. When the intent of the existing text is not clear, ask the human before you change it.
- Before you document a command, run it, or run a dry run when it has side effects (for example
turbo run <task> --filter=<package> --dry=json). Do not document a command that you could not run or confirm from CI. - Do not add a
CLAUDE.mdto a repository that relies onAGENTS.mdunless the repository rules ask for one. Check the current Claude Code loading rules first, because aCLAUDE.mdcan hideAGENTS.mdfiles. - Apply
$write-steto new prose when it is installed.
5. Commit
- Commit each coherent fix separately, for example one commit for the skill settings, one for the validation commands and one for one stale fact. Follow the repository's commit message rules.
- Before each commit, run the checks that apply to the changed files, at least the repository's formatter check. Let the pre-commit hooks run; never skip them.
- Stage only the files of that fix. Preserve unrelated changes in the checkout.
6. Report
Report in the user's language:
- A table with one row per commit: the commit, what changed and the evidence for it.
- The commands that you ran to verify the documented commands, with their results.
- The checks that you did not run, and why.
- Candidates that you did not fix, with the reason (for example planned paths, imported skills, CI changes or a decision that the human must make).
- An offer to publish the commits with
$create-pr.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

