2025-08-18 11:58:55 +02:00
# SuperClaude Advanced Patterns
2025-08-21 19:03:25 +02:00
**Advanced Context Usage Patterns**: Sophisticated combinations of commands, agents, and flags for experienced SuperClaude users working on complex projects.
2025-08-18 11:58:55 +02:00
2025-08-21 19:03:25 +02:00
**Remember**: SuperClaude provides context to Claude Code. All patterns here are about guiding Claude's behavior through context, not executing code or coordinating processes.
2025-08-18 11:58:55 +02:00
## Table of Contents
2025-08-21 19:03:25 +02:00
### Context Combination Patterns
- [Multi-Agent Context Patterns ](#multi-agent-context-patterns ) - Combining multiple specialist contexts
- [Command Sequencing Patterns ](#command-sequencing-patterns ) - Effective command combinations
- [Flag Combination Strategies ](#flag-combination-strategies ) - Advanced flag usage
2025-08-18 11:58:55 +02:00
2025-08-21 19:03:25 +02:00
### Workflow Patterns
- [Complex Project Patterns ](#complex-project-patterns ) - Large project approaches
- [Migration Patterns ](#migration-patterns ) - Legacy system modernization
- [Review and Audit Patterns ](#review-and-audit-patterns ) - Comprehensive analysis
2025-08-18 11:58:55 +02:00
2025-08-21 19:03:25 +02:00
## Multi-Agent Context Patterns
2025-08-18 11:58:55 +02:00
2025-08-21 19:03:25 +02:00
### Combining Specialist Contexts
2025-08-18 11:58:55 +02:00
2025-08-21 19:03:25 +02:00
**Security + Backend Pattern:**
2025-08-18 11:58:55 +02:00
```bash
2025-08-21 19:03:25 +02:00
# Security-focused backend development
2025-08-21 19:05:51 +02:00
@agent -security "define authentication requirements"
@agent -backend-architect "design API with security requirements"
2025-08-21 19:03:25 +02:00
/sc:implement "secure API endpoints"
# What happens:
# 1. Security context loaded first
# 2. Backend context added
# 3. Implementation guided by both contexts
# Note: Contexts combine in Claude's understanding, not in execution
2025-08-18 11:58:55 +02:00
```
2025-08-21 19:03:25 +02:00
**Frontend + UX + Accessibility Pattern:**
2025-08-18 11:58:55 +02:00
```bash
2025-08-21 19:03:25 +02:00
# Comprehensive frontend development
2025-08-21 19:05:51 +02:00
@agent -frontend-architect "design component architecture"
2025-08-21 19:03:25 +02:00
/sc:implement "accessible React components" --magic
2025-08-21 19:05:51 +02:00
@agent -quality-engineer "review accessibility compliance"
2025-08-21 19:03:25 +02:00
# Context layering:
# - Frontend patterns guide structure
# - Magic MCP may provide UI components (if configured)
# - Quality context ensures standards
2025-08-18 11:58:55 +02:00
```
2025-08-21 19:03:25 +02:00
### Manual vs Automatic Agent Selection
2025-08-18 11:58:55 +02:00
2025-08-21 19:03:25 +02:00
**Explicit Control Pattern:**
2025-08-18 11:58:55 +02:00
```bash
2025-08-21 19:03:25 +02:00
# Manually control which contexts load
2025-08-21 19:05:51 +02:00
@agent -python-expert "implement data pipeline"
2025-08-21 19:03:25 +02:00
# Only Python context, no auto-activation
# vs Automatic selection
/sc:implement "Python data pipeline"
# May activate multiple agents based on keywords
2025-08-18 11:58:55 +02:00
```
2025-08-21 19:03:25 +02:00
**Override Auto-Selection:**
2025-08-18 11:58:55 +02:00
```bash
2025-08-21 19:03:25 +02:00
# Prevent unwanted agent activation
/sc:implement "simple utility" --no-mcp
2025-08-21 19:05:51 +02:00
@agent -backend-architect "keep it simple"
2025-08-21 19:03:25 +02:00
# Limits context to specified agent only
2025-08-18 11:58:55 +02:00
```
2025-08-21 19:03:25 +02:00
## Command Sequencing Patterns
2025-08-18 11:58:55 +02:00
2025-08-21 19:03:25 +02:00
### Progressive Refinement Pattern
2025-08-18 11:58:55 +02:00
```bash
2025-08-21 19:03:25 +02:00
# Start broad, then focus
/sc:analyze project/
# General analysis
2025-08-18 11:58:55 +02:00
2025-08-21 19:03:25 +02:00
/sc:analyze project/core/ --focus architecture
# Focused on structure
2025-08-18 11:58:55 +02:00
2025-08-21 19:03:25 +02:00
/sc:analyze project/core/auth/ --focus security --think-hard
# Deep security analysis
2025-08-18 11:58:55 +02:00
2025-08-21 19:03:25 +02:00
# Each command builds on previous context within the conversation
2025-08-18 11:58:55 +02:00
```
2025-08-21 19:03:25 +02:00
### Discovery to Implementation Pattern
2025-08-18 11:58:55 +02:00
```bash
2025-08-21 19:03:25 +02:00
# Complete feature development flow
/sc:brainstorm "feature idea"
# Explores requirements
2025-08-18 11:58:55 +02:00
2025-08-21 19:03:25 +02:00
/sc:design "feature architecture"
# Creates structure
2025-08-18 11:58:55 +02:00
2025-08-21 19:05:51 +02:00
@agent -backend-architect "review design"
2025-08-21 19:03:25 +02:00
# Expert review
2025-08-18 11:58:55 +02:00
2025-08-21 19:03:25 +02:00
/sc:implement "feature based on design"
# Implementation follows design
2025-08-18 11:58:55 +02:00
2025-08-21 19:03:25 +02:00
/sc:test --validate
# Verification approach
2025-08-18 11:58:55 +02:00
```
2025-08-21 19:03:25 +02:00
### Iterative Improvement Pattern
2025-08-18 11:58:55 +02:00
```bash
2025-08-21 19:03:25 +02:00
# Multiple improvement passes
/sc:analyze code/ --focus quality
# Identify issues
2025-08-18 11:58:55 +02:00
2025-08-21 19:03:25 +02:00
/sc:improve code/ --fix
# First improvement pass
2025-08-18 11:58:55 +02:00
2025-08-21 19:05:51 +02:00
@agent -refactoring-expert "suggest further improvements"
2025-08-21 19:03:25 +02:00
# Expert suggestions
2025-08-18 11:58:55 +02:00
2025-08-21 19:03:25 +02:00
/sc:improve code/ --fix --focus maintainability
# Refined improvements
2025-08-18 11:58:55 +02:00
```
2025-08-21 19:03:25 +02:00
## Flag Combination Strategies
2025-08-18 11:58:55 +02:00
2025-08-21 19:03:25 +02:00
### Analysis Depth Control
2025-08-18 11:58:55 +02:00
```bash
2025-08-21 19:03:25 +02:00
# Quick overview
2025-08-22 19:18:44 +02:00
/sc:analyze . --overview --uc
2025-08-21 19:03:25 +02:00
# Fast, compressed output
2025-08-18 11:58:55 +02:00
2025-08-21 19:03:25 +02:00
# Standard analysis
/sc:analyze . --think
# Structured thinking
2025-08-18 11:58:55 +02:00
2025-08-21 19:03:25 +02:00
# Deep analysis
/sc:analyze . --think-hard --verbose
# Comprehensive analysis
# Maximum depth (use sparingly)
/sc:analyze . --ultrathink
# Exhaustive analysis
2025-08-18 11:58:55 +02:00
```
2025-08-21 19:03:25 +02:00
### MCP Server Selection
2025-08-18 11:58:55 +02:00
```bash
2025-08-21 19:03:25 +02:00
# Selective MCP usage
/sc:implement "React component" --magic --c7
# Only Magic and Context7 MCP
2025-08-18 11:58:55 +02:00
2025-08-21 19:03:25 +02:00
# Disable all MCP
/sc:implement "simple function" --no-mcp
# Pure Claude context only
2025-08-18 11:58:55 +02:00
2025-08-21 19:03:25 +02:00
# All available MCP
/sc:analyze complex-system/ --all-mcp
# Maximum tool availability (if configured)
2025-08-18 11:58:55 +02:00
```
2025-08-21 19:03:25 +02:00
## Complex Project Patterns
2025-08-18 11:58:55 +02:00
2025-08-21 19:03:25 +02:00
### Large Codebase Analysis
2025-08-18 11:58:55 +02:00
```bash
2025-08-21 19:03:25 +02:00
# Systematic exploration of large projects
# Step 1: Structure understanding
/sc:load project/
2025-08-22 19:18:44 +02:00
/sc:analyze . --overview --focus architecture
2025-08-18 11:58:55 +02:00
2025-08-21 19:03:25 +02:00
# Step 2: Identify problem areas
2025-08-21 19:05:51 +02:00
@agent -quality-engineer "identify high-risk modules"
2025-08-18 11:58:55 +02:00
2025-08-21 19:03:25 +02:00
# Step 3: Deep dive into specific areas
/sc:analyze high-risk-module/ --think-hard --focus quality
2025-08-18 11:58:55 +02:00
2025-08-21 19:03:25 +02:00
# Step 4: Implementation plan
/sc:workflow "improvement plan based on analysis"
2025-08-18 11:58:55 +02:00
```
2025-08-21 19:03:25 +02:00
### Multi-Module Development
2025-08-18 11:58:55 +02:00
```bash
2025-08-21 19:03:25 +02:00
# Developing interconnected modules
# Frontend module
/sc:implement "user interface module"
2025-08-21 19:05:51 +02:00
@agent -frontend-architect "ensure consistency"
2025-08-21 19:03:25 +02:00
# Backend module
/sc:implement "API module"
2025-08-21 19:05:51 +02:00
@agent -backend-architect "ensure compatibility"
2025-08-21 19:03:25 +02:00
# Integration layer
/sc:implement "frontend-backend integration"
# Context from both previous implementations guides this
2025-08-18 11:58:55 +02:00
```
2025-08-21 19:03:25 +02:00
### Cross-Technology Projects
2025-08-18 11:58:55 +02:00
```bash
2025-08-21 19:03:25 +02:00
# Projects with multiple technologies
# Python backend
2025-08-21 19:05:51 +02:00
@agent -python-expert "implement FastAPI backend"
2025-08-18 11:58:55 +02:00
2025-08-21 19:03:25 +02:00
# React frontend
2025-08-21 19:05:51 +02:00
@agent -frontend-architect "implement React frontend"
2025-08-18 11:58:55 +02:00
2025-08-21 19:03:25 +02:00
# DevOps setup
2025-08-21 19:05:51 +02:00
@agent -devops-architect "create deployment configuration"
2025-08-18 11:58:55 +02:00
2025-08-21 19:03:25 +02:00
# Integration documentation
/sc:document --type integration
2025-08-18 11:58:55 +02:00
```
2025-08-21 19:03:25 +02:00
## Migration Patterns
2025-08-18 11:58:55 +02:00
2025-08-21 19:03:25 +02:00
### Legacy System Analysis
2025-08-18 11:58:55 +02:00
```bash
2025-08-21 19:03:25 +02:00
# Understanding legacy systems
/sc:load legacy-system/
/sc:analyze . --focus architecture --verbose
2025-08-18 11:58:55 +02:00
2025-08-21 19:05:51 +02:00
@agent -refactoring-expert "identify modernization opportunities"
@agent -system-architect "propose migration strategy"
2025-08-18 11:58:55 +02:00
2025-08-21 19:03:25 +02:00
/sc:workflow "create migration plan"
```
2025-08-18 11:58:55 +02:00
2025-08-21 19:03:25 +02:00
### Incremental Migration
2025-08-18 11:58:55 +02:00
```bash
2025-08-21 19:03:25 +02:00
# Step-by-step migration approach
# Phase 1: Analysis
/sc:analyze legacy-module/ --comprehensive
2025-08-18 11:58:55 +02:00
2025-08-21 19:03:25 +02:00
# Phase 2: Design new architecture
2025-08-21 19:05:51 +02:00
@agent -system-architect "design modern replacement"
2025-08-18 11:58:55 +02:00
2025-08-21 19:03:25 +02:00
# Phase 3: Implementation
/sc:implement "modern module with compatibility layer"
2025-08-18 11:58:55 +02:00
2025-08-21 19:03:25 +02:00
# Phase 4: Validation
/sc:test --focus compatibility
2025-08-18 11:58:55 +02:00
```
2025-08-21 19:03:25 +02:00
## Review and Audit Patterns
2025-08-18 11:58:55 +02:00
2025-08-21 19:03:25 +02:00
### Security Audit Pattern
2025-08-18 11:58:55 +02:00
```bash
2025-08-21 19:03:25 +02:00
# Comprehensive security review
/sc:analyze . --focus security --think-hard
2025-08-21 19:05:51 +02:00
@agent -security "review authentication and authorization"
@agent -security "check for OWASP vulnerabilities"
2025-08-21 19:03:25 +02:00
/sc:document --type security-audit
2025-08-18 11:58:55 +02:00
```
2025-08-21 19:03:25 +02:00
### Code Quality Review
2025-08-18 11:58:55 +02:00
```bash
2025-08-21 19:03:25 +02:00
# Multi-aspect quality review
/sc:analyze src/ --focus quality
2025-08-21 19:05:51 +02:00
@agent -quality-engineer "review test coverage"
@agent -refactoring-expert "identify code smells"
2025-08-21 19:03:25 +02:00
/sc:improve --fix --preview
2025-08-18 11:58:55 +02:00
```
2025-08-21 19:03:25 +02:00
### Architecture Review
2025-08-18 11:58:55 +02:00
```bash
2025-08-21 19:03:25 +02:00
# System architecture assessment
2025-08-21 19:05:51 +02:00
@agent -system-architect "review current architecture"
2025-08-21 19:03:25 +02:00
/sc:analyze . --focus architecture --think-hard
2025-08-21 19:05:51 +02:00
@agent -performance-engineer "identify bottlenecks"
2025-08-21 19:03:25 +02:00
/sc:design "optimization recommendations"
2025-08-18 11:58:55 +02:00
```
2025-08-21 19:03:25 +02:00
## Important Clarifications
### What These Patterns Actually Do
2025-08-18 11:58:55 +02:00
2025-08-21 19:03:25 +02:00
- ✅ **Guide Claude's Thinking** : Provide structured approaches
- ✅ **Combine Contexts** : Layer multiple expertise areas
- ✅ **Improve Output Quality** : Better code generation through better context
- ✅ **Structure Workflows** : Organize complex tasks
2025-08-18 11:58:55 +02:00
2025-08-21 19:03:25 +02:00
### What These Patterns Don't Do
2025-08-18 11:58:55 +02:00
2025-08-21 19:03:25 +02:00
- ❌ **Execute in Parallel** : Everything is sequential context loading
- ❌ **Coordinate Processes** : No actual process coordination
- ❌ **Optimize Performance** : No code runs, so no performance impact
- ❌ **Persist Between Sessions** : Each conversation is independent
2025-08-18 11:58:55 +02:00
2025-08-21 19:03:25 +02:00
## Best Practices for Advanced Usage
2025-08-18 11:58:55 +02:00
2025-08-21 19:03:25 +02:00
### Context Management
2025-08-18 11:58:55 +02:00
2025-08-21 19:03:25 +02:00
1. **Layer Deliberately** : Add contexts in logical order
2. **Avoid Overload** : Too many agents can dilute focus
3. **Use Manual Control** : Override auto-activation when needed
4. **Maintain Conversation Flow** : Keep related work in same conversation
2025-08-18 11:58:55 +02:00
2025-08-21 19:03:25 +02:00
### Command Efficiency
2025-08-18 11:58:55 +02:00
2025-08-21 19:03:25 +02:00
1. **Progress Logically** : Broad → Specific → Implementation
2. **Reuse Context** : Later commands benefit from earlier context
3. **Document Decisions** : Use `/sc:save` for important summaries
4. **Scope Appropriately** : Focus on manageable chunks
2025-08-18 11:58:55 +02:00
2025-08-21 19:03:25 +02:00
### Flag Usage
2025-08-18 11:58:55 +02:00
2025-08-21 19:03:25 +02:00
1. **Match Task Complexity** : Simple tasks don't need `--ultrathink`
2. **Control Output** : Use `--uc` for concise results
3. **Manage MCP** : Only activate needed servers
4. **Avoid Conflicts** : Don't use contradictory flags
2025-08-18 11:58:55 +02:00
2025-08-21 19:03:25 +02:00
## Summary
2025-08-18 11:58:55 +02:00
2025-08-21 19:03:25 +02:00
Advanced SuperClaude patterns are about sophisticated context management and command sequencing. They help Claude Code generate better outputs by providing richer, more structured context. Remember: all "coordination" and "optimization" happens in how Claude interprets the context, not in any actual execution or parallel processing.