Best for
- Use when you need blast radius, symbol-level maps, import graphs, inheritance, or test links.
vasilyu1983/AI-Agents-public/frameworks/shared-skills/skills/dev-context-code-graph/SKILL.md
Builds per-repo code graphs in JSON and markdown-ready derived artifacts. Use when you need blast radius, symbol-level maps, import graphs, inheritance, or test links.
Decision brief
Build a deterministic, machine-readable code graph for a single repository. Treat the graph as a machine-readable substrate for an LLM-maintained repo wiki or context hub, not just a terminal-only report. This skill mirrors the dev-context-multi-repo artifact workflow, but works…
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Declared | Source record | Install path and trigger |
| Claude Code | Declared | Source record | Install path and trigger |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/vasilyu1983/AI-Agents-public --skill "frameworks/shared-skills/skills/dev-context-code-graph"Inspect the Agent Skill "dev-context-code-graph" from https://github.com/vasilyu1983/AI-Agents-public/blob/53f6cb73ea53a2646e3e7d4665062ad66f3683ac/frameworks/shared-skills/skills/dev-context-code-graph/SKILL.md at commit 53f6cb73ea53a2646e3e7d4665062ad66f3683ac. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
1. Identify supported source files by extension while skipping generated and vendored build trees. 2. Classify files as source, test, config, or unknown. 3. Parse each file with the best deterministic strategy available. 4. Record parse status explicitly: parsed, heuristic, unsu…
1. Identify supported source files by extension while skipping generated and vendored build trees. 2. Classify files as source, test, config, or unknown. 3. Parse each file with the best deterministic strategy available. 4. Record parse status explicitly: parsed, heuristic, unsu…
1. Read one or more code-profiles/.json files. 2. Materialize canonical nodes and edges into graphs/code-graph.json. 3. Add structural edges from repo to file and from parent symbol or file to child symbol. 4. Synthesize externalsymbol nodes for unresolved or third-party import/…
Run validation after every build:
Review the “Phase 4: Query” section in the pinned source before continuing.
Permission review
The documentation asks the agent to run terminal commands or scripts.
python3 scripts/validate_code_graph.py graphs/code-graph.json \The documentation asks the agent to run terminal commands or scripts.
python3 scripts/query_code_graph.py graphs/code-graph.json --node <id> --hops 1Evidence record
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 93/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 82 | Source | Repository attention, not individual Skill quality |
| Compatibility | 2 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Build a deterministic, machine-readable code graph for a single repository. Treat the graph as a machine-readable substrate for an LLM-maintained repo wiki or context hub, not just a terminal-only report. This skill mirrors the dev-context-multi-repo artifact workflow, but works at file and symbol level instead of portfolio level.
Use this skill when you need:
graphs/code-graph.json artifactDo not use this skill for:
Use related skills instead:
| Need | Start here |
|---|---|
| Generate the base artifact set | ## Workflow |
| Validate schema and graph integrity | ### Phase 3: Validate |
| Query blast radius or symbol neighborhoods | ### Phase 4: Query |
| Surface structural graph risk | query_code_graph.py --articulation-points, --bridges, --cycles, --topo-sort, --from ... --to ... --k N |
| Run hot-symbol PPR retrieval | query_code_graph.py --ppr --seed <id> [--seed <id> ...] --top N |
| Detect modules via communities | query_code_graph.py --communities [--resolution γ] [--community-seed N] |
| Pick the right query for a review | references/query-recipes.md |
| Load scripts, schemas, and reports | ## Navigation |
Every run should target the same output model:
code-profiles/<repo>.json
Machine-readable code profile conforming to schemas/code-profile.schema.json.graphs/code-graph.json
Primary machine-readable artifact. Queryable symbol graph conforming to schemas/code-graph.schema.json.reports/code-graph-validation.json (optional but recommended)
Output of scripts/validate_code_graph.py --output ....reports/code-graph-report.md (optional but recommended)
Human-readable summary report generated from the graph.reports/query-*.md (optional but recommended)
Persisted blast-radius, neighborhood, and relationship answers worth filing back into a repo knowledge base.reports/code-graph-report.html (optional)
Static HTML report for local review.reports/code-graph.mmd (optional)
Mermaid diagram export for graph neighborhoods or impact views.source, test, config, or unknown.parsed, heuristic, unsupported, error, or skipped.Primary helper: scripts/scan_code_repo.py
single-repo code graph request
-> scan files and classify source, test, config, or unknown
-> parse symbols with deterministic or heuristic parser
-> build nodes and edges into graphs/code-graph.json
-> validate schema, references, duplicates, orphans, and parse confidence
-> query neighborhoods, impact, paths, PPR, communities, or structural risk
-> persist useful reports back into repo context
-> use findings for review, docs, onboarding, or blast-radius planning
code-profiles/*.json files.graphs/code-graph.json.external_symbol nodes for unresolved or third-party import/call targets.Primary helper: scripts/build_code_graph.py
Run validation after every build:
python3 scripts/validate_code_graph.py graphs/code-graph.json \
--output reports/code-graph-validation.json
The validator checks:
Common query patterns:
# Neighborhood around a file or symbol
python3 scripts/query_code_graph.py graphs/code-graph.json --node <id> --hops 1
# Blast radius from a file or symbol
python3 scripts/query_code_graph.py graphs/code-graph.json --impact <id> --hops 2
# Path between two nodes
python3 scripts/query_code_graph.py graphs/code-graph.json --from <id> --to <id>
# Up to three node-disjoint shortest paths
python3 scripts/query_code_graph.py graphs/code-graph.json --from <id> --to <id> --k 3
# Personalized PageRank from one or more hot symbols
python3 scripts/query_code_graph.py graphs/code-graph.json --ppr --seed <id> --top 30
# Module detection via Louvain communities (γ=1 default; >1 = smaller modules, <1 = larger)
python3 scripts/query_code_graph.py graphs/code-graph.json --communities --format table
python3 scripts/query_code_graph.py graphs/code-graph.json --communities --resolution 1.4 --top 25
# Search by label, path, summary, or tags
python3 scripts/query_code_graph.py graphs/code-graph.json --search "invoice service"
# Structural risk
python3 scripts/query_code_graph.py graphs/code-graph.json --articulation-points --relations imports --top 20
python3 scripts/query_code_graph.py graphs/code-graph.json --bridges --relations imports --top 20
python3 scripts/query_code_graph.py graphs/code-graph.json --cycles --relations imports,inherits,calls
python3 scripts/query_code_graph.py graphs/code-graph.json --topo-sort imports
# Mermaid diagram export
python3 scripts/query_code_graph.py graphs/code-graph.json --diagram --output reports/code-graph.mmd
Primary helper: scripts/query_code_graph.py
When a query produces durable knowledge, write it to markdown or Mermaid instead of leaving it only in chat output.
Use query outputs to generate:
Generate static reports for humans:
python3 scripts/export_code_graph_report.py graphs/code-graph.json \
--output-dir reports/
Prefer markdown, Mermaid, or HTML outputs that can be reviewed in Obsidian or filed back into a broader context hub.
Run lightweight health checks over the graph-backed knowledge:
reports/ or a higher-level repo knowledge base instead of repeating the same exploration later.If the graph is feeding repo descriptions, keep the generation bounded:
The v1 parser pipeline is deterministic and conservative.
astSwift support is intentionally heuristic in v1. The scanner extracts top-level type and function symbols from .swift files, records imports and inheritance/protocol edges conservatively, and avoids generated Apple build output such as .build, DerivedData, Pods, Carthage, and SourcePackages.
The graph covers:
repo, file, class, function, method, test, external_symbol nodescontains, defines, imports, calls, inherits, references, tests edgesIt does not attempt:
For small and medium repos, direct graph queries plus compact markdown reports are often enough. Do not add heavier retrieval or indexing layers until graph JSON and summaries stop being operationally sufficient.
Start with one of these instructions:
<file-or-symbol>."<module>."code-hub/
├── AGENTS.md
├── code-profiles/
├── graphs/
├── reports/
├── schemas/
└── scripts/
Keep generated graph data in code-profiles/, graphs/, and reports/. Do not paste inventories or raw symbol lists into root instruction files.
The skill assumes these canonical contracts:
Do not invent alternate shapes unless a downstream system requires a transform layer.
code-profiles/<repo>.json.parent_id has a matching contains or defines edge.graphs/code-graph.json validates cleanly.external_symbol nodes instead of dangling edges.external_symbol nodes.Frequently asked questions
Build a deterministic, machine-readable code graph for a single repository. Treat the graph as a machine-readable substrate for an LLM-maintained repo wiki or context hub, not just a terminal-only report. This skill mirrors the dev-context-multi-repo artifact workflow, but works…
The source record exposes this install command: npx skills add https://github.com/vasilyu1983/AI-Agents-public --skill "frameworks/shared-skills/skills/dev-context-code-graph". Inspect the command and pinned source before running it.
The pinned source record declares support for: codex, claude code.
Static rules flagged exec-script in the source; the page lists the matching lines and excerpts.
Alternatives
vasilyu1983/AI-Agents-public
Guides iOS testing with XCTest, XCUITest, Swift Testing, simctl, and xcresult. Use when choosing destinations, controlling flakes, or parsing test artifacts for native apps.
PramodDutta/qaskills
Gate RAG pipelines in CI with versioned golden eval sets, per-metric thresholds, baseline drift detection, and a build that fails when retrieval or answer quality regresses.
PramodDutta/qaskills
Generate comprehensive test cases from state machine models covering all states, transitions, guard conditions, and invalid transition attempts for workflow-heavy features
lobu-ai/lobu
Set up new Lobu agents end to end and operate existing Lobu projects and memory: interview, scaffold, validate, authenticate, connect feeds, execute operations, and test Automations.