Skip to main content
Handbook/Automate/Page 77 · Configuration

Standing Up Your Agents

Share

Share this page

Pass it to someone who needs it.

Star on GitHub

Key takeaway: Give each agent a role in a file

An agent with no configuration is a stranger who shows up every morning having forgotten the job. Configuration is the file that hands it the job description before it starts. You already wrote your project's rules; this chapter defines a specific agent with a role of its own.

9.5.1Give each agent a role

A role is a small file, not a paragraph you retype into chat each time. In Claude Code it lives in .claude/agents/, and every serious tool has the same idea: a YAML frontmatter block, the settings at the top, plus instructions.

--- name: reviewer description: Reviews code after it's written. Use before any commit. tools: Read, Grep, Glob --- You review for correctness, security, and style. You do not write features and you do not refactor. Report issues by severity, then stop. A hardcoded secret is a blocking issue.

That is a coworker defined in a file your project keeps, not a mood you set and lose each session.

Hint: Each agent runs on a model, and the best model for one job is rarely the best for every job. Route your agents through OpenRouter, one account across most models. That way you can match a model to a role and swap as the leaders change, without locking your whole system to a single vendor.

9.5.2Skills and rules per agent

A role carries two kinds of attachment, and you keep them as separate files so they compose. A skill is a procedure loaded only when the task needs it. A rule is a hard line, always on.

.claude/ agents/reviewer.md (the role) skills/security-review.md (loaded when reviewing auth code) rules/no-secrets.md (always on, every turn)

That layout is Claude Code's; every serious tool has an equivalent folder. You never pour all of it into one giant prompt. You attach the right skill to the right role and let the rest stay out of the way until it is needed.

9.5.3Point skills at your docs, don't copy them

Some knowledge is heavy or shared: your API's rules, the architecture you wrote down, the conventions the whole project follows. Do not paste it into a skill. Keep one doc as the single source of truth and have the skill point to it: follow the API contract in docs/api.md.

Copy the knowledge instead and the two versions drift the day one of them changes. A pointer stays true, because there is only one copy left to update.

Every skill and rule points at one doc, so nothing drifts when it changes.

9.5.4Let the agent write its own skills

You will not sit down and author these. The useful ones get written the moment something is learned, and the agent is the one who learns it.

Give it one standing instruction: when I correct the same thing twice, write it into the skill that covers it, or start a new skill if none does. The second correction is the trigger, because the first might be a one-off and the third is one too many.

That is what makes the system compound. The deploy quirk you explained in March is in the deploy skill by April, and nobody explains it again.

Watch out: bound this or you get a hundred skills nobody loads. A skill earns its place when it is a repeatable procedure or a hard-won fact, not when it is a preference you happened to voice once.

9.5.5Configuration keeps output consistent

Unconfigured agents drift: the same request gives a different shape of answer on Monday and Friday. A rule file pins the shape:

# rules/output.md - Answer in bullets, never a wall of text. - Back every claim about the system with a command you ran. - No "should be" or "probably". Check, then state.

Now the quality bar lives in a file, not in your memory of how you happened to ask last time.

Without a rule the same request drifts in shape; a rule file pins it the same every time.

9.5.6Write it once, reuse everywhere

Configuration is an asset, not a chore. The role you define today serves every task that agent ever runs, and the rule you write once fires on every future turn.

An hour spent standing an agent up correctly pays back on every job it does after. You are not configuring a task, you are configuring an employee, and the file is committed alongside the code it governs.

This prompt has your agent write its own role file, in your tool's format:

Ready prompt
Act as a senior engineer configuring my agents. Create a role file for a reviewer agent, in the format my tool uses and in the folder my operating base already keeps agents in: frontmatter with name, description, and the minimum tools it needs, then standing instructions to review for correctness, security, and style and then stop, treating a hardcoded secret as a blocking issue. Point it at my rules file, my architecture map, and my conventions instead of copying any of them in, so there is one copy to update. Keep it short, then add one dated line to my decision log saying this agent exists and what it is for. Finally, add one standing rule to my rules file: when I correct the same thing twice, write it into the skill that covers it, or start a new one, so the system learns as we go. If you need the full reasoning behind this step, read https://zalt.me/guides/vibe-coding/ai-os/configuring-agents My tool and project:

Do this now: paste the prompt so your agent writes the reviewer role file, then read it and tighten one line yourself.

Mahmoud Zalt

Mahmoud Zalt

Software engineer, 16+ yrs · built Sistava.com in 3 months, idea to production, using these methods

Resources
Star on GitHubContribute
Donate

Support my work

A small tip keeps the free work coming.

© 2026 Mahmoud Zalt. Free to read, not to republish.
Copyright & license