# How to Use Slash Commands for Orchestrating Team Workflows in Claude Code Game Studios

> Orchestrate team workflows with Claude slash commands. Learn how to define markdown skills for multi-agent pipelines like team combat, ensuring validation, delegation, and user approval.

- Repository: [Donchitos/Claude-Code-Game-Studios](https://github.com/Donchitos/Claude-Code-Game-Studios)
- Tags: how-to-guide
- Published: 2026-04-16

---

**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`](https://github.com/Donchitos/Claude-Code-Game-Studios/blob/main/.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`](https://github.com/Donchitos/Claude-Code-Game-Studios/blob/main/SKILL.md), offering remedial choices and guaranteeing partial report preservation so no work is lost.

## Practical Code Examples

### Invoking the Team Combat Orchestration

```markdown
/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:

```markdown
**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

```yaml
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

```markdown
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`](https://github.com/Donchitos/Claude-Code-Game-Studios/blob/main/.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`](https://github.com/Donchitos/Claude-Code-Game-Studios/blob/main/docs/WORKFLOW-GUIDE.md) | Describes the 7-phase pipeline structure |
| **Skills reference** | [`.claude/docs/skills-reference.md`](https://github.com/Donchitos/Claude-Code-Game-Studios/blob/main/.claude/docs/skills-reference.md) | Quick-reference table of 72 slash commands with arguments and allowed tools |
| **Technical preferences** | [`.claude/docs/technical-preferences.md`](https://github.com/Donchitos/Claude-Code-Game-Studios/blob/main/.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-combat` command 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 `AskUserQuestion` prompts
- **Error recovery** guarantees partial work preservation when sub-agents report BLOCKED status
- Configuration files including [`SKILL.md`](https://github.com/Donchitos/Claude-Code-Game-Studios/blob/main/SKILL.md), [`README.md`](https://github.com/Donchitos/Claude-Code-Game-Studios/blob/main/README.md), and [`WORKFLOW-GUIDE.md`](https://github.com/Donchitos/Claude-Code-Game-Studios/blob/main/WORKFLOW-GUIDE.md) define 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`](https://github.com/Donchitos/Claude-Code-Game-Studios/blob/main/.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`](https://github.com/Donchitos/Claude-Code-Game-Studios/blob/main/.claude/skills/team-combat/SKILL.md). The [`skills-reference.md`](https://github.com/Donchitos/Claude-Code-Game-Studios/blob/main/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.