AI Coding Agents¶
The repository contains instructions for AI coding agents. There is one source for them, so that several tools can use the same text.
Layout¶
AGENTS.md # instructions shared by all agents
CLAUDE.md # Claude Code adapter, only imports AGENTS.md with "@AGENTS.md"
.agents/skills/<skill-name>/SKILL.md # skills, the only copy of their content
.claude/skills/<skill-name> # relative symlinks to ../../.agents/skills/<skill-name>
AGENTS.mdstarts with the rules that are never negotiable, then describes the project, its conventions, the commands, how to choose the checks for a change, the adversarial review required before a pull request, the git rules for sessions that share a checkout, and the precautions for commands that read or change real GitHub organizations. It summarises this documentation: when a technical description diverges from it, updateAGENTS.md; when the documentation contradicts one of its rules (safety, git, contribution), report the gap instead of weakening the rule.- A skill is a procedure for one kind of task, written in the open
Agent Skills format: a folder with a
SKILL.mdfile that starts with a YAML frontmatter holdingnameanddescription.AGENTS.mdlists the available skills and when to use each one.
Edit only AGENTS.md and the files in .agents/skills/. CLAUDE.md and .claude/skills/ are adapters and hold no
instructions of their own.
Portable format, tool-dependent discovery¶
The format is portable: AGENTS.md and SKILL.md are plain Markdown, and any agent can follow them once it reads
them. Whether a tool finds them on its own depends on the tool and its version:
- Some tools read
AGENTS.mdand.agents/skills/automatically; others do not, or use their own file names or folders. Check the documentation of your tool. - Claude Code is set up by this repository: it reads
CLAUDE.md, which importsAGENTS.md, and discovers the skills through the symlinks in.claude/skills/. It may pick a skill from its description, or you can invoke it as/<skill-name>. - With a tool that discovers neither file, tell the agent to read
AGENTS.md, and point it to theSKILL.mdthat fits the task, e.g. "follow.agents/skills/github-config-property/SKILL.md".
The symlinks need a checkout that supports them. On Windows, enable symlinks in git (core.symlinks) and in the
system; otherwise git checks each link out as a small text file that contains its target path.
Adding a skill¶
- Check that the task needs its own procedure. General rules belong in
AGENTS.md; a skill holds the steps for one recurring kind of change, with references to the files involved. -
Create
.agents/skills/<skill-name>/SKILL.md. The name uses lowercase letters, digits and hyphens, and is identical in the folder name and thenamefield: -
Keep it short and specific to otterdog. Refer to
AGENTS.mdfor the shared conventions, commands and safety rules instead of repeating them. Use only the standard fieldsnameanddescription, and no features specific to one tool, such as Claude-only frontmatter keys, tool names, or variables like${CLAUDE_*}. -
Add the symlink for Claude Code, and check that it resolves:
-
Add the skill to the table of the "Skills" section of
AGENTS.md. - Run
poetry run prek run --files <new files>. A skill is documentation for agents, so it needs no tests, but its paths and commands must exist in the repository.
To change a skill, edit its SKILL.md in .agents/skills/. The symlink follows automatically. To remove a skill,
delete its folder, its symlink, and its row in AGENTS.md.