Agent skill · Documentation

agent-design-best-practices

Best practices for designing Claude Code agent files (.claude/agents/*.md). This skill should be used when writing or reviewing agent markdown files to ensure proper design with focused domains, correct tool access, reusable definitions, and separation of capabilities from lifecycle. Combines Anthropic's official guidance with battle-tested patterns from agent team usage.

majiayu000github.com/majiayu000GitHub ↗
claude-codeMIT
Install
npx skills add majiayu000/claude-skill-registry --skill agent-design-best-practices --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 9 KB
Bundled scripts: none
Path: skills/agent/agent-design-best-practices/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 534
Language: HTML

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Agent Design Best Practices ## Overview This skill defines best practices for designing Claude Code agent files (`.claude/agents/*.md`). Agent files define reusable roles that can be spawned as subagents or teammates. The core principle is that **agent files define capabilities, not lifecycle** -- the team lead's spawn prompt controls when and how the agent runs. ## Principles ### 1. Define Capabilities, Not Lifecycle Agent files describe *what* an agent can do. The spawn prompt from the team lead controls *when* it runs and *what to focus on*. ```markdown <!-- Wrong: Hardcodes workflow phase and interaction pattern --> # Security Planner Agent You are a security specialist in a plan-create Agent Team. Given a Research Brief from the team lead, identify security considerations for the planned changes. ## Output Format Send your sub-plan to the team lead via `SendMessage` with this structure: ... ``` ```markdown <!-- Correct: Defines domain expertise, team lead controls usage --> # Security Specialist Agent You are a security specialist who identifies vulnerabilities, evaluates threats, and recommends mitigations for code changes. ## Analysis Process 1. Read affected files 2. STRI

What's inside
Steps it walks through
  1. Overview
  2. Principles
  3. 1. Define Capabilities, Not Lifecycle
  4. 2. One Agent Per Domain, Not Per Phase
  5. 3. Design Focused Domains
  6. 4. Write Detailed Descriptions
  7. 5. Limit Tool Access
  8. 6. No Hardcoded Interaction Patterns
  9. 7. Context Window Isolation
  10. 8. File Ownership in Teams
  11. Agent File Structure
  12. Required Frontmatter
  13. Optional Frontmatter
  14. Body Structure
Ships with 1 file
  • metadata.json
More from claude-skill-registry
All skills →
About this skill
What does the agent-design-best-practices skill do?

Best practices for designing Claude Code agent files (.claude/agents/*.md). This skill should be used when writing or reviewing agent markdown files to ensure proper design with focused domains, correct tool access, reusable definitions, and separation of capabilities from lifecycle. Combines Anthropic's official guidance with battle-tested patterns from agent team usage.

How do I install it?

Run `npx skills add majiayu000/claude-skill-registry --skill agent-design-best-practices --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going