Skip to main content

Cheat Sheet

Version: 0.5.2 | Updated: 2026-04-22

Claude Code only: The /kmgraph: prefix requires Claude Code with this plugin installed. Other IDEs access equivalent functionality through MCP tools.

One-page cheat sheet for the Knowledge Management Graph. For detailed documentation, see Command Guide.


I Want To...โ€‹

  • Start a new knowledge graph โ†’ /kmgraph:kmg-init
  • Create a cross-project personal KG โ†’ /kmgraph:kmg-init-personal-kg
  • Document what I just learned โ†’ /kmgraph:kmg-capture-lesson [topic]
  • Find something I documented before โ†’ /kmgraph:kmg-recall [query]
  • See what's in my knowledge graph โ†’ /kmgraph:kmg-status
  • Track a complex bug across multiple attempts โ†’ /kmgraph:kmg-meta-issue
  • Set up team knowledge sharing โ†’ /kmgraph:kmg-config-sanitization
  • Summarize my current chat session โ†’ /kmgraph:kmg-session-summary
  • Extract my chat history โ†’ /kmgraph:kmg-extract-chat
  • Sync lessons to the knowledge graph โ†’ /kmgraph:kmg-update-graph
  • Check for sensitive data before sharing โ†’ /kmgraph:kmg-check-sensitive
  • Work with multiple knowledge graphs โ†’ /kmgraph:kmg-list to see all configured graphs; each command run from a project's directory automatically targets that project's graph (no switching needed)
  • Link lessons to GitHub issues โ†’ /kmgraph:kmg-link-issue
  • Update plugin documentation โ†’ /kmgraph:kmg-update-doc --user-facing
  • Create comprehensive project handoff โ†’ /kmgraph:kmg-handoff

Commands by Difficultyโ€‹

๐ŸŸข Essential (Start Here)โ€‹

First-time users need these for basic operation:

CommandPurpose
/kmgraph:kmg-initInitialize a new knowledge graph with wizard-based setup
/kmgraph:kmg-init-personal-kgCreate personal KG at ~/.kmgraph/ for cross-project lessons
/kmgraph:kmg-capture-lesson [topic]Document lessons learned with git metadata tracking
/kmgraph:kmg-statusView the resolved knowledge graph's info and quick reference
/kmgraph:kmg-recall [query]Search across all memory systems (lessons, decisions, knowledge)

โ†’ Full details in Command Guide

๐ŸŸก Intermediate (Once Comfortable)โ€‹

Active users use these for regular workflows:

CommandPurpose
/kmgraph:kmg-update-graphExtract knowledge graph entries from lessons. Uses background file reading for large batches when context-mode is installed
/kmgraph:kmg-add-categoryAdd a new category to existing knowledge graph
/kmgraph:kmg-session-summaryCreate summary of current chat session; --snapshot for lightweight mid-session capture
/kmgraph:kmg-listDisplay all configured knowledge graphs
/kmgraph:kmg-check-sensitiveScan knowledge graph for potentially sensitive information
/kmgraph:kmg-config-sanitizationInteractive wizard for pre-commit hook setup
/kmgraph:kmg-extract-chatExtract chat history from Claude, Gemini, and Codex logs (--today, --date, --after, --before, --project); large days auto-split into YYYY-MM-DD/ subfolder
/kmgraph:kmg-update-docUpdate plugin/project docs (--user-facing) or KG content

โ†’ Full details in Command Guide

๐Ÿ”ด Advanced (Power Features)โ€‹

Power users leverage these for complex workflows:

CommandPurpose
/kmgraph:kmg-meta-issueInitialize meta-issue tracking for complex multi-attempt problems
/kmgraph:kmg-start-issue-trackingInitialize issue tracking with structured docs, auto-creates GitHub Issue (Step 5.0), and Git branch
/kmgraph:kmg-update-issue-planSync knowledge graph โ†’ plan โ†’ issue โ†’ GitHub
/kmgraph:kmg-link-issueManually link existing lesson or ADR to GitHub issue
/kmgraph:kmg-sync-allAutomated full sync pipeline (4 steps โ†’ 1 command). Uses background file scanning when context-mode is installed. Refreshes search index automatically if built
/kmgraph:kmg-handoffCreate comprehensive handoff documentation for transitions or onboarding

โ†’ Full details in Command Guide


Auto-Triggered Skillsโ€‹

Skills activate automatically based on conversation context. No invocation needed.

SkillTrigger ConditionSuggests
lesson-captureBug solved, breakthrough made, "figured it out"/kmgraph:kmg-capture-lesson with pre-filled context
kg-recallHistory question, "have we solved this?", past decision/kmgraph:kmg-recall with extracted search terms
session-wrapContext approaching limit, major milestone, session end/kmgraph:kmg-session-summary before compaction
adr-guideArchitecture decision discussed, "I'm thinking of using..."/kmgraph:kmg-create-adr with decision guidance
doc-update-router"update [doc name]", "update the session summary", "update the changelog"Routes to /kmgraph:kmg-update-doc --user-facing, /kmgraph:kmg-session-summary, or /kmgraph:kmg-create-adr
capture-router"capture that" / "remember that" / "save that"Auto-detects type+location, single confirmation before writing
gov-execute-plan"execute plan", implementation start, docs/plans/*.md mentionedZero-deviation 8-step execution protocol
brainstorm-recallsuperpowers:brainstorming invokedRuns kmgraph:kmg-recall before any recommendation; results appear under "Prior Art"
stuck-work-escalation3+ failed attempts, 30+ min stuck, same bug resisting fixesOpus diagnosis gate โ†’ hypothesis logging โ†’ exit-path decision at 5 attempts
docs-impact-scan"push to origin", "push and merge", "open PR", "create PR", "finishing up", "ready to push"Scans changed identifiers, validates affected docs list, dispatches /kmgraph:kmg-update-doc --user-facing for each
sidebar-updateDoc file moved or renamed, git mv docs/..., "move [doc]", "rename [doc]"Updates stale id: in sidebars.js; scans for broken internal links

Agents Quick Referenceโ€‹

Heavy-lift task handlers. Usually invoked automatically by skills/commands.

AgentWhen UsedExample
lesson-capture-agentCapturing lessons from sessionsAuto-triggered after bug fix
recall-agentSearching knowledge graphVia /kmgraph:kmg-recall [query] command
session-summary-agentSession wrap-up and documentationAuto-triggered at end of work
mcp-setup-agentMCP server setup and configurationIDE detection + auto-config
knowledge-extractorBatch KG extraction and parsingVia /kmgraph:kmg-sync-all
sync-all-agentExecuting KG sync pipelineVia /kmgraph:kmg-sync-all command
create-adr-agentADR creation wizardVia /kmgraph:kmg-create-adr command
knowledge-reviewerQuality review for lessons and ADRsVia /kmgraph:kmg-update-graph command

See Concepts Guide ยง Four-Layer Architecture for full agent overview and when each operates.


Delegation for Heavy-Lift Tasksโ€‹

When processing large batches or complex files, delegate to subagents to reduce context usage.

Extraction & Parsing (knowledge-extractor)โ€‹

Use for: multi-file analysis, chat history parsing (10+ sessions), large lesson batches (50+ KB)

# Before delegation (default)
/kmgraph:kmg-extract-chat --after=2026-02-01 # Loads all sessions into context

# Suggested delegation
/kmgraph:kmg-extract-chat --project=knowledge-graph
# (Assistant suggests: "Consider delegating to knowledge-extractor for multi-project filtering")

Documentation & Git (session-documenter)โ€‹

Use for: full session parsing across multiple branches, automated session summaries

# Before delegation (default)
/kmgraph:kmg-session-summary # Parses entire chat history in-context

# Suggested delegation
# (Assistant suggests: "For multi-session history, delegate to session-documenter")

Knowledge Graph Updates (knowledge-extractor)โ€‹

Use for: bulk lesson extraction (10+ lessons at once), pattern analysis

# Before delegation (default)
/kmgraph:kmg-update-graph # Processes all new lessons in-context

# Suggested delegation
# (Assistant suggests: "For 50+ KB of lessons, delegate to knowledge-extractor")

Key Conceptsโ€‹

  • Knowledge Graph: Structured collection of lessons learned, decisions, and patterns stored as markdown files with YAML frontmatter
  • YAML Frontmatter: Metadata at the top of files (title, date, tags, context, etc.) used for organization and search
  • Git Metadata: Automatic tracking of branch, commit, PR, and issue information when capturing lessons
  • MEMORY.md: Persistent context file synced bidirectionally to Claude's system prompt for cross-session awareness
  • Sanitization: Process of detecting and removing sensitive data (API keys, credentials, PII) before sharing code publicly
  • Meta-Issue: Multi-attempt problem tracking system for complex bugs that span multiple debugging sessions
  • Category: Organizational unit within a knowledge graph (e.g., "debugging", "architecture", "process")
  • Target Knowledge Graph: The knowledge graph a command operates on, resolved from the current working directory โ€” not a manually selected "active" graph
  • Session Summary: Markdown summary of a chat session extracted from conversation history
  • Recall: Unified search across lessons learned, decisions, knowledge graph, and session summaries
  • Search Index (kg_fts5_rebuild): Optional catalog of all knowledge graph content. Build or refresh it for faster, relevance-ranked search results. Updates automatically during sync-all once enabled

Common Workflowsโ€‹

First Time Setup (5 minutes)โ€‹

  1. /kmgraph:kmg-init โ†’ Follow wizard to configure location, categories, and git strategy

  2. /kmgraph:kmg-capture-lesson โ†’ Document your first learning with guided prompts

  3. /kmgraph:kmg-status โ†’ Verify everything is working correctly

Daily Use (10 minutes)โ€‹

  1. Solve a problem or learn something new

  2. /kmgraph:kmg-capture-lesson โ†’ Document it while fresh in your mind

  3. /kmgraph:kmg-update-graph โ†’ Sync to knowledge graph for quick reference

Before Sharing Code (2 minutes)โ€‹

  1. /kmgraph:kmg-check-sensitive โ†’ Scan for API keys, credentials, PII

  2. Review findings carefully

  3. Remove sensitive data before git push

Working with Complex Bugs (30+ minutes)โ€‹

  1. /kmgraph:kmg-meta-issue โ†’ Initialize tracking for multi-attempt problem

  2. Attempt fixes, document each try

  3. /kmgraph:kmg-update-issue-plan โ†’ Sync progress to GitHub issue

Multi-Graph Workflowsโ€‹

  1. /kmgraph:kmg-list โ†’ See all configured knowledge graphs

  2. cd into the other project's directory โ†’ Commands run there automatically target that project's KG โ€” no switch step


Quick Tipsโ€‹

  • Start with Essential commands โ€” Add Intermediate and Advanced commands as needs arise
  • Use /kmgraph:kmg-status often โ€” Shows what's in the resolved knowledge graph at a glance
  • /kmgraph:kmg-recall searches everything โ€” Lessons, decisions, knowledge entries, and session summaries; add --scope=all to include personal KG
  • MEMORY.md auto-updates โ€” Check it before important sessions to see what context is loaded
  • Commands use colon syntax โ€” It's /kmgraph: not /knowledge- (colon, not hyphen)
  • Git metadata is automatic โ€” Branch, commit, PR, and issue info captured when you create lessons
  • Categories are flexible โ€” Start with defaults, add custom ones with /kmgraph:kmg-add-category
  • Sanitization is a wizard โ€” /kmgraph:kmg-config-sanitization guides you through pre-commit hook setup
  • Multiple KGs are powerful โ€” Separate knowledge graphs for work, personal, open-source projects; personal KG shares lessons across all of them

Need More Help?โ€‹

  • Want detailed examples? โ†’ Command Guide โ€” All commands with full documentation
  • New to the system? โ†’ Quickstart โ€” Setup and first lesson walkthrough
  • Understanding terminology? โ†’ Concepts Guide โ€” Definitions of all key terms
  • Using other platforms? โ†’ Platform Adaptation โ€” Cursor, Windsurf, Continue setup
  • Configuring settings? โ†’ Configuration Guide โ€” Post-install options and workflows

Getting started:

  • Quickstart โ€” Installation, setup wizard, first lesson (5 min)
  • Installation โ€” Universal installer for all platforms and LLMs
  • Configuration Guide โ€” Categories, storage paths, and KG structure

Learning:

  • Command Reference Guide โ€” Complete command documentation with examples and learning path
  • Concepts Guide โ€” Plain-English definitions and explanations of all key terms
  • Examples (examples/) โ€” Real-world lesson, ADR, and KG entry examples

Advanced topics:

  • Workflows โ€” Step-by-step guides for manual workflows
  • Platform Adaptation โ€” Integration for Cursor, Windsurf, Continue, VS Code, Aider
  • Style Guide โ€” Documentation authoring standards and best practices

Version: 0.5.2 Last Updated: 2026-04-22