PTENES
TRACK 2

🛠️ Creating it in practice

You’ve stopped theorizing and started building. Each module delivers a functional subagent— from frontmatter to body, from the description that triggers it to project vs. global— until you create with /agents and know exactly what Claude chooses.

📐 Blueprint idea + objective 🗂️ Frontmatter name description 🧠 Body role steps … 🚀 Agent ready to use /agents · runs automatically M2.1 M2.2–2.3 M2.4–2.5 M2.6
6
Modules
36+
Topics
~3h
Duration
Practical
Level

Learning path map

Detailed content

2.1 ~30 min

📋 The complete frontmatter

The YAML between the --- that configures everything before Claude reads a single line of the body. Each field, why it exists, and what changes if you omit it.

What it is:

The YAML block delimited by --- at the top of the file. It's the config area: Claude reads it before processing the content.

Why learn:

Without understanding the frontmatter, every field seems like magic. Understanding the structure separates what configures from what instructs.

Key concepts:

Frontmatter = config; body = instructions. They're distinct areas with distinct purposes.

What it is:

The agent’s unique identifier. Appears in the /agents, in the FleetView log and lets you invoke it by name ("use the security-reviewer").

Why learn:

A bad name prevents direct invocation and clutters the catalog. Descriptive kebab-case is the convention.

Key concepts:

Kebab-case; no spaces; name = direct invocation handle.

What it is:

YAML list of tools the agent can call: Bash, Read, Write, WebFetch, etc. Omitting it grants full access—which is rarely ideal.

Why learn:

Limiting tools is the first layer of security. An agent that can only read can’t delete anything.

Key concepts:

Least privilege principle; explicit list > omitted full access.

What it is:

Selects which Claude model runs the agent: sonnet (default), haiku (fast/cheap), opus (deep). Omit to inherit the parent process’s model.

Why learn:

It’s the cost lever. Mechanical tasks in Haiku; deep analysis in Opus. Choosing deliberately saves credits.

Key concepts:

Inherits if omitted; sonnet = safe default; haiku = task batches.

What it is:

color sets the color in FleetView; memory enables persistent notes; isolation: worktree runs in an isolated git branch.

Why learn:

Optional fields unlock advanced use cases without cluttering the basic config. You choose when to grow.

Key concepts:

Optional = progressive; add it when the situation calls for it.

What it is:

Without name the file is ignored. Without tools gets full access. Without model inherits from the parent. Without description is never selected automatically.

Why learn:

Invisible defaults cause silent bugs. Knowing what each omission activates prevents surprises in production.

Key concepts:

name is required; description = automatic routing; tools = security.

View Full
2.2 ~35 min

🎯 The description is the trigger

The agent’s most influential field. A well-written description helps Claude choose the right agent — automatically, without you naming it.

What it is:

When you ask for something, Claude reads only the name + description of all available agents and decides which one to use without seeing the body.

Why learn:

It’s the central routing mechanism. Understanding how Claude decides which agent to call changes how you write the description.

Key concepts:

Routing by description; the body is only included when the agent is activated.

What it is:

A good description includes: (1) what the agent does, (2) when to use it, and (3) activation examples — like an expert dictionary entry.

Why learn:

It’s the most-read text in your agent—it’s read every time Claude makes a decision. One bad sentence = the agent is never called or is always called incorrectly.

Key concepts:

What it does + when to use it + activation examples.

What it is:

Three classic mistakes: (1) too vague—the Claude never chooses; (2) too long—wastes catalog tokens; (3) identical to general-purpose—the agent never beats the default selection.

Why learn:

Recognizing the error avoids review. A poor description is invisible until you realize the agent never triggers.

Key concepts:

Specific > generic; concise > long; differentiated > a copy of the default.

What it is:

Add explicit "TRIGGER (when to invoke)" and "SKIP (when not to invoke)" sections to the description — the pattern used in production agents.

Why learn:

Eliminates false positives. Claude takes "don’t trigger for X" literally and follows it — reducing unnecessary invocations.

Key concepts:

TRIGGER = green light; SKIP = explicit red light in the description.

What it is:

The method: invoke the agent with real scenarios, observe when it doesn’t trigger or triggers incorrectly, refine the description, and retest — a short cycle.

Why learn:

No one gets it right on the first try. The fast edit-test cycle is the skill that separates functional agents from those that are perpetually "almost ready."

Key concepts:

Edit → test → adjust cycle; feedback is the signal, not intuition.

What it is:

Reading and analyzing real agent descriptions from the Claude Code ecosystem (claude-code-guide, general-purpose, Explore)—what worked and why.

Why learn:

Real examples teach more than theory. Seeing a production pattern calibrates your expectations.

Key concepts:

Pattern matching; read existing agents as an exercise.

View Full
2.3 ~30 min

🧠 The body is the brain

The Markdown after the frontmatter. This is where the role, steps, output format, and what the agent must never do live — everything that determines output quality.

What it is:

The first line of the body defines the agent’s role: "You are an expert in X who does Y." This sentence anchors all the behavior that follows.

Why learn:

Agents without a declared role drift and become generic. The role is the compass that guides every decision within the task.

Key concepts:

Role = identity; the more specific it is, the more consistent the output.

What it is:

Numbered list defining the protocol: 1. Read X 2. Identify Y 3. Produce Z. The agent follows the list as an internal checklist.

Why learn:

Without steps, the agent interprets creatively—sometimes well, sometimes not. Numbered steps make behavior reproducible.

Key concepts:

Reproducibility; each step = a verifiable action.

What it is:

A body section that specifies exactly what format the report should use: bullet list, table, JSON, prose — with a minimal example if helpful.

Why learn:

The orchestrator processes the agent’s output. An unexpected format breaks the chain. Specifying the output is part of the agent’s contract.

Key concepts:

Format = contract; the orchestrator consumes the output.

What it is:

"DO NOT" section with explicit prohibitions: don't delete files, don't make commits, don't ask the user, don't make up data.

Why learn:

Negative instructions are stronger than positive ones for guardrails. The agent remembers "never X" better than "sometimes don't X".

Key concepts:

A negative guardrail is stronger; a list of prohibitions prevents accidents.

What it is:

You can embed permanent context in the body: fixed folder paths, project conventions, lists of available MCP tools.

Why learn:

Context in the body avoids repeating it in the invocation prompt. The agent already knows where things are before receiving the task.

Key concepts:

Permanent context vs. invocation context; the body is the preloaded briefing.

What it is:

Minimum viable body = role + 3–5 steps + output format. A richer body adds examples, context, and edge cases. When each is sufficient.

Why learn:

Perfectionism paralyzes. Knowing when the minimum is enough and when it’s worth investing more is a practical skill.

Key concepts:

Agent MVP; iterate after the minimum works.

View Full
2.4 ~30 min

🔐 Tools and permissions

The field tools determines what the agent can and cannot do. The principle of least privilege applied—and how to use disallowed-tools for protection.

What it is:

Bash, Read, Write, Edit, WebFetch, WebSearch, Agent, Grep, LS — each tool has its purpose and what it lets you do in the system.

Why learn:

You can’t grant permission for what you don’t know. Knowing the catalog is a prerequisite for informed configuration.

Key concepts:

Catalog: Bash=executes, Read=reads, Write=creates, Edit=modifies, Agent=child subagent.

What it is:

A read-only agent needs Bash (grep), Read, and Grep — no Write or Edit. Define the scope by the task type, not by “what if it’s needed.”

Why learn:

Agents with excessive access cause accidental damage. Least privilege makes the agent predictable and auditable.

Key concepts:

Read-only agents = safer; Bash+Write = only when necessary.

What it is:

The field disallowed-tools prohibits specific tools even if the parent profile allows them — an additional layer of explicit blocking.

Why learn:

When the agent inherits permissions from a broad profile, the blocklist is the only way to exclude what it shouldn’t use.

Key concepts:

Blocklist complements allowlist; explicit overrides inherited.

What it is:

MCP tools (Model Context Protocol) extend the catalog: access to databases, external APIs, remote file systems — each registered MCP server becomes a tool.

Why learn:

MCP multiplies the agent’s capabilities. Knowing how to grant (or block) access to a specific MCP server is a key skill.

Key concepts:

MCP server = set of external tools; name in tools: = registry entry.

What it is:

How to use the /agents to inspect each agent's tool profile before running it — identify excessive permissions.

Why learn:

Pre-execution auditing is the habit that prevents accidents. "Let it run and see what happens" is a recipe for data loss.

Key concepts:

Review before running; /agents as an inspection tool.

What it is:

Typical profiles: (1) Reader [Read, Bash(grep)] (2) Analyst [Read, WebFetch, Bash] (3) Builder [+Write, Edit] (4) Orchestrator [+Agent]. Each profile has a target use.

Why learn:

Templates speed up creation. Instead of starting from scratch, you choose the closest profile and adjust it.

Key concepts:

4 base profiles; fine-tune for each use case.

View Full
2.5 ~25 min

📁 Project × Global

Where the file .md location determines who can see it — only this repository or your entire machine. The rule is simple; the implication is significant.

What it is:

Project: .claude/agents/ in the repository root. Global: ~/.claude/agents/ in the home directory. One is local to the repo; the other is available in every project on the machine.

Why learn:

Putting it in the wrong place makes the agent disappear (project) or leak into contexts where it shouldn't exist (global).

Key concepts:

.claude/agents/ = project; ~/.claude/agents/ = global; scope determines visibility.

What it is:

Global is ideal for universal-use agents: code reviewers that work across projects, researchers, and personal documentation agents.

Why learn:

Creating everything as global pollutes every project’s catalog. Knowing how to distinguish them reduces confusion during automatic selection.

Key concepts:

Global = project-agnostic; project = specialized for the repo’s domain.

What it is:

A project is ideal for agents that know the repository’s specific domain: folder structure, naming conventions, local scripts.

Why learn:

A project agent can embed the exact repo paths in its body — context a global agent would never have.

Key concepts:

Repo-specific context = project agent advantage.

What it is:

When there are two agents with the same name (one project-level, one global), the project-level one takes precedence—allowing local overrides of global behavior.

Why learn:

The override is a feature, not a bug. You can adapt a global agent for a specific project without changing the global one.

Key concepts:

Project overrides global; intentional override is a valid technique.

What it is:

Project agents live in git alongside the code — diff, blame, rollback. Global agents live outside the repo and need their own strategy (dotfiles, symlinks).

Why learn:

Versioning the agent alongside the code ensures the team uses the same version — with no silent drift between environments.

Key concepts:

Agent = code; versioning = traceability; dotfiles for global configuration.

What it is:

Conventions for keeping the catalog readable: domain prefixes (sec-, doc-, infra-), README.md in the agents folder, explicit deprecation.

Why learn:

With 20+ agents, the catalog becomes a problem without organization. Structuring it from the start saves future refactoring.

Key concepts:

Prefixes + README + deprecation = a sustainable catalog.

View Full
2.6 ~30 min

🚀 Creating with /agents + how Claude chooses

The command /agents as a creation and management interface. And the selection algorithm—why Claude calls one agent and not another for the same task.

What it is:

The command /agents is the management panel: lists all available agents (built-in + custom), opens the creation wizard, and lets you inspect any agent.

Why learn:

It’s the practical entry point for everything Track 2 teaches. Mastering the command means mastering the work interface.

Key concepts:

/agents = dashboard; list + inspect + create everything in one place.

What it is:

When creating via /agents, Claude guides you through a conversation: asks about the purpose, suggests a name/description/tools, and generates the file — you review and adjust it.

Why learn:

Guided creation is faster than writing from scratch. But understanding the result lets you correct what the assistant got wrong.

Key concepts:

AI-assisted generation + human review = ideal creation workflow.

What it is:

Claude semantically matches the request to the available descriptions. Order of preference: (1) direct invocation by name, (2) strong description match, (3) general-purpose as a fallback.

Why learn:

Understanding the algorithm lets you influence selection: write descriptions that beat the general-purpose agent in the cases that matter.

Key concepts:

Direct > semantic > fallback; a strong description beats general-purpose.

What it is:

Techniques for diagnosing incorrect selection: inspect descriptions of competing agents, identify semantic overlap, ask Claude to explain its choice.

Why learn:

"The wrong agent was called" is the most common bug in overgrown catalogs. Diagnosing is faster than guessing.

Key concepts:

Semantic overlap = conflict; clear distinction = precise selection.

What it is:

Complete exercise: create a code review agent (code-reviewer) from scratch — frontmatter, description with TRIGGER/SKIP, body with role+steps+format+what not to do.

Why learn:

It’s the culmination of all of Track 2. After this exercise, you’ll leave with a real agent running in your environment.

Key concepts:

From zero to functional; all fields in harmony; final test.

What it is:

T3 goes deeper into models and cost (haiku vs opus for each type of agent). T4 expands to Codex and multiple environments. Track 2 is the core that both amplify.

Why learn:

Context about what comes next helps you prioritize: if cost matters right now, skip to T3. If the environment is different, T4 is waiting.

Key concepts:

T2 = create; T3 = optimize; T4 = expand to other environments.

View Full
← Track 1: Fundamentals Track 3: Orchestration →