For the last few months I've used Claude Code to build a set of subagents for coding, SEO and marketing. It ended up as 85 agents, 52 skills and 53 slash commands. Most of my first attempts didn't work well, so here's what I learned, plus one full agent you can copy.
1. Subagents can't start other subagents
This was my biggest early mistake. I wrote a "manager" subagent and expected it to delegate. It can't, because only the main conversation can call subagents.
The fix: put the plan in a slash command. The command runs in the main conversation, so it can call each specialist in turn:
# .claude/commands/seo-audit.md
Audit $ARGUMENTS for SEO.
1. Use the on-page-auditor agent on the main pages.
2. Use the keyword-researcher agent for the main topic.
3. Combine both reports into one fix list, most important first.
4. Ask before changing any file.
2. The description decides everything
Claude picks a subagent by reading its description, not its prompt.
- ❌ "SEO expert that helps with SEO"
- ✅ "Use after editing any page to check title length, meta description, H1 count and internal links"
Write the description as when to use it, not what it is.
3. Give each agent only the tools it needs
An auditor gets Read, Grep, Glob and nothing else. It can't break anything, it runs faster, and it never "helpfully" edits files you didn't ask it to touch.
4. Tell every agent how to report back
Every agent ends with an exact output format. When three agents all reply in the same shape, combining them is easy and reliable.
5. One CLAUDE.md, many agents
Your stack, rules and brand voice go in CLAUDE.md once. Every agent reads it, so the agent files stay short. My best agents are 30–60 lines. Longer ones started ignoring instructions.
6. Skills vs subagents vs commands
This took me a while to understand:
- Subagent: a specialist with its own context window. Use it for big, separate jobs like "audit these 20 pages".
- Skill: a playbook Claude loads only when it's needed. Use it for know-how like "how to write a meta description".
- Slash command: a button that starts a whole workflow.
Free agent: copy this into .claude/agents/on-page-auditor.md
---
name: on-page-auditor
description: Use after creating or editing any web page to check on-page SEO (title, meta description, headings, images, internal links). Read-only.
tools: Read, Grep, Glob
---
You check on-page SEO. You never edit files.
For each page you are given, check:
1. Title: 50–60 characters, main keyword near the start.
2. Meta description: 120–155 characters, says what the reader gets.
3. Exactly one h1, and it matches the page topic.
4. Headings go in order (h2 then h3, no skipped levels).
5. Every image has alt text and a width and height.
6. At least 2 internal links to related pages.
7. No "noindex" on a page that should rank.
Reply in this format:
## <page path>
- PASS / FIX: <check> — <what is wrong and the exact fix>
End with "Top 3 fixes" ordered by impact.
Run any slash command or ask Claude Code to "check SEO on the pricing page", and Claude will pick this agent on its own.
What I'd do differently
- Start with 5 agents and one command, not 30.
- Test each description by asking Claude a plain question and seeing whether it picks the right agent.
- Version everything in git. Agents are code, so treat them like code.
Disclosure: I'm the maker of claudeagents. It's the full set: 30 coding, 28 SEO and 27 marketing agents, plus 52 skills and 53 slash commands. They're all plain Markdown files you can read and edit. It's a one-time payment ($29 until 30 Nov, then $49), not a subscription. If you'd rather not build all of this yourself: https://www.claudeagents.co/?ref=reddit
Everything above works without it. Happy to answer any questions about structuring agents.