Commands Reference
All 25 ContextVault slash commands with usage examples.
Quick Reference
Type any command in Claude Code to execute it. Commands that create documents will auto-route to the correct vault (global or project).
Setup & Status
/ctx-init
Initialize ContextVault in the current project. Creates the
.claude/vault/ directory with an index file.
/ctx-init
# Creates: ./.claude/vault/index.md
# Creates: ./.claude/vault/index.md
/ctx-status
Show vault status and statistics. Displays document counts, current mode, and health overview.
/ctx-status
# Shows: Global docs: 5, Project docs: 12, Mode: full
# Shows: Global docs: 5, Project docs: 12, Mode: full
/ctx-health
Check vault health and fix issues. Verifies index consistency, finds orphan docs, and repairs problems.
/ctx-health
# Scans both vaults and reports any issues
# Scans both vaults and reports any issues
/ctx-help
Show all ContextVault commands and their descriptions. Quick reference for available commands.
/ctx-help
# Lists all 25 commands with brief descriptions
# Lists all 25 commands with brief descriptions
Documentation Commands
/ctx-doc
Quick document a learning, feature, or finding. General-purpose command for capturing knowledge.
/ctx-doc
# Prompts for: topic, details, global/project routing
# Prompts for: topic, details, global/project routing
/ctx-error
Document a bug fix or error resolution. Captures error message, root cause, and solution.
/ctx-error
# Creates: P00X_error_description.md
# Includes: Error, Cause, Solution, Prevention
# Creates: P00X_error_description.md
# Includes: Error, Cause, Solution, Prevention
/ctx-decision
Document an architectural or technical decision. Records options considered, reasoning, and trade-offs.
/ctx-decision
# Creates: P00X_decision_topic.md
# Includes: Context, Options, Decision, Trade-offs
# Creates: P00X_decision_topic.md
# Includes: Context, Options, Decision, Trade-offs
/ctx-plan
Document implementation plan for multi-step tasks. Track goals, steps, and progress.
/ctx-plan
# Creates: P00X_plan_taskname.md
# Includes: Goals, Steps checklist, Progress tracking
# Creates: P00X_plan_taskname.md
# Includes: Goals, Steps checklist, Progress tracking
/ctx-snippet
Save a useful code snippet for reuse. Store patterns, utilities, and reusable code.
/ctx-snippet
# Creates: G00X_snippet_name.md (usually global for reuse)
# Creates: G00X_snippet_name.md (usually global for reuse)
/ctx-intel
Document codebase exploration findings. Record architecture patterns, code structure, and discoveries.
/ctx-intel
# Creates: P00X_intel_topic.md
# Includes: Structure, Patterns, Key files
# Creates: P00X_intel_topic.md
# Includes: Structure, Patterns, Key files
/ctx-explain
Explain a concept and save to vault. Document your understanding of topics for future reference.
/ctx-explain
# Creates: G00X_explain_concept.md or P00X_explain_concept.md
# Creates: G00X_explain_concept.md or P00X_explain_concept.md
Auto-Documentation
/ctx-bootstrap
Auto-scan codebase and generate comprehensive documentation. Creates architecture doc and feature docs for the entire project.
/ctx-bootstrap
/ctx-bootstrap --interactive # Ask before each doc
# Creates: P001_architecture.md + P00X_feature_*.md
/ctx-bootstrap --interactive # Ask before each doc
# Creates: P001_architecture.md + P00X_feature_*.md
/ctx-handoff
Create session handoff summary for continuity. Summarizes what was done and what's next for the following session.
/ctx-handoff
# Creates: P00X_handoff_YYYY-MM-DD.md
# Includes: Completed, In Progress, Next Steps
# Creates: P00X_handoff_YYYY-MM-DD.md
# Includes: Completed, In Progress, Next Steps
Reading & Searching
/ctx-search
Search across vault documents. Find existing documentation by topic, keyword, or related terms.
/ctx-search auth
/ctx-search "database migration"
# Searches both global and project indexes
/ctx-search "database migration"
# Searches both global and project indexes
/ctx-read
Read a document by ID. View the full content of a vault document.
/ctx-read P001
/ctx-read G005
# Displays full document content
/ctx-read G005
# Displays full document content
Editing & Updates
/ctx-update
Update an existing document by ID. Modify content while preserving history.
/ctx-update P003
# Opens document for editing, appends to history
# Opens document for editing, appends to history
/ctx-new
Create a new document with guided routing. Interactive prompts help choose the right vault and format.
/ctx-new
# Guides you through: Topic, Vault, Template selection
# Guides you through: Topic, Vault, Template selection
/ctx-note
Add a quick note to existing document. Append information without a full edit.
/ctx-note P005 "Remember to handle edge case X"
# Appends note with timestamp
# Appends note with timestamp
/ctx-link
Link related documents together. Create bidirectional references between docs.
/ctx-link P003 P007
# Adds "Related: P007" to P003 and vice versa
# Adds "Related: P007" to P003 and vice versa
Import & Export
/ctx-import
Import external documentation into vault. Bring existing markdown files into the vault system.
/ctx-import ./docs/api-guide.md
# Converts and adds to vault with proper ID
# Converts and adds to vault with proper ID
Configuration
/ctx-mode
Switch between local, global, or full mode. Also set enforcement level.
/ctx-mode local # Project vault only
/ctx-mode full # Both vaults
/ctx-mode global # Global vault only
/ctx-mode enforcement strict # Set enforcement
/ctx-mode full # Both vaults
/ctx-mode global # Global vault only
/ctx-mode enforcement strict # Set enforcement
Maintenance
/ctx-upgrade
Upgrade project-level ContextVault files. Updates
./CLAUDE.md and .claude/settings.json with latest instructions. For global upgrade, re-run the installer.
/ctx-upgrade
# Updates project instructions (not global installation)
# Updates project instructions (not global installation)
/ctx-changelog
View ContextVault changelog and version history. See what's new in each release.
/ctx-changelog
# Displays version history with changes
# Displays version history with changes
/ctx-quiz
Test knowledge retention from vault docs. Quiz yourself on documented learnings.
/ctx-quiz
# Generates questions from your vault docs
# Generates questions from your vault docs
Quick Reference Table
| Command | Purpose | Creates |
|---|---|---|
/ctx-init | Initialize vault | index.md |
/ctx-doc | General documentation | P/G00X_topic.md |
/ctx-error | Bug fix docs | P00X_error_*.md |
/ctx-decision | Architecture decisions | P00X_decision_*.md |
/ctx-plan | Task planning | P00X_plan_*.md |
/ctx-snippet | Code snippets | G00X_snippet_*.md |
/ctx-intel | Codebase exploration | P00X_intel_*.md |
/ctx-bootstrap | Auto-document project | Multiple docs |
/ctx-handoff | Session summary | P00X_handoff_*.md |
/ctx-search | Find docs | — |
/ctx-read | View doc | — |
/ctx-update | Edit doc | — |
/ctx-status | View stats | — |
/ctx-mode | Change mode | — |
/ctx-help | Show help | — |