Back to Superclaude Framework

Claude Code Integration Guide

docs/user-guide/claude-code-integration.md

4.3.011.8 KB
Original Source

Claude Code Integration Guide

How SuperClaude integrates with — and extends — Claude Code's native features.

Overview

SuperClaude enhances Claude Code through context engineering. It doesn't replace Claude Code — it configures and extends it with specialized commands, agents, modes, and development patterns through Claude Code's native extension points.

This guide maps every SuperClaude feature to its Claude Code integration point, and identifies gaps where SuperClaude could better leverage Claude Code's capabilities.


Integration Points

1. Slash Commands → Claude Code Custom Commands

Claude Code native: Reads .md files from ~/.claude/commands/ and makes them available as / commands. Supports YAML frontmatter, argument substitution ($ARGUMENTS, $0, $1), dynamic context injection (!`command`), and subagent execution (context: fork).

SuperClaude provides: 30 slash commands installed to ~/.claude/commands/sc/, namespaced as /sc:*.

CategoryCommands
Planning & Design/sc:pm, /sc:brainstorm, /sc:design, /sc:estimate, /sc:spec-panel
Development/sc:implement, /sc:build, /sc:improve, /sc:cleanup, /sc:explain
Testing & Quality/sc:test, /sc:analyze, /sc:troubleshoot, /sc:reflect
Documentation/sc:document, /sc:help
Version Control/sc:git
Research/sc:research, /sc:business-panel
Project Management/sc:task, /sc:workflow
Utilities/sc:agent, /sc:index-repo, /sc:recommend, /sc:select-tool, /sc:spawn, /sc:load, /sc:save

Installation: superclaude install

2. Agents → Claude Code Custom Subagents

Claude Code native: Supports custom subagent definitions in ~/.claude/agents/ (user) and .claude/agents/ (project). Agents have YAML frontmatter with model, allowed-tools, effort, context, and hooks fields. Invocable via @agent-name syntax. 6 built-in subagents: Explore, Plan, General-purpose, Bash, statusline-setup, Claude Code Guide.

SuperClaude provides: 20 domain-specialist agents installed to ~/.claude/agents/.

AgentSpecialization
@pm-agentProject management, PDCA cycles, context persistence
@system-architectSystem design, architecture decisions
@frontend-architectUI/UX, component design, accessibility
@backend-architectAPIs, databases, infrastructure
@security-engineerSecurity audit, vulnerability analysis
@deep-researchMulti-source research with citations
@deep-research-agentAlternative research agent
@quality-engineerTesting strategy, code quality
@performance-engineerOptimization, profiling, benchmarks
@python-expertPython-specific best practices
@technical-writerDocumentation, API docs
@devops-architectCI/CD, deployment, infrastructure
@refactoring-expertCode refactoring patterns
@requirements-analystRequirements engineering
@root-cause-analystRoot cause analysis
@socratic-mentorTeaching through questions
@learning-guideLearning path guidance
@self-reviewCode self-review
@repo-indexRepository indexing
@business-panel-expertsBusiness stakeholder analysis

Installation: superclaude install (installs both commands and agents)

3. Behavioral Modes

Claude Code native: Supports permission modes (default, plan, acceptEdits, bypassPermissions), effort levels (low, medium, high, max), and extended thinking. No direct "behavioral mode" concept — SuperClaude adds this through context injection.

SuperClaude provides: 7 behavioral modes that adapt Claude's response patterns:

ModeEffectClaude Code Mapping
BrainstormingDivergent thinking, idea generationContext injection via command
Business PanelMulti-stakeholder analysisMulti-agent orchestration
Deep ResearchSystematic investigation with citationsExtended thinking + research agent
IntrospectionSelf-reflection, meta-analysisExtended thinking context
OrchestrationMulti-agent coordinationSubagent delegation
Task ManagementPDCA cycles, progress trackingTodoWrite + session persistence
Token EfficiencyMinimal token usage, concise responsesEffort level adjustment

4. Skills → Claude Code Skills System

Claude Code native: Full skills system with YAML frontmatter (name, description, allowed-tools, model, effort, context, agent, hooks), argument substitution, dynamic context injection, subagent execution, and auto-discovery in .claude/skills/ directories. Skills can be user-invocable or auto-triggered.

SuperClaude provides: 1 skill currently (confidence-check). This is a significant gap — many SuperClaude commands could be reimplemented as proper Claude Code skills for better integration.

Installation: superclaude install-skill <name>

5. Hooks → Claude Code Hooks System

Claude Code native: 28 hook event types with 4 handler types (command, HTTP, prompt, agent). Events include SessionStart, SessionEnd, PreToolUse, PostToolUse, Stop, SubagentStart, SubagentStop, UserPromptSubmit, PreCompact, PostCompact, TaskCompleted, WorktreeCreate, and more. Hooks are configured in settings.json under the hooks key.

SuperClaude provides: Hook definitions in src/superclaude/hooks/hooks.json. Currently limited — does not leverage many available hook events.

Gap: SuperClaude could use hooks for:

  • SessionStart — Auto-restore PM Agent context
  • PostToolUse — Self-check validation after edits
  • Stop — Session summary and next-actions persistence
  • TaskCompleted — Reflexion pattern trigger
  • SubagentStop — Quality gate checks

6. Settings → Claude Code Settings System

Claude Code native: 5 settings scopes (managed, CLI flags, local project, shared project, user). Supports permissions (allow/ask/deny), tool-specific rules with wildcards (Bash(npm *), Edit(/path/**)), sandbox configuration, model overrides, auto-memory, and MCP server management.

SuperClaude provides: Project-level .claude/settings.json with basic permission rules.

Gap: Could provide recommended settings profiles for different workflows (e.g., strict security mode, autonomous development mode, research mode).

7. MCP Servers → Claude Code MCP Integration

Claude Code native: Supports stdio and SSE transports, OAuth authentication, 3 configuration scopes (local, project, user), tool search, channel push notifications, and elicitation (interactive input). 60+ servers in the official registry.

SuperClaude provides: 8 pre-configured servers + AIRIS Gateway:

ServerPurposeTransport
AIRIS GatewayUnified gateway with 60+ toolsSSE
TavilyWeb search for deep researchstdio
Context7Official library documentationstdio
Sequential ThinkingMulti-step problem solvingstdio
PlaywrightBrowser automation and E2E testingstdio
SerenaSemantic code analysisstdio
MagicUI component generationstdio
MorphLLMFast Apply for code modificationsstdio

Installation: superclaude mcp (interactive) or superclaude mcp --servers tavily context7

8. Pytest Plugin (Auto-loaded)

Claude Code native: No built-in test framework — relies on tool use (Bash) to run tests.

SuperClaude adds: Auto-loaded pytest plugin registered via pyproject.toml entry point.

Fixtures: confidence_checker, self_check_protocol, reflexion_pattern, token_budget, pm_context

Auto-markers: Tests in /unit/@pytest.mark.unit, /integration/@pytest.mark.integration

Custom markers: confidence_check, self_check, reflexion, complexity


Feature Mapping: Claude Code ↔ SuperClaude

Claude Code FeatureSuperClaude EnhancementGap?
60+ built-in / commands30 custom /sc:* commandsComplementary
6 built-in subagents20 domain-specialist @agentsComplementary
Skills system (YAML + MD)1 skill (confidence-check)Large gap — should convert commands to skills
28 hook eventsBasic hook definitionsLarge gap — most events unused
5 settings scopes1 project scope usedMedium gap — no recommended profiles
Permission modes (4)Not leveragedGap — could provide mode presets
Extended thinkingDeep Research mode uses itPartial
Agent teams (preview)Orchestration modePartial alignment
Voice dictation (20 langs)Not leveragedNot applicable
Desktop app featuresNot leveragedNot applicable (CLI-focused)
Plan modeNot leveragedGap — could integrate with confidence checks
Session persistencePM Agent memory filesPartial — could use native sessions
/compact context mgmtToken Efficiency modePartial alignment
MCP 60+ registry servers8 pre-configured + gatewayPartial
Worktree isolationDocumented in CLAUDE.mdDocumented
--effort levelsToken Efficiency modePartial alignment
/batch parallel changesParallel execution engineComplementary
Fast modeNot leveragedNot applicable

Key Gaps to Address

High Priority

  1. Skills Migration: Convert key /sc:* commands into proper Claude Code skills with YAML frontmatter. This enables auto-triggering, tool restrictions, effort overrides, and better IDE integration.

  2. Hooks Integration: Leverage Claude Code's 28 hook events for:

    • SessionStart → PM Agent context restoration
    • Stop → Session summary persistence
    • PostToolUse → Self-check after edits
    • TaskCompleted → Reflexion pattern
  3. Plan Mode Integration: Connect confidence checks with Claude Code's native plan mode — block implementation when confidence < 70%.

Medium Priority

  1. Settings Profiles: Provide recommended .claude/settings.json profiles for different workflows (strict security, autonomous dev, research).

  2. Native Session Persistence: Use Claude Code's --continue / --resume instead of custom memory files for PM Agent context.

  3. Permission Presets: Pre-configured permission rules for SuperClaude's common workflows.

Future (v5.0+)

  1. TypeScript Plugin System: Native Claude Code plugin marketplace distribution.
  2. IDE Extensions: VS Code / JetBrains integration for SuperClaude features.
  3. Agent Teams: Align Orchestration mode with Claude Code's agent teams feature.

Claude Code Native Features Reference

For developers working on SuperClaude, these are the key Claude Code capabilities to be aware of:

FeatureDocumentation
Custom commands~/.claude/commands/*.md with YAML frontmatter
Custom agents~/.claude/agents/*.md with model/tools/effort config
Skills~/.claude/skills/ with auto-discovery and argument substitution
Hooks28 events in settings.json → command/HTTP/prompt/agent handlers
Settings5 scopes: managed > CLI > local > shared > user
PermissionsBash(pattern), Edit(path), mcp__server__tool rules
MCPstdio/SSE transports, OAuth, 3 scopes, elicitation
SubagentsAgent tool with model/tools/isolation/background options
Plan modeRead-only exploration, visual plan markdown
Extended thinking--effort max, Alt+T toggle, MAX_THINKING_TOKENS
Voice20 languages, push-to-talk, /voice command
Session mgmtNamed sessions, resume, fork, 7-day persistence
Context/context visualization, auto-compaction at ~95%