AT-301a · Module 3

Automation & Workflow

3 min read

If you spawn the same agent team repeatedly, wrap it in a slash command so one keyword triggers the full team setup.

Slash commands (skills) in Claude Code let you define a keyword that expands into a full prompt. Instead of pasting your 200-line team spawn prompt every time, create a command like /banana-squad that sets up all five agents, defines their roles, and starts the orchestration flow. The command handles team creation, role assignment, clarifying questions, dispatch, critique, and shutdown — all from a single keyword.

Your CLAUDE.md file is loaded into every agent's context. Use it to define team-wide conventions, project structure, and quality standards.

Every agent spawned in a project inherits the CLAUDE.md context. This makes it the ideal place for shared knowledge: project architecture, file naming conventions, coding standards, API patterns. When your research agent needs to know where reference images live, it checks CLAUDE.md. When your generator needs the API guide path, it checks CLAUDE.md. Centralized knowledge prevents each agent from rediscovering the same information.

Background agents consume tokens while running. Always include a shutdown step in your workflow to terminate agents after they deliver results.

A common mistake: spawning agents in the background and forgetting to shut them down. Background agents keep their context alive, consuming tokens even when idle. One user left agents running for a day after 2 hours of actual work, burning 10-20K unnecessary tokens. Build graceful shutdown into your slash commands and workflows. After the critic approves the final output, explicitly terminate all background agents.