agentleFS
ivanrvpereiraivanrvpereira/.agents/skills/on-demand/agents-md/SKILL.md

agents-md

Skill18 starsChanged 3 months agoApache-2.0View on GitHub

Generate, review, and maintain AGENTS.md (or CLAUDE.md) files. Use when creating, auditing, or updating AI agent instruction files for a codebase.

25 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use adr, jira and 1 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • asterkinSkill

    adr

    Create Architecture Decision Records (ADRs) following project standards. Guides template usage, process, and best practices for documenting architecturally significant decisions.

    Also in 3 projects that use this

  • MongoDBSkill

    jira

    Use this skill for any Jira operation in the DOCSP project — creating, viewing, searching, updating, transitioning, commenting on, or linking tickets. Also handles follow-up ticket creation to manage scope creep. TRIGGER when: user mentions a DOCSP-XXXXX ticket number or any Jira ticket URL; user asks to view, open, check, update, transition, close, comment on, link, or search tickets; user references \"the ticket\", \"the Jira\", or \"open a ticket\". SKIP: GitHub issues; non-Jira platforms; questions unrelated to ticket operations.

    Also in 3 projects that use this

  • MicrosoftSkill

    unslop

    Cut AI tells from any writing. Must always apply.

    Also in 3 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

37 rules. 0 are common, 33 are distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 23 edited versions we read keep these.

  • 33

    Distinctive

    This author's own choices. Worth a look.

  • 4

    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
  1. Distinctive:

    Before writing anything, analyze and report:

    line 25
  2. Distinctive:

    Testing setup: Test runner, test locations, coverage tools

    line 31
  3. Distinctive:

    Check for existing files at the project root:

    line 41
  4. Distinctive:

    Prefer file-scoped commands over project-wide builds (per-file is faster and cheaper)

    line 97
  5. Very specific:

    Use file:line references instead of embedding code snippets

    line 100
  6. Distinctive:

    Avoid these in generated AGENTS.md files:

    line 143
  7. Distinctive:

    No filler intros ("Welcome to...", "This document explains...")

    line 146
  8. Distinctive:

    No condescending tone ("You should...", "Remember to...", "Make sure to...")

    line 147
  9. Distinctive:

    No prose paragraphs — use headers, bullets, and code blocks

    line 148
  10. Distinctive:

    No explaining "why" — state the rule, not the rationale

    line 149
  11. Distinctive:

    No duplicating skill content — reference the skill file path instead

    line 150
  12. Distinctive:

    No hallucinated paths — verify every file reference exists before writing

    line 153
  13. Distinctive:

    No restating model knowledge — frontier models already know best practices (e.g., "use descriptive names", "handle errors", "follow DRY").

    line 154
  14. Very specific:

    No restating discoverable info — if the model can find it by reading package.json, tsconfig, file structure, or grepping the codebase, it …

    line 155
  15. Distinctive:

    No negative instructions — mentioning something (even "don't use X") biases the model toward it.

    line 156
  16. Distinctive:

    No placeholder commands — extract real commands or ask the user

    line 157
  17. Distinctive:

    No contradictions between root and sub-files

    line 158
  18. Very specific:

    No stale versions — extract programmatically from package.json/lockfiles

    line 159
  19. Distinctive:

    No listing installed skills or plugins — agents discover these automatically

    line 160
  20. Very specific:

    No embedded code snippets — use file:line references (snippets go stale)

    line 163
  21. Distinctive:

    No vague stack descriptions — include specific versions

    line 164
  22. Distinctive:

    No missing boundaries — always include "Never commit secrets"

    line 165
  23. Distinctive:

    No using LLMs as linters — delegate formatting to tools/hooks

    line 166
  24. Distinctive:

    No uncurated /init output — LLM-generated context files perform worse than no file at all.

    line 167
  25. Distinctive:

    No full project-wide build commands when file-scoped alternatives exist

    line 168
  26. Distinctive:

    No AI attribution rules unless the project explicitly requires them

    line 169
  27. Distinctive:

    Every command is copy-paste ready

    line 177
  28. Distinctive:

    No duplication between root and sub-files

    line 179
  29. Distinctive:

    No AI attribution requirement is added unless explicitly requested

    line 181
  30. Distinctive:

    Read the existing AGENTS.md (and any sub-files)

    line 189
  31. Distinctive:

    Every line passes the "can the model discover this on its own?" test

    line 191
  32. Distinctive:

    No section exceeds 20 lines (extract to sub-file)

    line 194
  33. Distinctive:

    No lines compressible 50%+ without losing meaning

    line 197
  34. Distinctive:

    All anti-patterns from the Generate workflow are absent

    line 202
  35. Distinctive:

    Read the existing AGENTS.md

    line 214
  36. Distinctive:

    Subtract first: Remove lines the model no longer gets wrong, stale references, and anything discoverable from the codebase.

    line 215
  37. Distinctive:

    Verify the file still meets the quality gate from the Generate workflow

    line 218

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

AGENTS.md Generator & Reviewer

Generate, review, and maintain AGENTS.md files optimized for AI coding agents.

Workflow Decision

Determine the task type:

  • Creating a new AGENTS.md? → Follow "Generate" below
  • Reviewing an existing AGENTS.md? → Follow "Review" below
  • Updating an existing AGENTS.md? → Follow "Update" below

Generate

Phase 1: Analyze the Repository

Before writing anything, analyze and report:

  1. Repository type: Monorepo, multi-package, or simple project?
  2. Tech stack: Languages, frameworks, versions, key tools
  3. Major directories needing their own scoped AGENTS.md
  4. Build system: Package manager, workspaces, task runner
  5. Testing setup: Test runner, test locations, coverage tools
  6. Key patterns: Naming conventions, file organization, existing examples
  7. Existing config: Extract commands from Makefile, package.json, pyproject.toml, go.mod, etc.

Present findings to the user before generating files. Ask about any gaps.

Filter ruthlessly: Most of what you discover does NOT belong in the AGENTS.md. Models can read package.json, explore file trees, and grep codebases on their own. Only carry forward information the model can't discover or consistently gets wrong. When in doubt, leave it out — you can always add it later when a real problem surfaces.

Phase 2: Reconcile CLAUDE.md and AGENTS.md

Check for existing files at the project root:

  • No CLAUDE.md exists → Create CLAUDE.md with @AGENTS.md. Continue to Phase 3.
  • CLAUDE.md exists but is just @AGENTS.md → Already correct. Continue.
  • CLAUDE.md has content, no AGENTS.md exists → Rename CLAUDE.md to AGENTS.md, create new CLAUDE.md with @AGENTS.md. Treat the renamed file as an existing AGENTS.md (switch to Update workflow).
  • CLAUDE.md has content AND AGENTS.md exists → Ask the user how to proceed (merge, replace, or keep both).

The end state is always: CLAUDE.md starts with @AGENTS.md, and all agent-agnostic instructions live in AGENTS.md. Claude Code-specific instructions (hooks, MCP servers, slash commands, permissions, rules files, etc.) go in CLAUDE.md after the @AGENTS.md line.

Phase 3: Write the Root AGENTS.md

Target: 30-60 lines for the root file. Maximum 300 lines. Instruction-following quality degrades as document length increases — keep it tight. Every line must be universally applicable — no task-specific content in the root.

Include all essential sections:

# Project Name

## Stack
[Tech stack with specific versions: "React 18, TypeScript 5.3, Vite 5, Tailwind 3.4"]

## Commands
[Copy-paste ready commands with full flags — build, test, lint, typecheck]

## File-Scoped Commands
[Per-file test/lint/typecheck commands — faster and cheaper than full project builds]
| Task | Command |
|------|---------|
| Typecheck | `pnpm tsc --noEmit path/to/file.ts` |
| Lint | `pnpm eslint path/to/file.ts` |
| Test | `pnpm jest path/to/file.test.ts` |

## Structure
[Directory layout with purposes and access levels (read/write/never modify)]

## Conventions
[Code style via concrete examples referencing actual project files, not prose]
[Naming: functions, classes, constants with real examples from the codebase]

## Git
[Commit format, branching strategy, PR process]

## Boundaries

### Always
[Mandatory practices for every session]

### Ask First
[Actions requiring human approval]

### Never
[Absolute prohibitions — always include "Never commit secrets"]

Key rules:

  • Commands must be copy-paste ready with full syntax
  • Prefer file-scoped commands over project-wide builds (per-file is faster and cheaper)
  • Reference actual project files (src/components/Button.tsx), not hypothetical ones
  • Delegate code formatting to tools/hooks, not instructions
  • Use file:line references instead of embedding code snippets

Phase 4: Write Scoped Sub-Files

For each major subsystem (app, service, package), create a scoped AGENTS.md:

# Package Name

## Purpose
[1-2 lines: what it does, primary tech]

## Commands
[Package-specific: dev, build, test, lint]

## Patterns
[Concrete examples with actual file paths]
- DO: Pattern from `src/components/Button.tsx`
- DON'T: Anti-pattern like `src/legacy/OldButton.tsx`

## Key Files
[Important files to understand the package]

## Gotchas
[Non-obvious pitfalls specific to this package]

Sub-files should have MORE detail than the root — they're only loaded when the agent works in that directory.

Phase 5: Present Output

Present files in order with paths:

--- File: AGENTS.md (root) ---
[content]

--- File: apps/web/AGENTS.md ---
[content]

Anti-Patterns

Avoid these in generated AGENTS.md files:

Writing style:

  • No filler intros ("Welcome to...", "This document explains...")
  • No condescending tone ("You should...", "Remember to...", "Make sure to...")
  • No prose paragraphs — use headers, bullets, and code blocks
  • No explaining "why" — state the rule, not the rationale
  • No duplicating skill content — reference the skill file path instead

Content quality:

  • No hallucinated paths — verify every file reference exists before writing
  • No restating model knowledge — frontier models already know best practices (e.g., "use descriptive names", "handle errors", "follow DRY"). Only document project-specific deviations from standard practice.
  • No restating discoverable info — if the model can find it by reading package.json, tsconfig, file structure, or grepping the codebase, it doesn't belong in the AGENTS.md. Only include what the model can't find or consistently gets wrong.
  • No negative instructions — mentioning something (even "don't use X") biases the model toward it. Remove the topic entirely, or restructure the codebase so the wrong path is harder to reach.
  • No placeholder commands — extract real commands or ask the user
  • No contradictions between root and sub-files
  • No stale versions — extract programmatically from package.json/lockfiles
  • No listing installed skills or plugins — agents discover these automatically

Structure:

  • No embedded code snippets — use file:line references (snippets go stale)
  • No vague stack descriptions — include specific versions
  • No missing boundaries — always include "Never commit secrets"
  • No using LLMs as linters — delegate formatting to tools/hooks
  • No uncurated /init output — LLM-generated context files perform worse than no file at all. Always manually review and strip auto-generated content down to only what the model can't discover on its own.
  • No full project-wide build commands when file-scoped alternatives exist
  • No AI attribution rules unless the project explicitly requires them

Quality Gate

Before presenting, verify:

  • CLAUDE.md exists with @AGENTS.md
  • Root file is under 300 lines (ideally 30-60)
  • Root links to all sub-files
  • Every command is copy-paste ready
  • Examples reference real project paths
  • No duplication between root and sub-files
  • "Never commit secrets" or equivalent is present
  • No AI attribution requirement is added unless explicitly requested

Review

Process

  1. Read the existing AGENTS.md (and any sub-files)
  2. Evaluate against these criteria:
    • Every line passes the "can the model discover this on its own?" test
    • Commands are copy-paste ready and actually run
    • File references point to paths that exist
    • No section exceeds 20 lines (extract to sub-file)
    • Root file is under 300 lines, ideally 30-60
    • No duplication between root and sub-files
    • No lines compressible 50%+ without losing meaning
    • Boundaries include "never commit secrets" and read-only dirs
    • Destructive/production actions gated behind "ask first"
    • File-scoped commands are preferred over project-wide builds
    • No AI attribution requirement is added unless explicitly requested
    • All anti-patterns from the Generate workflow are absent
  3. Propose a rewritten AGENTS.md (or diff) fixing every issue found
  4. For each change, include a one-line rationale

Output Format

Present the proposed rewrite as a complete file (or files), not a report card. Precede it with a short summary of what changed and why.


Update

  1. Read the existing AGENTS.md
  2. Subtract first: Remove lines the model no longer gets wrong, stale references, and anything discoverable from the codebase. With each model generation, agents need less steering — prune aggressively.
  3. Identify what changed in the codebase (new packages, changed commands, updated stack)
  4. Apply changes while preserving manual content
  5. Verify the file still meets the quality gate from the Generate workflow

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.