ワンクリックで
ccg
code-context-graph — build code knowledge graphs and search. Core entry point for parsing, building, and querying code graphs.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
code-context-graph — build code knowledge graphs and search. Core entry point for parsing, building, and querying code graphs.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Analyze code relationships with CCG impact radius, flow tracing, callers/callees, git-diff risk, and affected stored flows. Use when a task asks what a change affects, how a call path flows, who calls a symbol, or which flows recent changes touch. Do not use for simple text lookup, documentation generation, or annotation authoring.
Isolate CCG graph build, search, documentation discovery, and analysis by namespace. Use when working across multiple repositories or services, preventing cross-project graph leakage, listing populated namespaces, or applying one namespace consistently across MCP and CLI operations. Do not use for ordinary single-repository work that fits the default namespace.
Author and refine CCG annotations such as @intent, @domainRule, @sideEffect, @mutates, @index, and @see. Use when adding business meaning to code, improving annotation-aware code or documentation retrieval, fixing annotation lint findings, or documenting operational contracts. Do not use for generated Markdown editing or annotations that merely restate symbol names.
Build, update, inspect, and search code-context-graph graphs and route to specialized CCG workflows. Use when a task needs CCG setup, graph freshness, exact symbol or relationship lookup, annotation-aware full-text search, MCP graph queries, or selection among CCG analysis, docs, annotation, and namespace skills. Do not use for a simple file or string lookup when grep/read is sufficient.
Generate, discover, read, and lint CCG documentation. Use when producing Markdown and Wiki snapshots, narrowing broad module questions with search_docs, reading generated docs with get_doc_content, or diagnosing orphan, missing, stale, incomplete, contradiction, dead-ref, and drift findings. Do not use for direct source annotation authoring or exact call-graph analysis.
code-context-graph — documentation generation, RAG indexing, and docs quality linting.
| name | ccg |
| description | code-context-graph — build code knowledge graphs and search. Core entry point for parsing, building, and querying code graphs. |
Local code analysis tool that parses codebases via Tree-sitter into a knowledge graph with 12 language support and annotation-powered search.
| Command | Description | Example |
|---|---|---|
build [dir] | Parse directory, build graph + search index | ccg build . |
build --exclude <pat> | Exclude files/paths (repeatable) | ccg build --exclude vendor |
build --no-recursive [dir] | Only parse top-level directory | ccg build --no-recursive . |
update [dir] | Incremental sync (changed files only) | ccg update . |
status | Show graph statistics (nodes/edges/files) | ccg status |
search <query> | FTS keyword search (includes @annotations) | ccg search "authentication" |
search --path <prefix> <query> | Scoped search by path prefix | ccg search --path internal/auth "login" |
languages | List supported languages and extensions | ccg languages |
example [language] | Show annotation writing example | ccg example go |
tags | Show all annotation tag reference | ccg tags |
serve | Start MCP server (stdio by default) | ccg serve |
serve --transport streamable-http | Start MCP server over HTTP | ccg serve --transport streamable-http |
serve --http-addr :9090 | Custom HTTP listen address | ccg serve --http-addr :9090 |
serve --stateless | Stateless session mode | ccg serve --stateless |
serve --allow-repo <pat> | Allowed repos for webhook sync (repeatable) | ccg serve --allow-repo "org/*" |
serve --webhook-secret <s> | HMAC secret for webhook verification | ccg serve --webhook-secret mysecret |
serve --repo-root <dir> | Root dir for cloned repos | ccg serve --repo-root /data/repos |
Parse the user's input after ccg and run via Bash:
ccg {subcommand} {args}
If the binary doesn't exist, build it first:
CGO_ENABLED=1 go build -tags "fts5" -o ccg ./cmd/ccg/
Show available commands:
Available ccg commands:
ccg build [dir] — Build code knowledge graph
ccg update [dir] — Incremental update
ccg status — Graph statistics
ccg search <query> — Full-text search (annotations included)
ccg languages — List supported languages
ccg serve — Start MCP server
Related skills:
/ccg-analyze — Code analysis & architecture
/ccg-annotate — Annotation system & AI workflow
/ccg-docs — Documentation & RAG indexing
| Tool | Description |
|---|---|
parse_project | Parse source files |
build_or_update_graph | Full/incremental build with postprocessing |
run_postprocess | Run flows/communities/search rebuild |
get_node | Get node by qualified name |
search | Full-text search |
query_graph | Predefined graph queries (callers, callees, imports, etc.) |
list_graph_stats | Node/edge/file counts |
If ccg.db doesn't exist or the user asks to analyze the project, run ccg build . first.
When the user asks about business concepts, use FTS search which includes annotation content:
@intent — function purpose/goal@domainRule — business rules@sideEffect — side effects@mutates — state changes@index — file/package level descriptionExample: user asks "결제 관련 코드" → ccg search "결제" finds functions annotated with payment-related @intent/@domainRule.
Node kinds: function, class, type, test, file
Edge kinds: calls, imports_from, inherits, implements, contains, tested_by, depends_on, references
Go, Python, TypeScript, Java, Ruby, JavaScript, C, C++, Rust, Kotlin, PHP, Lua
| Endpoint | Method | Description |
|---|---|---|
/mcp | POST/GET/DELETE | MCP protocol endpoint (session-based) |
/health | GET | Health check — returns {"status":"ok"} |
/webhook | POST | GitHub / Gitea webhook receiver (when --allow-repo configured). Supports X-Hub-Signature-256 and X-Gitea-Signature HMAC verification. |