How to Use Slash Commands for Orchestrating Team Workflows in Claude Code Game Studios
Use slash commands defined as markdown skills in .claude/skills/ to orchestrate multi-agent pipelines like /team-combat, which validates arguments, delegates tasks to specialized sub-agents through a 7-phase workflow, and requires user approval at each decision point.
The Donchitos/Claude-Code-Game-Studios repository demonstrates how to model a full game development studio using slash commands for orchestrating team workflows. These commands—implemented as markdown-based skills—enable complex multi-agent orchestration where specialized sub-agents collaborate through defined pipelines while maintaining human oversight at critical decision points.
Understanding the Slash Command Architecture
Skill Definition Structure
Each slash command lives as a markdown file under .claude/skills/ and declares metadata including name, description, argument-hint, and user-invocable flags. The file defines which tools the skill can access, such as Read, Glob, Task, and AskUserQuestion.
Allowed Tools and Permissions
The orchestration relies on specific tool permissions defined in the skill configuration. The Task tool spawns sub-agents, AskUserQuestion creates user decision points, and Read/Glob enable file system introspection. These permissions govern how the team workflow executes without allowing unauthorized file modifications.
The Team Combat Orchestration Workflow
Argument Validation and Usage Patterns
In .claude/skills/team-combat/SKILL.md, the orchestrator first validates that the user provided a required description argument. If missing, the skill prints a usage hint referencing the command syntax and exits immediately without spawning any sub-agents.
Phase-by-Phase Delegation Strategy
The workflow implements a 7-phase pipeline: Design, Architecture, Implementation, Integration, Validation, and Sign-off. Each phase delegates to specialized sub-agents including game-designer, gameplay-programmer, ai-programmer, technical-artist, sound-designer, engine-specialist, and qa-tester through the Task tool.
User-Driven Decision Points
After each sub-agent produces output, the orchestrator invokes AskUserQuestion to present options and capture explicit user approval before proceeding. This ensures human oversight at critical workflow transitions, preventing unauthorized file writes until the user confirms the "May I write …?" prompt.
Parallel Implementation with Error Recovery
During the Implementation phase, the skill spawns parallel tasks for multiple programmers. If any sub-agent reports BLOCKED status, the orchestrator surfaces the issue through the error-recovery protocol defined in lines 85-95 of SKILL.md, offering remedial choices and guaranteeing partial report preservation so no work is lost.
Practical Code Examples
Invoking the Team Combat Orchestration
/team-combat melee parry system
Result – Claude Code displays the usage hint if the argument is omitted, otherwise it starts Phase 1 (Design) and prompts the user to approve the game-designer's proposal.
Decision Prompt Structure
The skill generates structured prompts like:
**Choose the design approach for "melee parry system"**
1️⃣ "Block-based parry with stamina cost" – pros: easy to tune, cons: may feel generic.
2️⃣ "Timing-window parry with directional input" – pros: skill-based, cons: higher implementation effort.
> Please select an option (1-2) or type a custom alternative:
Parallel Task Spawning
Task:
subagent_type: gameplay-programmer
description: Implement core combat logic according to the approved design.
Task:
subagent_type: ai-programmer
description: Add enemy reaction AI for the new parry mechanic.
Error Recovery Handling
ai-programmer: BLOCKED — required sprite asset missing.
Options:
1️⃣ Skip AI implementation and continue with other agents.
2️⃣ Upload the missing asset now.
3️⃣ Abort the entire `/team-combat` workflow.
Key Configuration Files
| Role | File | Purpose |
|---|---|---|
| Skill definition | .claude/skills/team-combat/SKILL.md |
Contains orchestrator logic, argument handling, pipeline phases, and recovery protocols |
| Slash command index | README.md#slash-commands |
Lists all available commands grouped by category (design, implementation, QA, team orchestration) |
| Workflow overview | docs/WORKFLOW-GUIDE.md |
Describes the 7-phase pipeline structure |
| Skills reference | .claude/docs/skills-reference.md |
Quick-reference table of 72 slash commands with arguments and allowed tools |
| Technical preferences | .claude/docs/technical-preferences.md |
Engine validation criteria used by the specialist sub-agents |
Summary
- Slash commands in Claude Code Game Studios function as markdown-based skills stored in
.claude/skills/ - The
/team-combatcommand implements a 7-phase orchestration pipeline with specialized sub-agents for each discipline - Argument validation occurs immediately upon invocation, with usage hints displayed if required parameters are missing
- User approval is required at each decision point via
AskUserQuestionprompts - Error recovery guarantees partial work preservation when sub-agents report BLOCKED status
- Configuration files including
SKILL.md,README.md, andWORKFLOW-GUIDE.mddefine the orchestration behavior and available commands
Frequently Asked Questions
What file format are slash commands stored in?
Slash commands are stored as Markdown files with specific YAML frontmatter headers defining metadata, allowed tools, and pipeline configuration. Each skill resides in its own subdirectory under .claude/skills/, such as .claude/skills/team-combat/SKILL.md.
How does the orchestrator handle missing required arguments?
If the user invokes /team-combat without providing the required description argument, the skill immediately prints a usage hint referencing the correct syntax and exits without spawning any sub-agents. This validation occurs in the first lines of the SKILL.md file.
Can I customize the sub-agents used in the team workflow?
Yes. The sub-agent types defined in the pipeline phases (such as gameplay-programmer, ai-programmer, and technical-artist) can be modified by editing the Task tool invocations in .claude/skills/team-combat/SKILL.md. The skills-reference.md file documents all 72 available command variations and their default agent configurations.
What happens when a sub-agent reports being BLOCKED?
The orchestrator implements an error-recovery protocol that surfaces the blocking issue to the user with three options: skip the blocked agent and continue, resolve the external dependency and retry, or abort the entire workflow. The system guarantees a partial report is preserved so no work is lost, as documented in lines 85-95 of the SKILL.md file.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →