Agents

🎥 Video lesson — video not yet migrated (source Skool video id: 2e66ec93d9914171b84527530c836b17).

Remember the context window problem? When you do everything in one conversation, the context fills up. Each compaction loses details and degrades quality. Agents solve this. Instead of doing everything in one overloaded conversation, Claude Code spins up separate workers — sub-agents — each with their own completely clean context window. They do their job independently and return just a summary of the results. Not the entire transcript — just the outcome. It's like a manager who delegates tasks to team members instead of trying to do everything themselves.

Claude Code can spawn sub-agents on its own when it decides a task is big enough. But you can also define custom agents — specialized workers with specific roles, tools, and instructions. You create them as markdown files, similar to skills. Global agents live in ~/.claude/agents/ (available everywhere), project agents in your project's .claude/agents/ folder. The key difference from skills: an agent is a single .md file, not a folder.

What makes agents powerful is the tools configuration in the frontmatter. You decide exactly what each agent can and cannot do. A research agent might get Read, Grep, WebSearch, and WebFetch — but no Write or Edit, so it can gather information but never touch your files. You set the model (Sonnet for speed, Opus for deep thinking, Haiku for cheap tasks) and cap how long it can work with maxTurns. Below that — plain English instructions, just like skills.

The Claude Code community is already building agent frameworks and sharing them for free on GitHub. The BMAD framework, for example, is a pre-built team of agents with software engineering best practices baked in — planning agents, implementation agents, testing agents, review agents — all working together through a pipeline. You clone the repo, copy one folder into your project, and Claude Code has a full team workflow out of the box.