agentleFS
pauloribeiro16pauloribeiro16/my-skills/agents-md-writer/SKILL.md

agents-md-writer

Skill1 starsChanged 6 months agoMITView on GitHub

Use when creating, updating, or improving AGENTS.md files. Trigger phrases: write agents.md, update agents.md, create onboarding file, improve agent instructions, write CLAUDE.md, project onboarding.

  • Commits and pushes

4 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

13 rules. 0 are common, 13 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 13

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Six core areas: every AGENTS.md must cover: Commands, Testing, Structure, Style, Git, Boundaries.

    line 25
  2. Distinctive:

    Every AGENTS.md should include a skills section explaining how skills are activated:

    line 68
  3. Distinctive:

    If >150 lines → condense or split.

    line 103
  4. Distinctive:

    Before making changes to an AGENTS.md file, evaluate its current state:

    line 111
  5. Distinctive:

    Read the entire AGENTS.md file.

    line 128
  6. Distinctive:

    Check line count and structure.

    line 129
  7. Distinctive:

    When working with hierarchical AGENTS.md structures:

    line 136
  8. Distinctive:

    Root File: Keep general rules, commands, and boundaries.

    line 138
  9. Distinctive:

    Links: Use cross-references between files.

    line 140
  10. Distinctive:

    Avoid Duplication: Ensure information isn't repeated across files.

    line 141
  11. Distinctive:

    Size Limits: All files ≤150 lines (root and sub-files share the same limit).

    line 142
  12. Distinctive:

    When converting between hierarchical and simple structures:

    line 146
  13. Distinctive:

    Iterate: Update when the agent makes the same mistake twice.

    line 157

“Common” is measured: kept by at least 6 in 10 of the 4 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

Writes effective AGENTS.md files — a "README for machines" with structured technical guidance for AI coding agents. Based on analysis of 2,500+ repositories, OpenAI Codex, and GitHub Copilot best practices.

When to Use

  • Creating a new AGENTS.md for a project.
  • Updating or reviewing an existing AGENTS.md.
  • Converting CLAUDE.md / .cursorrules / copilot-instructions.md to AGENTS.md.
  • Splitting a large AGENTS.md into hierarchical sub-files.
  • Auditing whether an AGENTS.md is current (commands still work, structure still matches).

When NOT to Use

  • Human-facing project documentation → write a README.md, not AGENTS.md.
  • Skill authoring (SKILL.md files in ~/.zcode/skills/) → skill-creator (the official plugin version).
  • Agent definition files (with tools:, skills:, color:) → they are a different schema.

Hard Rules

  1. All AGENTS.md files must be ≤150 lines. Root and sub-files share the same limit. Larger → condense or split.
  2. Six core areas every AGENTS.md must cover: Commands, Testing, Structure, Style, Git, Boundaries.
  3. Never include secrets. Reference where they live, not the values.
  4. Commands must be copy-pasteable. Exact commands with flags, not "run the tests."
  5. File-scoped commands first. Full suite only as fallback.
  6. Code examples over explanations. One snippet beats three paragraphs.
  7. Document how skills are activated in a dedicated section, because agents need to know how to load them.
  8. Complements README.md: AGENTS.md is for machines; do not duplicate human-oriented content.
  9. Treat AGENTS.md as code, not documentation: update on PR, audit quarterly, update immediately when commands/structure change, and update when the agent makes the same mistake twice.

Examples

Good vs. vague command:

# Good — file-scoped, exact flags
pnpm vitest run src/lib/format.test.js

# Vague — agent has to guess
"run the tests"

Good vs. bad Boundaries:

## Boundaries
- **Always:** Run tests before finishing, write scratch files to tmp/
- **Ask first:** Adding dependencies, modifying package.json
- **Never:** git commit, git push, create files outside the defined structure

Six Core Areas

PriorityAreaWhat to Include
1CommandsSetup, file-scoped tests/lint, full suite. Exact with flags.
2TestingFramework, how to run single file + full suite, coverage target.
3Project StructureKey directories with one-line descriptions.
4Code StyleNaming, formatting, good/bad examples.
5Git WorkflowBranch naming, commit format, PR requirements.
6BoundariesThree tiers: Always / Ask first / Never.

Skills Section in AGENTS.md

Every AGENTS.md should include a skills section explaining how skills are activated:

## Skills (Activate on Demand)

Skills are loaded via the `skill` tool. When a task matches a skill's
description, call `skill({ name: "skill-name" })` to load its instructions.

| Skill | When |
|-------|------|
| **skill-name** | Trigger description |

Separate global skills from project-local skills when both exist.

Workflow

1. Evaluate

Assess the current AGENTS.md structure and content: is it hierarchical or simple? What patterns exist? What must be preserved?

2. Analyze

Detect build system, test framework, package manager, tech stack from package.json, lockfiles, folder structure, and any existing config.

3. Plan

Determine changes needed while preserving existing patterns. Identify what goes in the root vs. sub-AGENTS.md.

4. Write

Commands first, then structure, style, boundaries. Keep the file lean.

5. Check Size

If >150 lines → condense or split. Do not ship an oversized AGENTS.md.

6. Validate

Can an agent setup, test, build, and deploy from this file alone? If not, the file is incomplete.

Evaluation Guidelines

Before making changes to an AGENTS.md file, evaluate its current state:

  1. Structure Type: Determine if it's hierarchical or simple.
  2. Consistency Check: Identify patterns to maintain.
  3. Change Impact: Assess what needs to be preserved.

Hierarchical vs Simple

AspectHierarchicalSimple
Size≤150 lines per file≤150 lines
ScopeMultiple domainsSingle domain
OrganizationSplit into sub-AGENTS.mdSingle file
Use CaseComplex projectsSimple projects

Evaluation Process

  1. Read the entire AGENTS.md file.
  2. Check line count and structure.
  3. Identify existing patterns and conventions.
  4. Determine if changes should maintain hierarchy or simplify.
  5. Note sections that should be preserved or updated.

Maintaining Hierarchical Consistency

When working with hierarchical AGENTS.md structures:

  1. Root File: Keep general rules, commands, and boundaries.
  2. Sub-files: Maintain domain-specific content.
  3. Links: Use cross-references between files.
  4. Avoid Duplication: Ensure information isn't repeated across files.
  5. Size Limits: All files ≤150 lines (root and sub-files share the same limit).

Transition Guidelines

When converting between hierarchical and simple structures:

  1. Hierarchical to Simple: Consolidate content from sub-files; remove redundancy; preserve critical sections.
  2. Simple to Hierarchical: Identify logical domains; create sub-files; keep root file general.

Writing Style for AGENTS.md

  • Be specific: "React 18 with TypeScript, Vite, Tailwind" not "React project".
  • Show examples: Good code vs. bad code with concrete snippets.
  • Put commands early: Setup and test commands before explanations.
  • Think like onboarding: What would a new teammate need for their first PR?
  • Iterate: Update when the agent makes the same mistake twice.

Common Mistakes

MistakeFix
Too verbose (>150 lines)Condense or split into subdirectory files
Vague commandsUse exact commands: pytest tests/unit/ not "run tests"
No boundariesAdd Always/Ask/Never section
Including secretsReference location, never the value
Forcing full buildsProvide file-scoped commands first
No code examplesAdd good/bad snippets
Outdated infoReview in PRs, treat as living code

References

  • references/ecosystem.md — Adoption, tool compatibility, parsing differences (Codex, Copilot, Cursor, Claude).
  • references/patterns.md — Codex workflow patterns, GitHub agent best practices, prompt structure, maintenance.
  • references/security.md — Security deep dive, scanning tools, CI/CD gates, deployment validation.
  • references/template-minimal.md — Simple project template (~85 lines).
  • references/template-comprehensive.md — Complex project template with tech patterns (~400 lines).

Quick Reference

AGENTS.md = Commands + Structure + Style + Testing + Git + Boundaries.
All files ≤150 lines. Commands first. Show examples. Never secrets.
Split when >150 lines or monorepo. Nearest file wins.

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.