hermes

Write an AGENTS.md

Writes or updates a repository's AGENTS.md with the verified commands, layout, conventions and boundaries a coding agent needs, and nothing generic. Use when setting up a repo for coding agents.

context

AGENTS.md is the instruction file that coding agents read at the start of every session (several tools read it directly; others read CLAUDE.md, GEMINI.md or their own rules files, which can point to it). Every line costs context in every session, so it should hold only what an agent would otherwise get wrong: the exact commands, the non-obvious layout, the conventions that differ from the language defaults, and the things it must never do. Generic advice ("write clean code", "add tests") is ignored and wastes space. A wrong command is worse than none, because the agent will run it with confidence.

task

Write AGENTS.md for the repository in the working directory. Only if [NOTES] is given: Rules from the maintainers:

  1. Read what exists: any AGENTS.md, CLAUDE.md, GEMINI.md, .cursor/rules/, .github/copilot-instructions.md, CONTRIBUTING and README. If an AGENTS.md exists, update it and keep accurate content.
  2. Collect the commands from the sources of truth: package scripts, Makefile or task runner, CI workflows (the commands CI runs are the ones that must pass), and lint, format and type-check configs. Include how to run a single test, not only the whole suite.
  3. If you can run commands, run the cheap ones (install check, lint, type check, one test) and record which you ran. Mark the ones you could not run.
  4. Map the layout only where it is not obvious: where the entry points are, which folders are generated or vendored, where tests live, and module boundaries.
  5. Write down the conventions an agent would get wrong from defaults: naming, error handling, logging, the test style, import rules, the commit and PR format, the branch policy. Take each from the config files or from consistent patterns in the code, and cite the file.
  6. Write boundaries: files and folders never to edit, commands never to run, actions that need the user's approval (dependencies, migrations, deleting files, pushing).
constraints
  • Every command must come from the repo's scripts, CI or docs. Never invent a script name or flag.
  • No generic advice, no restating the README, no product description beyond one line.
  • Keep it under about 120 lines. Prefer short imperative bullets.
  • Do not include secrets, tokens, internal hostnames or personal data.
  • Do not create tool-specific files (CLAUDE.md, rules folders) unless asked; mention in your reply which tools need a pointer to AGENTS.md.
  • Do only what was asked. If you notice something else worth changing, mention it in one line at the end instead of changing it.
  • Keep the change as small as it can be while still being correct.
output format

Write AGENTS.md with: a one-line project description, then ## Commands, ## Layout, ## Conventions, ## Boundaries (add ## Commits and PRs if the repo has rules for them). Then reply with: the commands you ran and their real results, the commands you could not verify, and anything in the existing instruction files that contradicted the code.

Every required value is filled in. Copy gives the finished prompt.

details

kind
Prompt: a task you run by name to get one finished thing back
domain
Software engineering
category
Coding-agent operations
level
Intermediate
made for
Software engineer, Tech lead / staff engineer, Open-source maintainer
needs
repo-read, file-write
risk
runs-commands
version
v1.0.0 · experimental
reviewed
2026-10-02
works in
Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Antigravity, OpenCode, Windsurf, Zed, Continue, AGENTS.md

Edit on GitHubReport a problem

use in

Hodios CLI
npx @hermes-hq/hodios install write-agents-md --target claude-code
Agent Skills
npx skills add hermes-hq/hodios-dist --skill write-agents-md -a claude-code
Add the Hodios marketplace (once)
claude plugin marketplace add hermes-hq/hodios-dist
Install the software-engineering plugin
claude plugin install hodios-software-engineering@hodios

The plugin brings every entry in this domain at once.

more in coding-agent operations

All of Coding-agent operations
PromptCoding-agent operations

Review a coding agent transcript

Reviews a coding agent session transcript for where it went wrong (bad assumptions, skipped verification, scope creep, looping) and turns each failure into an instruction-file or prompt change.

review-agent-transcript
PromptCoding-agent operations

Write an agent handoff

Writes a self-contained handoff note so a fresh agent or a teammate can continue the current task without the conversation history. Use before ending a long session, switching tools or delegating.

write-agent-handoff
PromptCoding-agent operations

Write an agent skill

Writes a reusable agent skill (SKILL.md with frontmatter, steps, scripts and references) from a repeated task, with a trigger description models can match and a test plan. Use to package a workflow.

write-agent-skill
PromptCoding-agent operations

Write a subagent brief

Turns a task into a self-contained brief for a subagent or parallel agent, with the goal, context, scope, constraints, return format and definition of done. Use before delegating to another agent.

write-subagent-brief
PromptCoding-agent operations

Audit a coding agent's permissions

Reviews a coding agent's tool, permission and sandbox configuration for shell, network, secrets and write-scope risk, and proposes least privilege. Use before giving an agent more autonomy.

audit-agent-permissions