| name | gitkb |
| description | Manage GitKB knowledge base for project documentation, tasks, and context. Use when working with KB documents, viewing tasks, updating progress, or managing project knowledge. |
GitKB Knowledge Base Skill
GitKB is a distributed knowledge base with a git-like CLI. Documents are stored in a local database and materialized to .kb/workspace/ for editing.
Common Gotchas
- No type-specific subcommands: Use
git-kb show <slug>, NOT git-kb task show
- Board rendering: Use CLI
git-kb board for ASCII, MCP kb_board for JSON
- Always check numbering: Run
git-kb list <type> --all --json before creating new documents
CLI Reference
Document Operations
git-kb list
git-kb list --type task --status active
git-kb list --all --json
git-kb show <slug>
git-kb search "<keywords>"
git-kb create --type task --slug tasks/my-task --title "My Task"
git-kb set <slug> --status active
Workspace Operations
git-kb checkout <slug>
git-kb checkout --path context/
git-kb status
git-kb diff
git-kb commit -m "msg" <pathspecs...>
git-kb stash
git-kb reset
git-kb clear
Board and Context
git-kb board
git-kb board --all
git-kb board --group-by priority
git-kb board --group-by tags
git-kb board --sort-by priority
git-kb board --json
git-kb context --compact --code-refs
Relationship and History
git-kb graph <slug>
git-kb log <slug>
git-kb link --child <child> --container <parent>
Code Intelligence
git-kb code symbols --file <path>
git-kb code symbols "<name>"
git-kb code callers "<symbol>"
git-kb code callees "<symbol>"
git-kb code impact <file>
git-kb code dead <file-or-dir>
git-kb code index
git-kb code doctor
git-kb code entrypoints --refresh
git-kb code flows --refresh
git-kb code flow <flow-id>
git-kb code query <template>
Service Control
git-kb daemon start
git-kb daemon stop
git-kb daemon status
MCP Tools
When MCP tools are available, prefer them for structured JSON output and parallel invocation:
| CLI | MCP | Purpose |
|---|
git-kb list | kb_list | List documents with filtering |
git-kb show | kb_show | Get document(s) by slug (supports batch via slugs: [...]) |
git-kb create | kb_create | Create new document |
git-kb set | kb_set | Quick metadata update |
git-kb checkout | kb_checkout | Materialize to workspace |
git-kb status | kb_status | Show pending changes |
git-kb commit | kb_commit | Save workspace changes |
git-kb diff | kb_diff | Show line-level diffs |
git-kb board | kb_board | Kanban board view |
git-kb search | kb_search | Full-text search |
git-kb graph | kb_graph | Relationship graph |
git-kb code symbols | kb_symbols | Query code symbols |
git-kb code callers | kb_callers | Find callers |
git-kb code callees | kb_callees | Find callees |
git-kb code impact | kb_impact | Change impact analysis |
git-kb code dead | kb_dead_code | Find dead code |
git-kb code doctor | kb_code_doctor | Report index and call-resolution health |
git-kb code entrypoints | kb_code_entrypoints | List inferred entrypoints |
git-kb code flows | kb_code_flows | List entrypoint-derived flows |
git-kb code flow | kb_code_flow | Inspect one flow |
git-kb code query | kb_code_query | Run typed graph query templates |
git-kb ai semantic | kb_semantic | Semantic search |
| — | kb_smart_context | Task-aware code context (MCP-only) |
| — | kb_context | Context bootstrap bundle (MCP-only) |
Related skills:
/understand <file|symbol> — Analyze structure and dependencies
/refactor-safety <symbol> — Safety check: callers, callees, impact analysis
/explore <query> — Semantic search to find relevant code and docs
Workflows
Starting Work on a Task
-
View available tasks:
git-kb board
git-kb list --type task --status active
-
Checkout task to workspace:
git-kb checkout tasks/my-task
-
Edit the file at .kb/workspace/tasks/my-task.md
-
Commit changes (always scope to your documents):
git-kb commit -m "Progress on feature" tasks/my-task
Completing a Task
Before changing status to completed:
-
Update the document content with completion evidence:
- Mark acceptance criteria as checked (
- [x])
- Add completion evidence with commit hashes
- Document any follow-up items
-
Then update the status:
git-kb set tasks/my-task --status completed
Creating a New Task
git-kb create --type task --slug tasks/my-task --title "Implement feature X"
git-kb checkout tasks/my-task
git-kb commit -m "Add my-task" tasks/my-task
Traceability
Include task slugs in git commit messages:
fix: resolve auth timeout issue
Implements [[tasks/my-task]]
Key Concepts
| Term | Definition |
|---|
| Workspace | .kb/workspace/ — Files materialized for editing |
| Checkout | Materialize document from DB to workspace |
| Commit | Sync workspace changes back to database |
| Slug | Human-readable document ID (e.g., tasks/my-task) |
| Wikilink | [[slug]] reference between documents |
Document Types
task — Work items with status tracking
note — General documentation
spec — Technical specifications
context — Project context documents
brief — Project brief
architecture — Architecture documentation
patterns — Design patterns
Status Values
draft → backlog → active → blocked → completed → done
Document Naming Conventions
| Type | Pattern | Example |
|---|
| Task | tasks/{prefix}-{N} | tasks/my-project-1 |
| Incident | incidents/inc-{NNN}-{slug} | incidents/inc-001-auth-timeout |
| Context | context/{category}/{name} | context/overridable/active |
| Note | notes/{slug} | notes/api-design |
| Spec | specs/{slug} | specs/federation-protocol |
Always check existing documents before creating to ensure consistent numbering:
git-kb list <type> --all --json