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
/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
/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
/ctx-help
Show all ContextVault commands and their descriptions. Quick reference for available commands.
/ctx-help
# 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
/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
/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
/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
/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)
/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
/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

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-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

Reading & Searching

/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

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
/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
/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

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
/ctx-share
Export vault docs for sharing. Create shareable documentation bundles.
/ctx-share project
# Exports project vault as shareable archive

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

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)
/ctx-changelog
View ContextVault changelog and version history. See what's new in each release.
/ctx-changelog
# 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

Quick Reference Table

Command Purpose Creates
/ctx-initInitialize vaultindex.md
/ctx-docGeneral documentationP/G00X_topic.md
/ctx-errorBug fix docsP00X_error_*.md
/ctx-decisionArchitecture decisionsP00X_decision_*.md
/ctx-planTask planningP00X_plan_*.md
/ctx-snippetCode snippetsG00X_snippet_*.md
/ctx-intelCodebase explorationP00X_intel_*.md
/ctx-bootstrapAuto-document projectMultiple docs
/ctx-handoffSession summaryP00X_handoff_*.md
/ctx-searchFind docs
/ctx-readView doc
/ctx-updateEdit doc
/ctx-statusView stats
/ctx-modeChange mode
/ctx-helpShow help