ワンクリックで
ccg-docs
code-context-graph — documentation generation, RAG indexing, and docs quality linting.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
code-context-graph — documentation generation, RAG indexing, and docs quality linting.
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 — build code knowledge graphs and search. Core entry point for parsing, building, and querying code graphs.
| name | ccg-docs |
| description | code-context-graph — documentation generation, RAG indexing, and docs quality linting. |
Generate Markdown documentation from code graphs, build RAG indexes for AI consumption, and lint documentation quality.
| Command | Description | Example |
|---|---|---|
docs [--out dir] | Generate Markdown documentation | ccg docs --out docs |
lint [--out dir] | 8-category docs lint | ccg lint |
lint --strict | Exit 1 on issues (for CI/pre-commit) | ccg lint --strict |
hooks install | Install pre-commit git hook | ccg hooks install |
hooks install --lint-strict | Install hook that blocks commit on issues | ccg hooks install --lint-strict |
| Tool | Description |
|---|---|
build_rag_index | Build RAG index from docs and communities. Use namespace for namespace-specific docs; workspace remains a deprecated alias. |
get_rag_tree | Navigate RAG document tree. Use namespace for namespace-specific doc-index.json; workspace remains a deprecated alias. |
get_doc_content | Get documentation file content. Use namespace for namespace-scoped docs; workspace remains a deprecated alias. |
search_docs | Search RAG document tree by keyword. Use namespace for namespace-specific searches; workspace remains a deprecated alias. |
| Category | Description |
|---|---|
| orphan | Doc files with no matching source code |
| missing | Source files with no documentation |
| stale | Docs outdated vs source (hash/timestamp mismatch) |
| unannotated | Functions lacking @intent/@domainRule annotations |
| contradiction | Doc content contradicting code signatures |
| dead-ref | @see tags pointing to non-existent functions |
| incomplete | Partial documentation (missing @param, @return) |
| drift | Doc structure diverged from code structure |
User: "문서 생성해줘"
→ ccg docs --out docs
→ Generates Markdown files for all modules
User: "RAG 인덱스 만들어줘"
→ build_rag_index via MCP
→ Creates searchable document tree from docs + communities
User: "문서 상태 체크해줘"
→ ccg lint
→ Returns 8-category report: orphan, missing, stale, unannotated, etc.
# .github/workflows/docs.yml
- run: ccg lint --strict # Fails build on documentation issues
.ccg.yaml rules support regex patterns for pattern field. Patterns containing $, ^, +, {}, |, \., or .* are auto-detected as regex:
rules:
# Exact match (legacy)
- pattern: "pkg/auth.go::Login"
category: unannotated
action: ignore
# Regex: ignore all symbols under pkg/store/
- pattern: "pkg/store/.*"
category: unannotated
action: ignore
# Regex: ignore all generated code
- pattern: ".*_generated\\.go::.*"
category: incomplete
action: warn
Graph must be built first. If ccg.db doesn't exist, run ccg build . (see /ccg skill).