Guide
How to build your first AI agent in Claude Code: one job, drafts first
Updated · by Rosh Perera
Your first AI agent in Claude Code should do one job you repeat every week, with a written line for what "done" looks like, only the tools that job needs, and your approval before anything leaves your computer. Claude Code lets you define agents (subagents) as Markdown files with a short header: a name, a description of when to use it, and optionally a list of allowed tools (Claude Code docs: subagents). Start with one, run it on real work for a week, and write down every correction. Not sure which job? Our What should my bot do? planner suggests your first three from 5 questions. Claude Code facts come from Anthropic's docs, checked 19 Oct 2026.
Pick your first 3 bots in 5 quick questions →Write your one-page business brief in about 3 minutes →What to hand to an agent first
1. Pick one weekly job
Good first jobs repeat, follow the same steps and are cheap to get wrong: turning your notes into a weekly update, drafting replies to a type of enquiry, or checking a folder of invoices for anything overdue. Skip anything that sends, pays or deletes for now.
2. Write the 'done' line
One sentence the agent can check itself against: "Done = a draft update in drafts/weekly.md under 200 words, with every claim linked to a source file." Without it, the agent can't tell finished from stuck.
3. Give it only the tools that job needs
In the agent file's header, the tools field is an allowlist. An agent that only reads and writes drafts doesn't need Bash or web access. Subagents also load your CLAUDE.md files, so put shared rules there (Claude Code docs: subagents).
4. Keep a correction log
Every time you fix its output, add one line to a corrections.md file and tell the agent to read it first. That's how it gets closer to your standard week by week.
5. Approve before anything leaves
Have it write drafts to a folder and stop. Claude Code's default permission mode prompts you for permission (Claude Code docs: subagents), so keep it on while you're learning what the agent does.
A starter agent file
Save as .claude/agents/weekly-update.md for one project (or ~/.claude/agents/ for all of them): "---\nname: weekly-update\ndescription: Drafts my weekly client update from notes/. Use when I ask for the weekly update.\ntools: Read, Grep, Glob, Write\n---\nYou draft my weekly client update. Read corrections.md first. Use only files in notes/. Write the draft to drafts/weekly.md and stop. Done = under 200 words, every claim linked to a note. Never send, publish or delete anything. If notes are missing, say so in one line."
Not sure which jobs fit your business?
Build my free AI plan →Or get every routine pre-written in the pack →$29 one-time, plus local tax where it applies.
Ready-made use cases
- 01Weekly CEO review & plan
Every Friday the agent compiles wins, numbers, stuck items and proposes next week's priorities.
~2h/week · estimate - 02Weekly client status updates
The agent writes each client a clear progress update from your tasks and messages.
~3h/week · estimate - 03Weekly newsletter written from your week
The agent turns your posts, wins and notes from the week into a ready-to-send newsletter draft.
~3h/week · estimate - 04Monthly bookkeeping prep
The agent categorizes transactions, finds missing receipts and preps a clean summary for your accountant.
~3h/week · estimate
Example: Claude setup
Claude project instructions: Weekly CEO review & plan Cadence: Fridays 16:00 You are my chief of staff / ceo agent. Every Friday, summarize this week: revenue and key metrics vs last week, what shipped, what's stuck, and open loops. Propose the top 3 priorities for next week and one thing I should stop doing. Format as a short memo. Output drafts only; I approve before anything goes out.
Grok Bot, ChatGPT, Claude and n8n versions: all templates
Keep these human
- Keep anything that sends, publishes, pays or deletes out of a first agent.
- Don't paste passwords or API keys into agent files or CLAUDE.md.
Want the whole system pre-written?
The One-Person AI Business Pack: CEO agent + workers, all 46 routines in 4 formats, your role pack.
$29 one-time, plus local tax where it applies.
Next: Whop checkout. $29 one-time, plus local tax where it applies, paid by card on Whop. Files arrive by email.
14-day money-back guarantee: reply to your receipt within 14 days for a full refund.
Built by Rosh Perera, who has set up AI automations for more than 40 businesses over about 3 years.
FAQ
How do I build my first AI agent in Claude Code?
Pick one weekly job, write a 'done' line, and save an agent file in .claude/agents/ with a name, a description and only the tools it needs (Claude Code docs: subagents). Run it on real work for a week and log every correction.
Where do Claude Code agent files go?
In .claude/agents/ for the current project, or ~/.claude/agents/ for all your projects. Only name and description are required in the header (Claude Code docs: subagents).
What should my first Claude Code agent do?
A job you repeat weekly that's cheap to get wrong, like drafting a weekly update from your notes. Our free planner suggests your first three jobs from 5 questions.
How do I stop the agent doing things I didn't want?
Limit its tools in the header, keep the default permission mode that prompts you, and add stop rules to its instructions. Our stop rules guide has a copy-paste list.