Analyze repository structure and generate or update standardized AGENTS.md files that serve as contributor guides for AI agents. Supports both single-repo and monorepo structures. Measures LOC to determine character limits and produces structured documents covering overview, folder structure, patterns, conventions, and working agreements. Update mode refreshes only the standard sections while preserving user-defined custom sections. Use when setting up a new repository, onboarding AI agents to an existing codebase, updating an existing AGENTS.md, or when the user mentions AGENTS.md.
Create, optimize, update, and validate AGENTS.md files with maximum token efficiency. Use when the user asks to (1) create new AGENTS.md files for any repository, (2) optimize/condense existing AGENTS.md to reduce token count, (3) update/refresh AGENTS.md to sync with codebase changes, (4) validate AGENTS.md quality and completeness, or (5) improve AGENTS.md files to be more effective for AI agents. Always generates token-efficient, condensed output focused on actionable commands and patterns while maintaining model-agnostic language.
Use this skill for any request to create, update, review, or improve files that guide AI coding tools—like AGENTS.md, Copilot context files, or agent instructions. Trigger when users want to help AI generate code that matches project conventions, avoids common mistakes, or understands non-obvious rules—whether for a whole repo, a subdirectory, or a specific component. Also use for queries about setting up Copilot or Cursor context, onboarding AI to team practices, or keeping agent guidance up to date—even if AGENTS.md isn't mentioned by name. --- # AGENTS.md Skill `AGENTS.md` is the README for AI coding agents — it gives tools like GitHub Copilot, Cursor, and Claude Code the context they need to produce code that fits your project, without constant back-and-forth correction. ## The Golden Rule: Only Include Non-Obvious Things This is the most important principle. Before adding any line, ask: **"Could an agent figure this out by reading the code or config files?"** If yes — skip it. Agents can read `package.json`, `pyproject.toml`, `*.csproj`, directory structures, imports, and existing code. AGENTS.md is for the things that *aren't* visible there: - Project-specific conventions not enforced by any linter or analyzer - "Never do X" patterns that *look* reasonable but are wrong in this codebase - Commands that are non-standard or require project-specific flags - Domain terminology or architectural choices that need explanation - Common mistakes agents actually make here (discovered from experience) - Security constraints and rules that must never be violated **Redundant content actively degrades quality** — it wastes the agent's context window and dilutes real signal with noise it already has. ## Two Shapes of AGENTS.md ### Root-level `AGENTS.md` (repo root)
Generate machine-specific AGENTS.local.md with host facts and system tool details
Evaluate and optimize AGENTS.md/CLAUDE.md instruction files through A/B testing. Use when the user says "eval my agents.md", "test my claude.md", "optimize my instructions", "which rules matter", "trim my agents file", or wants to know which instructions in their global config actually change model behavior vs. are dead weight.