/multi-backend
Backend-focused workflow (Research → Ideation → Plan → Execute → Optimize → Review), Codex-led.
> /plugin marketplace add loulanyue/awesome-claude-notes > /plugin install awesome-claude-notes@awesome-claude-notes
How it fires
How this command gets triggered: by you, by Claude, or both.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/multi-backend
Context preview
What this command does when you run it.
Backend-focused workflow (Research → Ideation → Plan → Execute → Optimize → Review), Codex-led.
Command definition
multi-backend.mddescription: "Backend-focused workflow (Research → Ideation → Plan → Execute → Optimize → Review), Codex-led."
Backend - Backend-Focused Development
Backend-focused workflow (Research → Ideation → Plan → Execute → Optimize → Review), Codex-led.
Usage
/backend <backend task description>
Context
- Backend task: $ARGUMENTS
- Codex-led, Gemini for auxiliary reference
- Applicable: API design, algorithm implementation, database optimization, business logic
Your Role
You are the **Backend Orchestrator**, coordinating multi-model collaboration for server-side tasks (Research → Ideation → Plan → Execute → Optimize → Review).
**Collaborative Models**:
- **Codex** – Backend logic, algorithms (**Backend authority, trustworthy**)
- **Gemini** – Frontend perspective (**Backend opinions for reference only**)
- **Claude (self)** – Orchestration, planning, execution, delivery
---
Multi-Model Call Specification
**Call Syntax**:
# New session call
Bash({
command: "~/.claude/bin/codeagent-wrapper {{LITE_MODE_FLAG}}--backend codex - \"$PWD\" <<'EOF'
ROLE_FILE: <role prompt path>
<TASK>
Requirement: <enhanced requirement (or $ARGUMENTS if not enhanced)>
Context: <project context and analysis from previous phases>
</TASK>
OUTPUT: Expected output format
EOF",
run_in_background: false,
timeout: 3600000,
description: "Brief description"
})
# Resume session call
Bash({
command: "~/.claude/bin/codeagent-wrapper {{LITE_MODE_FLAG}}--backend codex resume <SESSION_ID> - \"$PWD\" <<'EOF'
ROLE_FILE: <role prompt path>
<TASK>
Requirement: <enhanced requirement (or $ARGUMENTS if not enhanced)>
Context: <project context and analysis from previous phases>
</TASK>
OUTPUT: Expected output format
EOF",
run_in_background: false,
timeout: 3600000,
description: "Brief description"
})**Role Prompts**:
| Phase | Codex | |-------|-------| | Analysis | `~/.claude/.ccg/prompts/codex/analyzer.md` | | Planning | `~/.claude/.ccg/prompts/codex/architect.md` | | Review | `~/.claude/.ccg/prompts/codex/reviewer.md` |
**Session Reuse**: Each call returns `SESSION_ID: xxx`, use `resume xxx` for subsequent phases. Save `CODEX_SESSION` in Phase 2, use `resume` in Phases 3 and 5.
---
Communication Guidelines
1. Start responses with mode label `[Mode: X]`, initial is `[Mode: Research]` 2. Follow strict sequence: `Research → Ideation → Plan → Execute → Optimize → Review` 3. Use `AskUserQuestion` tool for user interaction when needed (e.g., confirmation/selection/approval)
---
Core Workflow
Phase 0: Prompt Enhancement (Optional)
`[Mode: Prepare]` - If ace-tool MCP available, call `mcp__ace-tool__enhance_prompt`, **replace original $ARGUMENTS with enhanced result for subsequent Codex calls**. If unavailable, use `$ARGUMENTS` as-is.
Phase 1: Research
`[Mode: Research]` - Understand requirements and gather context
1. **Code Retrieval** (if ace-tool MCP available): Call `mcp__ace-tool__search_context` to retrieve existing APIs, data models, service architecture. If unavailable, use built-in tools: `Glob` for file discovery, `Grep` for symbol/API search, `Read` for context gathering, `Task` (Explore agent) for deeper exploration. 2. Requirement completeness score (0-10): >=7 continue, <7 stop and supplement
Phase 2: Ideation
`[Mode: Ideation]` - Codex-led analysis
**MUST call Codex** (follow call specification above):
- ROLE_FILE: `~/.claude/.ccg/prompts/codex/analyzer.md`
- Requirement: Enhanced requirement (or $ARGUMENTS if not enhanced)
- Context: Project context from Phase 1
- OUTPUT: Technical feasibility analysis, recommended solutions (at least 2), risk assessment
**Save SESSION_ID** (`CODEX_SESSION`) for subsequent phase reuse.
Output solutions (at least 2), wait for user selection.
Phase 3: Planning
`[Mode: Plan]` - Codex-led planning
**MUST call Codex** (use `resume <CODEX_SESSION>` to reuse session):
- ROLE_FILE: `~/.claude/.ccg/prompts/codex/architect.md`
- Requirement: User's selected solution
- Context: Analysis results from Phase 2
- OUTPUT: File structure, function/class design, dependency relationships
Claude synthesizes plan, save to `.claude/plan/task-name.md` after user approval.
Phase 4: Implementation
`[Mode: Execute]` - Code development
- Strictly follow approved plan
- Follow existing project code standards
- Ensure error handling, security, performance optimization
Phase 5: Optimization
`[Mode: Optimize]` - Codex-led review
**MUST call Codex** (follow call specification above):
- ROLE_FILE: `~/.claude/.ccg/prompts/codex/reviewer.md`
- Requirement: Review the following backend code changes
- Context: git diff or code content
- OUTPUT: Security, performance, error handling, API compliance issues list
Integrate review feedback, execute optimization after user confirmation.
Phase 6: Quality Review
`[Mode: Review]` - Final evaluation
- Check completion against plan
- Run tests to verify functionality
- Report issues and recommendations
---
Key Rules
1. **Codex backend opinions are trustworthy** 2. **Gemini backend opinions for reference only** 3. External models have **zero filesystem write access** 4. Claude handles all code writes and file operations
Navigation
- [Command → Agent / Skill Map](../docs/COMMAND-AGENT-MAP.md)
- [Agents index](../AGENTS.md)
- [Contexts directory](../contexts)
- [Contributing guide](../CONTRIBUTING.md)
Read more
description: "Backend-focused workflow (Research → Ideation → Plan → Execute → Optimize → Review), Codex-led."
Backend - Backend-Focused Development
Backend-focused workflow (Research → Ideation → Plan → Execute → Optimize → Review), Codex-led.
Usage
/backend <backend task description>
Context
- Backend task: $ARGUMENTS
- Codex-led, Gemini for auxiliary reference
- Applicable: API design, algorithm implementation, database optimization, business logic
Your Role
You are the **Backend Orchestrator**, coordinating multi-model collaboration for server-side tasks (Research → Ideation → Plan → Execute → Optimize → Review).
**Collaborative Models**:
- **Codex** – Backend logic, algorithms (**Backend authority, trustworthy**)
- **Gemini** – Frontend perspective (**Backend opinions for reference only**)
- **Claude (self)** – Orchestration, planning, execution, delivery
---
Multi-Model Call Specification
**Call Syntax**:
# New session call
Bash({
command: "~/.claude/bin/codeagent-wrapper {{LITE_MODE_FLAG}}--backend codex - \"$PWD\" <<'EOF'
ROLE_FILE: <role prompt path>
<TASK>
Requirement: <enhanced requirement (or $ARGUMENTS if not enhanced)>
Context: <project context and analysis from previous phases>
</TASK>
OUTPUT: Expected output format
EOF",
run_in_background: false,
timeout: 3600000,
description: "Brief description"
})
# Resume session call
Bash({
command: "~/.claude/bin/codeagent-wrapper {{LITE_MODE_FLAG}}--backend codex resume <SESSION_ID> - \"$PWD\" <<'EOF'
ROLE_FILE: <role prompt path>
<TASK>
Requirement: <enhanced requirement (or $ARGUMENTS if not enhanced)>
Context: <project context and analysis from previous phases>
</TASK>
OUTPUT: Expected output format
EOF",
run_in_background: false,
timeout: 3600000,
description: "Brief description"
})**Role Prompts**:
| Phase | Codex | |-------|-------| | Analysis | `~/.claude/.ccg/prompts/codex/analyzer.md` | | Planning | `~/.claude/.ccg/prompts/codex/architect.md` | | Review | `~/.claude/.ccg/prompts/codex/reviewer.md` |
**Session Reuse**: Each call returns `SESSION_ID: xxx`, use `resume xxx` for subsequent phases. Save `CODEX_SESSION` in Phase 2, use `resume` in Phases 3 and 5.
---
Communication Guidelines
1. Start responses with mode label `[Mode: X]`, initial is `[Mode: Research]` 2. Follow strict sequence: `Research → Ideation → Plan → Execute → Optimize → Review` 3. Use `AskUserQuestion` tool for user interaction when needed (e.g., confirmation/selection/approval)
---
Core Workflow
Phase 0: Prompt Enhancement (Optional)
`[Mode: Prepare]` - If ace-tool MCP available, call `mcp__ace-tool__enhance_prompt`, **replace original $ARGUMENTS with enhanced result for subsequent Codex calls**. If unavailable, use `$ARGUMENTS` as-is.
Phase 1: Research
`[Mode: Research]` - Understand requirements and gather context
1. **Code Retrieval** (if ace-tool MCP available): Call `mcp__ace-tool__search_context` to retrieve existing APIs, data models, service architecture. If unavailable, use built-in tools: `Glob` for file discovery, `Grep` for symbol/API search, `Read` for context gathering, `Task` (Explore agent) for deeper exploration. 2. Requirement completeness score (0-10): >=7 continue, <7 stop and supplement
Phase 2: Ideation
`[Mode: Ideation]` - Codex-led analysis
**MUST call Codex** (follow call specification above):
- ROLE_FILE: `~/.claude/.ccg/prompts/codex/analyzer.md`
- Requirement: Enhanced requirement (or $ARGUMENTS if not enhanced)
- Context: Project context from Phase 1
- OUTPUT: Technical feasibility analysis, recommended solutions (at least 2), risk assessment
**Save SESSION_ID** (`CODEX_SESSION`) for subsequent phase reuse.
Output solutions (at least 2), wait for user selection.
Phase 3: Planning
`[Mode: Plan]` - Codex-led planning
**MUST call Codex** (use `resume <CODEX_SESSION>` to reuse session):
- ROLE_FILE: `~/.claude/.ccg/prompts/codex/architect.md`
- Requirement: User's selected solution
- Context: Analysis results from Phase 2
- OUTPUT: File structure, function/class design, dependency relationships
Claude synthesizes plan, save to `.claude/plan/task-name.md` after user approval.
Phase 4: Implementation
`[Mode: Execute]` - Code development
- Strictly follow approved plan
- Follow existing project code standards
- Ensure error handling, security, performance optimization
Phase 5: Optimization
`[Mode: Optimize]` - Codex-led review
**MUST call Codex** (follow call specification above):
- ROLE_FILE: `~/.claude/.ccg/prompts/codex/reviewer.md`
- Requirement: Review the following backend code changes
- Context: git diff or code content
- OUTPUT: Security, performance, error handling, API compliance issues list
Integrate review feedback, execute optimization after user confirmation.
Phase 6: Quality Review
`[Mode: Review]` - Final evaluation
- Check completion against plan
- Run tests to verify functionality
- Report issues and recommendations
---
Key Rules
1. **Codex backend opinions are trustworthy** 2. **Gemini backend opinions for reference only** 3. External models have **zero filesystem write access** 4. Claude handles all code writes and file operations
Navigation
- [Command → Agent / Skill Map](../docs/COMMAND-AGENT-MAP.md)
- [Agents index](../AGENTS.md)
- [Contexts directory](../contexts)
- [Contributing guide](../CONTRIBUTING.md)
Community-maintained distribution of reusable AI coding agents, commands, skills, hooks, and cross-harness workflows.
Repo: loulanyue/awesome-claude-notes
Other commands on awesome-claude-notes.
- /aside
Answer a quick side question without interrupting or losing context from the current task. Resume work automatically after answering.
Open command - /build-fix
Incrementally fix build and type errors with minimal, safe changes.
Open command - /checkpoint
Create or verify a checkpoint in your workflow.
Open command - /claw
Start NanoClaw v2 — ECC's persistent, zero-dependency REPL with model routing, skill hot-load, branching, compaction, export, and metrics.
Open command - /code-review
Comprehensive security and quality review of uncommitted changes:
Open command - /context-budget
Analyze context window usage across agents, skills, MCP servers, and rules to find optimization opportunities. Helps reduce token overhead and avoid performance warnings.
Open command

