mcpField
A
agent-conventions

agent-conventions

github.com/wyattowalshAgent workflows566 installsUpdated 9w ago
Repository

About agent-conventions

agent-conventions is a skill for creating and editing AI agent definitions. It provides naming, frontmatter, README indexing, and validation rules, along with a scaffolding command.

Key features

  1. 01Required and optional frontmatter rules
  2. 02Agent naming and body conventions
  3. 03README index maintenance
  4. 04Scaffolding and validation commands

Use cases

  1. 01Create a new agent definition
  2. 02Check agent metadata and index updates
  3. 03Revise an existing agent system prompt

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/wyattowalsh/agents --skill agent-conventions

After installing, type/agent-conventionsin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

evals/
agent-creation-trigger.json
evals.json
readme-sync.json
references/
readme-template.md
scripts/
check.py
scaffold_agent.py
validate_agent.py
validate-agent-index.py
scripts/asset_toolkit/
__init__.py
_shared.py
common.py
package.py
validate_evals.py
validate_hooks.py
validate_skill.py

Details

From the project README

Agent Conventions

Apply these conventions when creating or modifying AI agent definitions.

Dispatch

$ARGUMENTSAction
Active (auto-invoked when working on agent files)Apply all conventions below
EmptyDisplay convention summary
checkRun validation checks only

References

FilePurpose
references/readme-template.mdTemplate for agent README.md index entries

Scaffolding

Create new agent definitions with:

python skills/agent-conventions/scripts/scaffold_agent.py <name>

Conventions

Required Frontmatter

Every agent file must include these fields in YAML frontmatter:

  • name -- kebab-case, must match filename without .md
  • description -- non-empty, describes the agent's purpose
Optional Frontmatter
  • tools -- comma-separated tool allowlist (default: all)
  • disallowedTools -- comma-separated tool denylist
  • model -- sonnet | opus | haiku | inherit (default: inherit)
  • permissionMode -- default | acceptEdits | delegate | dontAsk | bypassPermissions | plan
  • maxTurns -- integer cap on agentic turns
  • skills -- list of skills preloaded into agent context
  • mcpServers -- list of MCP servers available to this agent
  • memory -- user | project | local
  • hooks -- lifecycle hooks scoped to this agent

Memory field conventions:

  • Choose the narrowest memory scope: local for temporary insights, project for shared patterns, user for cross-project preferences
  • Keep memory entrypoint files under 200 lines — content beyond this is truncated at load time
  • Organize memory by topic (e.g., debugging.md, api-patterns.md), not chronologically
  • Use MEMORY.md as the index file; create separate topic files for detailed notes
Naming
  • All agent names use kebab-case: ^[a-z0-9][a-z0-9-]*$
  • Filename (without .md) must match the name frontmatter field exactly
  • No consecutive hyphens, no leading/trailing hyphens
README Index Requirement

When defining a new agent at any level:

  • ~/.{gemini|copilot|codex|claude}/agents/
  • .claude/agents/ (project-level)
  • Project-local agent directories

Update the corresponding README.md index in the same directory:

  1. Add a row to the index table with agent name, description, and key fields
  2. Add a description section with usage details
  3. Keep the table sorted alphabetically by name
Body Content
  • Write the system prompt in imperative voice ("Check the logs" not "Checks the logs")
  • Keep agent definitions focused on a single responsibility
  • Reference skills by name rather than inlining their content

Critical Rules

  1. Always update the README.md index when adding or modifying an agent
  2. Name every agent in kebab-case matching its filename exactly
  3. Include both name and description in frontmatter -- they are required
  4. Never duplicate agent functionality -- check existing agents first
  5. Keep agent system prompts under 500 lines for maintainability
  6. Run python scripts/validate_agent.py --check-index after any agent frontmatter change
  7. Use imperative voice throughout the agent body text

Canonical terms (use these exactly):

  • agent -- an AI agent definition file in agents/ directory
  • frontmatter -- YAML metadata between --- delimiters
  • system prompt -- the markdown body after frontmatter
  • index table -- the markdown table in README.md listing all agents
  • kebab-case -- lowercase words separated by hyphens

Validation Contract

Before declaring changes to this skill complete, run:

python skills/agent-conventions/scripts/check.py

Completion criteria:

  1. scripts/check.py exits 0.
  2. Agent frontmatter changes pass scripts/validate_agent.py --check-index.

Comments

Markdown supported