agentleFS
sdhong0609sdhong0609/agents-md-skill/skills/write-agents-md/SKILL.md

write-agents-md

Skill0 starsChanged 6 months agoMITView on GitHub

Use when Codex needs to create, rewrite, audit, slim down, or install AGENTS.md/CLAUDE.md agent instruction files for a repository, especially when avoiding /init-style generated context, reducing context debt, adding repo-specific pitfalls, or setting nested AGENTS.md guidance.

7 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions7 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 7

    1. narumiruna/skills★ 15same name
    2. dzianisv/skills★ 4same name
    3. AsakuraMizu/skills★ 2same name
    4. brandhaug/skills★ 0same name
    5. josecabralf/skills★ 0same name
    6. joshua-zyy/write-agents-md★ 0same name
    7. justinchoo93/skills★ 0same 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.

The file

We split this skill into the rules it gives an agent

12 rules. 0 are common, 9 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 7 edited versions we read keep these.

  • 9

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Treat AGENTS.md as a compact map of project-specific traps and verification rules, not as a README for agents.

    line 11
  2. Distinctive:

    Only include information that changes agent behavior and is hard to infer from the repo itself.

    line 13
  3. Distinctive:

    If scope is unclear, ask before editing.

    line 19
  4. Very specific:

    Keep: exact commands, required flags, forbidden substitutions, repeated agent mistakes, deployment/runtime traps, security/performance/UX …

    line 27
  5. Distinctive:

    Remove: folder tours, stack lists, README duplicates, broad architecture essays, obvious style rules, team background.

    line 28
  6. Distinctive:

    Prefer nested files for large workspaces.

    line 30
  7. Distinctive:

    Write in Korean by default unless the repo clearly uses English docs.

    line 35
  8. Distinctive:

    Use bullets and short sections.

    line 36
  9. Distinctive:

    Keep the file small. Aim for under 80 lines unless the repo genuinely needs more.

    line 37
  10. Distinctive:

    Check that commands are executable-looking and not invented.

    line 42
  11. Very specific:

    Default behavior is --scope user --agent codex.

    line 82
  12. Very specific:

    Read references/principles.md when you need the inclusion/exclusion checklist, anti-patterns, or examples.

    line 86

“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Write AGENTS.md

Core Principle

Treat AGENTS.md as a compact map of project-specific traps and verification rules, not as a README for agents.

Only include information that changes agent behavior and is hard to infer from the repo itself.

Workflow

  1. Identify the target scope.
    • Root repo? Monorepo package? Existing CLAUDE.md mirror?
    • If scope is unclear, ask before editing.
  2. Read current evidence.
    • Existing AGENTS.md, CLAUDE.md, README.md
    • Package scripts, test config, CI config, lint/typecheck commands
    • Nearby files only as needed to verify non-obvious conventions
  3. Filter every candidate line.
    • Keep: exact commands, required flags, forbidden substitutions, repeated agent mistakes, deployment/runtime traps, security/performance/UX guardrails, PR/commit checks.
    • Remove: folder tours, stack lists, README duplicates, broad architecture essays, obvious style rules, team background.
  4. Prefer nested files for large workspaces.
    • Root AGENTS.md: routing and global rules only.
    • Subdirectory AGENTS.md: package-specific traps and commands.
    • The closest file should carry the most specific instruction.
  5. Write in Korean by default unless the repo clearly uses English docs.
    • Use bullets and short sections.
    • Keep the file small. Aim for under 80 lines unless the repo genuinely needs more.
    • Each changed line must trace to discovered repo evidence or user-provided constraints.
  6. Verify.
    • Re-read the final file.
    • Check that commands are executable-looking and not invented.
    • Mention any assumptions or missing commands instead of guessing.

Starter Install Command

To install a lean starter AGENTS.md in the current project:

agents-md-init

Useful variants:

agents-md-init /path/to/project
agents-md-init --print
agents-md-init --force

The command writes a cautious starter template only. After installing it, inspect the project and replace placeholders with evidence-backed rules.

Skill Install Command

To install this skill itself:

agents-md-skill install

Useful variants:

agents-md-skill install --scope user
agents-md-skill install --scope project
agents-md-skill install --agent claude --scope user
agents-md-skill install --agent gemini --scope project
agents-md-skill install --agent all --scope user
agents-md-skill install /path/to/project --agent codex --scope project

Default behavior is --scope user --agent codex. Use --force to overwrite an existing installed copy.

Reference

Read references/principles.md when you need the inclusion/exclusion checklist, anti-patterns, or examples.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.