graph-build
БесплатноБез исполняемых скриптовНе проверенBuilds or updates the code knowledge graph via tree-sitter AST and SQLite. Use when setting up the graph before search or blast-radius analysis.
от athola★ 358 звёзд на GitHubОб этом скилле
Build Code Knowledge Graph
Build or update the .gauntlet/graph.db knowledge graph
for the current codebase.
Steps
Detect target: Use the current working directory or a user-specified path.
Check for existing graph: If
.gauntlet/graph.dbexists, run an incremental update. Otherwise, run a full build.Run the build script:
For full build:
uv run --project ${CLAUDE_PLUGIN_ROOT} python \ ${CLAUDE_PLUGIN_ROOT}/scripts/graph_build.py <dir>For incremental update:
uv run --project ${CLAUDE_PLUGIN_ROOT} python \ ${CLAUDE_PLUGIN_ROOT}/scripts/graph_build.py <dir> --incrementalThe build runs in the plugin's own environment because a system
python3may lack tree-sitter. Without it a build exits 2 with anerrorkey rather than reporting files it did not parse.An incremental update diffs against
--base-ref, which defaults to the commit of the last successful build. Commits made since then are re-parsed. A graph built before that commit was recorded falls back toHEAD, which covers uncommitted changes only: run a full build once.Report results: Show the JSON output including files parsed, nodes created, edges created, and duration.
Suggest next steps: Recommend searching the graph or running blast radius analysis.
When To Use
- At the start of a session to build structural awareness
- After significant code changes to update the graph
- Before running blast radius analysis or flow tracing
- When the user asks about codebase structure
When NOT To Use
- Querying a graph that already exists (use
gauntlet:graph-search) - Building the challenge knowledge base (use
gauntlet:extract)
What Gets Parsed
The graph extracts nodes (File, Class, Function, Type, Test) and edges (CALLS, IMPORTS_FROM, INHERITS, CONTAINS, IMPLEMENTS, TESTED_BY) from 20+ languages including Python, JavaScript, TypeScript, Go, Rust, Java, C/C++, Ruby, and PHP.
Storage
- Database:
.gauntlet/graph.db(SQLite with WAL mode) - Auto-creates
.gauntlet/.gitignoreto prevent commits - Incremental updates use SHA-256 hashing to skip unchanged files
- Each
edgesrow has aresolutioncolumn recording how a CALLS target was found:exact(module qualifier,self/clsscope, or a unique definition in the caller's plugin),name_guess(a method picked by bare name on a receiver of unknown type, a unique definition in another plugin, or a bare call that matched several definitions and only one sits in the caller's ownplugins/<name>/, as with vendored copies), or empty (declared edge, external call, or a row from a graph built before the column existed). Treatname_guessedges as unconfirmed: blast radius lists them undername_guess_callers. A database lacking the column gains it when opened. Its old edges stay empty until a full build, and blast radius setsgraph_predates_resolutionwhile the last full build is older than 1.10.4. - Each full build that stores nodes records
gauntlet_versionin themetadatatable; an incremental build leaves it alone. At session start, a graph built by an older version is rebuilt in the background (log:.gauntlet/rebuild.log). Opt out withrebuild_on_upgrade: falsein.gauntlet/config.yamlor.gauntlet/config.json. - A build holds
.gauntlet/graph.lockwhile it runs. A second build exits 75 without touching the graph.
Exit Criteria
-
.gauntlet/graph.dbexists and is a valid SQLite file after the skill completes;.gauntlet/.gitignoreexists to prevent the database from being committed - Build report JSON includes all four keys:
files_parsed,nodes_created,edges_created,duration; values are non-zero for non-empty codebases - Incremental update path used when
.gauntlet/graph.dbalready exists (script invoked with--incremental); full build only on first run - Next-step suggestions presented to the user: search the graph or run blast-radius analysis
Установить graph-build в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл graph-build?
Builds or updates the code knowledge graph via tree-sitter AST and SQLite. Use when setting up the graph before search or blast-radius analysis.
Как установить скилл graph-build?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл graph-build запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic