ck:gkg
Semantic code analysis with GitLab Knowledge Graph. Use for go-to-definition, find-usages, impact analysis, architecture visualization. Supports Ruby, Java, Kotlin, Python, TypeScript/JavaScript.
- License 许可
- MIT
- 最近更新
- 2026-08-29
- Stars
- ★ 88
- Forks
- 79
01 前言 Front Matter
- name
- ck:gkg
- description
- Semantic code analysis with GitLab Knowledge Graph. Use for go-to-definition, find-usages, impact analysis, architecture visualization. Supports Ruby, Java, Kotlin, Python, TypeScript/JavaScript.
- argument-hint
- [symbol or query]
02 资源文件 4
- 参考文档references/cli-commands.md1.8 KB
- 参考文档references/http-api.md1.6 KB
- 参考文档references/language-support.md1.7 KB
- 参考文档references/mcp-tools.md2.2 KB
03 SKILL.md 正文
GitLab Knowledge Graph (GKG)
Semantic code analysis engine using AST parsing and KuzuDB graph database. Enables IDE-like code navigation for AI assistants.
Status: Public beta | Requires: Git repository | Storage: ~/.gkg/
When to Use
- Find all usages of a function/class across codebase
- Go-to-definition for symbols
- Impact analysis before refactoring
- Generate architecture diagrams
- RAG-enhanced code understanding
Use repomix instead for: quick context dumps, any-language support, remote repos, token counting.
Quick Start
# Check installation
gkg --version
# Index current repo
gkg index
# Start server (for API/MCP)
gkg server start
# Stop before re-indexing
gkg server stop
Installation
# macOS/Linux
curl -fsSL https://gitlab.com/gitlab-org/rust/knowledge-graph/-/raw/main/install.sh | bash
# Windows (PowerShell)
irm https://gitlab.com/gitlab-org/rust/knowledge-graph/-/raw/main/install.ps1 | iex
Core Workflows
Index and Query
gkg index /path/to/project --stats
gkg server start
# Query via HTTP API at http://localhost:27495
Find Symbol Usages
- Index project:
gkg index - Start server:
gkg server start - Use MCP tool
get_referencesor HTTP API/api/graph/search
Impact Analysis
- Index affected repos
- Query
get_referencesfor changed symbols - Review all call sites before refactoring
Language Support
| Language | Cross-file Refs |
|---|---|
| Ruby | ✅ Full |
| Java | ✅ Full |
| Kotlin | ✅ Full |
| Python | 🚧 In progress |
| TypeScript | 🚧 In progress |
| JavaScript | 🚧 In progress |
References
- CLI Commands -
gkg index,gkg server,gkg remove,gkg clean - MCP Tools - 7 tools for AI integration
- HTTP API - REST endpoints for querying
- Language Details - Supported features per language
Key Constraints
- Must stop server before re-indexing
- Requires initialized Git repository
- Languages not connected across repos (yet)
- TS/JS/Python cross-file refs incomplete
04 同仓库更多 Skills
ck:worktree
Create isolated git worktree for parallel development in monorepos.
ck:web-testing
Web testing with Playwright, Vitest, k6. E2E/unit/integration/load/security/visual/a11y testing. Use for test automation, flakiness, Core Web Vitals, mobile gestures, cross-browser.
ck:web-frameworks
Build with Next.js (App Router, RSC, SSR, ISR), Turborepo monorepos. Use for React apps, server rendering, build optimization, caching strategies, shared dependencies.
ck:web-design-guidelines
Review UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "check accessibility", "audit design", "review UX", or "check my site against best practices".
ck:watzup
Review recent changes and wrap up the current work session.
ck:use-mcp
Utilize MCP server tools with intelligent discovery and execution.