skills/writing-agents-md/SKILL.md
Use when the user asks to create, review, audit, migrate, or update an AGENTS.md file for a repository, package, subproject, or monorepo. This skill writes agent-facing repository guidance grounded in project evidence, including setup, build/test commands, code style, testing, security, PR rules, nested AGENTS.md scope, and instruction precedence.
npx skillsauth add narumiruna/agent-skills writing-agents-mdInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Create, review, or revise AGENTS.md: a standard Markdown "README for agents" that gives coding agents the project-specific context they need without cluttering the human README.
Before writing, inspect the repository instead of guessing:
README.md, CONTRIBUTING.md, current AGENTS.md, package-level docs, .github/workflows/*, config files, and obvious build manifests (package.json, pyproject.toml, Cargo.toml, go.mod, justfile, Makefile, etc.).AGENTS.md, preserve correct project-specific rules and remove stale or unverifiable claims.When asked to review an existing AGENTS.md instead of drafting one:
AGENTS.md files or explicit user directions.Findings, Suggested edits, Verified evidence, Open questions.AGENTS.md is plain Markdown; do not add YAML frontmatter or required-field scaffolding to the generated file.AGENTS.md; add package-level files only when scoped instructions differ or the user asks for a specific subproject.AGENTS.md files apply, the closest file to the edited path takes precedence.AGENTS.md files in packages/subprojects instead of one overloaded root file. Root files should describe global rules and point to scoped files.AGENTS.md; when the user specifies a package or subdirectory, place it in that scope.# Repository Guidelines is a good default unless the repo already uses another title.Choose sections that match the repository; omit empty or irrelevant sections. The core coverage from agents.md is: project overview, build and test commands, code style guidelines, testing instructions, security considerations, and extra teammate-like instructions such as commit/PR rules, deployment gotchas, large datasets, or migration steps.
AGENTS.md files override root guidance.AGENTS.md owns repo-wide safety rules and CI gates; packages/api/AGENTS.md owns API migrations and schema tests; packages/web/AGENTS.md owns UI screenshots and browser checks.package.json scripts, just --list, make help, lockfiles, or CI jobs; if a command cannot be confirmed, leave it out or mark it as an example..env.example, local mocks, dry-run flags) when available.AGENTS.md; optionally leave a symlink for tools that still expect the old name, e.g. mv AGENT.md AGENTS.md && ln -s AGENTS.md AGENT.md.read: AGENTS.md or Gemini CLI context.fileName).Before finishing:
development
Maintains concise repository MEMORY.md notes for gotchas, stale memory corrections, and durable user preferences. Use at the start of repository conversations, when the user mentions MEMORY.md, when an error should be remembered to avoid repeating it, or when MEMORY.md content may be wrong.
testing
Use only when the user explicitly names the work-log-writer skill; never auto-activate from generic work log, daily log, EOD summary, status update, or date-range summary requests.
development
Use when implementing non-trivial code changes that should follow TDD (write a failing test first, make the smallest passing change, then refactor safely).
tools
Use when designing, implementing, reviewing, or debugging Codex CLI hooks, including `hooks.json`, `.codex/hooks.json`, feature-flag setup, matcher behavior, event-specific stdin/stdout payloads, and hook scripts for `SessionStart`, `PreToolUse`, `PostToolUse`, `UserPromptSubmit`, or `Stop`.