Skip to content

Core Concepts

One-Line Positioning

Core Concepts are the foundation for understanding Claude Code Workflow — Three-layer abstraction of Commands, Skills, Prompts, Workflow session management, and team collaboration patterns.


3.1 Three-Layer Abstraction

Claude Code Workflow's command system is divided into three layers of abstraction:

3.1.1 Commands - Built-in Commands

Commands are the atomic operations of Claude Code Workflow — Predefined reusable commands that complete specific tasks.

CategoryCountDescription
Core Orchestration2ccw, ccw-coordinator
CLI Tools2cli-init, codex-review
Issue Workflow8discover, plan, execute, queue, etc.
Memory2prepare, style-skill-memory
Workflow Session6start, resume, list, complete, etc.
Workflow Analysis10+analyze, brainstorm, debug, refactor, etc.
Workflow UI Design9generate, import-from-code, style-extract, etc.

Tip

Commands are defined in the .claude/commands/ directory. Each command is a Markdown file.

3.1.2 Skills - Composite Skills

Skills are combined encapsulations of Commands — Reusable skills for specific scenarios, containing multiple steps and best practices.

SkillFunctionTrigger
brainstormMulti-perspective brainstorming/brainstorm
ccw-helpCCW command help/ccw-help
command-generatorGenerate Claude commands/command-generator
issue-manageIssue management/issue-manage
memory-captureMemory compression and capture/memory-capture
memory-manageMemory updates/memory-manage
review-codeMulti-dimensional code review/review-code
review-cycleCode review and fix cycle/review-cycle
skill-generatorGenerate Claude skills/skill-generator
skill-tuningSkill diagnosis and tuning/skill-tuning

Tip

Skills are defined in the .claude/skills/ directory, containing SKILL.md specification files and reference documentation.

3.1.3 Prompts - Codex Prompts

Prompts are instruction templates for the Codex model — Prompt templates optimized for the Codex (GPT) model.

PromptFunction
prep-cyclePrep cycle prompt
prep-planPrep planning prompt

Tip

Codex Prompts are defined in the .codex/prompts/ directory, optimized specifically for the Codex model.


3.2 Three-Layer Relationship

3.2.1 Call Path

  1. User initiates request → Enter command or describe requirements in VS Code
  2. ccw orchestration → Intent analysis, select appropriate workflow
  3. Execute Command → Execute atomic command operations
  4. Call Skill → For complex logic, call composite skills
  5. Use Prompt → For specific models, use optimized prompts
  6. AI model execution → Call configured AI model
  7. Return result → Format output to user

3.3 Workflow Session Management

3.3.1 Session Lifecycle

3.3.2 Session Commands

CommandFunctionExample
startStart new session/workflow:session:start
resumeResume existing session/workflow:session:resume <session-id>
listList all sessions/workflow:session:list
syncSync session state/workflow:session:sync
completeComplete current session/workflow:session:complete
solidifySolidify session results/workflow:session:solidify

3.3.3 Session Directory Structure

.workflow/
├── .team/
│   └── TC-<project>-<date>/      # Session directory
│       ├── spec/                  # Session specifications
│       │   ├── discovery-context.json
│       │   └── requirements.md
│       ├── artifacts/             # Session artifacts
│       ├── wisdom/                # Session wisdom
│       │   ├── learnings.md
│       │   ├── decisions.md
│       │   ├── conventions.md
│       │   └── issues.md
│       └── .team-msg/             # Message bus

3.4 Team Collaboration Patterns

3.4.1 Role System

Claude Code Workflow supports 8 team workflows, each defining different roles:

WorkflowRolesDescription
PlanExplanner, executorPlanning-execution separation
IterDevdeveloper, reviewerIterative development
Lifecycleanalyzer, developer, tester, reviewerLifecycle coverage
Issuediscoverer, planner, executorIssue-driven
Testingtester, developerTest-driven
QAqa, developerQuality assurance
Brainstormfacilitator, perspectivesMulti-perspective analysis
UIDesigndesigner, developerUI design generation

3.4.2 Message Bus

Team members communicate via the message bus:

3.4.3 Workflow Selection Guide

Task ObjectiveRecommended WorkflowCommand
New feature developmentPlanEx/workflow-plan
Bug fixLifecycle/debug-with-file
Code refactoringIterDev/refactor-cycle
Technical decisionBrainstorm/brainstorm-with-file
UI developmentUIDesign/workflow:ui-design
Integration testingTesting/integration-test-cycle
Code reviewQA/review-cycle
Issue managementIssue/issue series

3.5 Core Concepts Overview

ConceptDescriptionLocation/Command
CommandAtomic operation commands.claude/commands/
SkillComposite skill encapsulation.claude/skills/
PromptCodex prompt templates.codex/prompts/
WorkflowTeam collaboration process/workflow:*
SessionSession context management/workflow:session:*
MemoryCross-session knowledge persistencemcp__ccw-tools__core_memory(operation="list")
SpecProject specification constraints.workflow/specs/
CodexLensSemantic code indexing.codex-lens/
CCWCLI invocation frameworkccw directory

3.6 Data Flow


Next Steps

Released under the MIT License.