Skip to main content

Claude Code Basics

Claude Code is the AI coding assistant that SpecWeave is built on. Understanding its core concepts helps you get the most out of SpecWeave.

Cross-Platform Note

While Claude Code provides the deepest integration (native hooks, skills, agents), SpecWeave's core workflow also works with Cursor, Windsurf, GitHub Copilot, and any AI IDE via CLAUDE.md instructions.


What is Claude Code?

Claude Code is Anthropic's CLI-based AI coding assistant. Unlike chat-based tools (ChatGPT, Claude.ai), Claude Code:

  • Runs inside your terminal, with direct access to your codebase
  • Can read, write, and edit files directly
  • Can run commands (tests, builds, git operations)
  • Supports plugins that extend its capabilities
  • Works with the latest Claude models (Opus 4.6, Sonnet 4.6, Haiku 4.5)
# Install Claude Code
npm install -g @anthropic-ai/claude-code

# Start in your project directory
cd your-project
claude

Key Concepts

Models

Claude Code supports multiple AI models with different strengths:

ModelBest ForSpeedCost
Opus 4.6Complex architecture, multi-file changes, autonomous workSlowerHigher
Sonnet 4.6Balanced daily coding, reviews, refactoringMediumMedium
Haiku 4.5Quick lookups, simple edits, documentationFastLow

Recommendation: Use Opus 4.6 for SpecWeave workflows (especially sw:auto). Its reasoning depth is critical for multi-step planning and implementation.

Plugins

Plugins are extension packages that add capabilities to Claude Code. SpecWeave is delivered as a set of plugins.

Claude Code (base)
└── Plugins
└── specweave ← Unified plugin
├── Core workflow (increment, do, auto, done)
├── GitHub integration (Issues, PRs, milestones)
├── JIRA integration (epics, stories, sprints)
└── ... (all integrations bundled)

Plugins load on-demand based on what you're doing. Say "React frontend" and the frontend plugin activates. Say "Kubernetes deploy" and the infrastructure plugin loads. No manual configuration needed.

Skills

Skills are auto-activating expertise modules inside plugins. You can trigger them in two ways:

Natural language -- just describe what you need. SpecWeave detects your intent and activates the right skill:

You: "Design the authentication architecture"

Claude Code detects: "architecture" keyword

sw:architect skill activates → System design expertise loads

Slash commands -- for explicit control:

"Design the authentication architecture"

Other examples: sw:pm (product management), sw:security (security audit).

Most users never need slash commands. Describing what you want is enough -- SpecWeave routes to the right skill automatically.

SpecWeave has ~48 built-in skills covering PM, architecture, security, testing, frontend, backend, DevOps, and more.

For a deep dive into how skills, plugins, and marketplaces work, see the Fundamentals guide.

Agents

Agents are specialized subprocesses that handle specific types of work. Think of them as team members with expertise:

AgentWhat It Does
PM AgentWrites user stories, defines acceptance criteria
Architect AgentDesigns systems, writes ADRs, picks technology
QA Lead AgentCreates test strategies, defines quality gates
Security AgentReviews for OWASP vulnerabilities, threat models
Frontend AgentReact/Vue/Angular architecture and patterns
Backend AgentAPI design, database optimization, .NET/Node.js patterns

22+ agents work together. They activate based on context - you don't need to manage them manually.

Hooks

Hooks are automated actions that fire in response to events. SpecWeave uses hooks to enforce quality:

HookWhen It FiresWhat It Does
task-ac-syncAfter completing a taskUpdates acceptance criteria in spec.md
tdd-enforcementBefore marking task completeEnsures tests were written first
grill-gateBefore closing incrementEnsures code review was done
living-specsAfter task completionUpdates living documentation

Hooks run automatically. You don't invoke them - they enforce quality standards behind the scenes.

Three Invocation Methods

MethodHow It WorksExample
Natural languageDescribe what you want -- SpecWeave detects intent"I want to add dark mode"
Slash commandsExplicit Claude Code commands with sw: prefixsw:increment "dark mode"
KeywordsSame command names without prefix (other AI tools)increment "dark mode"

All three trigger the same underlying skills and produce identical results.

Common Activation Phrases

What You WantNatural LanguageSlash Command
Plan a feature"Let's build [feature]"sw:increment
Start building"Start implementing"sw:do
Check progress"What's the status?"sw:progress
Go autonomous"Ship while I sleep"sw:auto
Finish up"We're done"sw:done
Brainstorm"Let's brainstorm ideas"sw:brainstorm

How SpecWeave Uses Claude Code

SpecWeave layers a spec-driven workflow on top of Claude Code's capabilities:

Without SpecWeave: Claude Code is a powerful AI assistant that loses context when the chat ends.

With SpecWeave: Claude Code becomes an AI development team with permanent memory, quality gates, and external tool sync.


Why Claude Code Over Other Tools?

SpecWeave works with other AI tools, but Claude Code provides the deepest integration:

CapabilityClaude CodeOther AI Tools
Native pluginsFull plugin systemVia CLAUDE.md instructions
Hooks (automation)Pre/post tool hooksNot available
Skill auto-activationKeyword-based loadingManual prompting
Agent spawningNative subagent supportNot available
Terminal accessDirect command executionVaries by tool
File operationsRead, write, edit directlyVaries by tool

Bottom line: Claude Code + SpecWeave = native integration. Other tools + SpecWeave = works, but without hooks and auto-activation.


Next Steps