跳到正文
FunCoding

octocode-graph

Load this skill first for repository graphs: callers, dependency paths, cycles, change impact, snapshot or PR comparisons, startup dependencies and CI dependency rules. Builds, queries and checks graph evidence.

Star
972
许可证
MIT
最近提交
2026年12月2日

packages/octocode-graph/skills/octocode-graph/SKILL.md

在 GitHub 上查看

Octocode Graph

Use graph evidence to answer a structural question, then inspect the source behind the claim. Run octocode-graph <command> if installed, or npx -y @octocodeai/octocode-graph <command>. In the Octocode source checkout, use node packages/octocode-graph/bin/octocode-graph.mjs <command>.

Choose the source scope first: build a workspace from its root for relationships across its packages; a file build covers only that file. The default build shares one native binding snapshot across packages. Check the saved graph’s bindingScope coverage field: partitioned means a native limit forced separate snapshots and cross-package completeness is partial. Reuse an explicit saved result when the task names one. For current-code questions, query with --refresh; a plain query is an offline snapshot answer with unverified freshness. If no graph exists, run the returned build suggestion. For a PR or two revisions, start with the merge-base/head workflow.

octocode-graph build . --out .octocode/graph-review
octocode-graph query .octocode/graph-review "search cycles"
octocode-graph query .octocode/graph-review "impact src/worker.ts depth 2" --refresh
octocode-graph check .octocode/graph-review --format sarif

Ask

QuestionRun
Find code by name or by what it doessearch <words>; filter with --kind, --lang, --role, --path, --exported, --param, --returns
What surrounds a file or symbolabout <file|symbol>; context <file|symbol...> --tokens N ranks the neighbourhood under a token budget (more: continues)
Who depends on it or calls it, what it usesimpact, dependents, deps, callers, callees; for a hub file (a module root such as cli.rs, an index file) file-level impact reaches most of the package, so ask callers <file>#<item> per public item
Every caller of one functionlspSearch callers; a graph callers answer without full probes is isPartial (callersNotProbed) and carries that call as confirm
How A reaches B, loops, prerequisite orderpath [--all], cycle, order, trace
What an entry loads, why, at what costreach <entry|dir>, why <entry> <target>, hubs [<dir>]
What is criticalcritical functions, critical points, critical path [<file>] [--up], top <metric>, community
A fresh scope, or native detectors (issues, cochange, drift, witnesses, unresolved)octocode-graph graphQuery '{"queries":[{"path":".","operation":"issues"}]}' · Operations · Builds and pagination
A spelling or literal textlocalSearch (or rg), not the graph

Add --runtime (drops import type) or --eager (startup only) to any walk. Follow every next.query (more:) unchanged against the same saved graph; a page with no rows can still carry edges or other evidence. Saved queries owns delivery budgets, flags and each query's fields. Batch questions in one load, one per line: printf '%s\n' 'search x' 'about a.ts' | octocode-graph query . --stdin --json. An ambiguous name returns re-runnable candidates.

Go further

NeedRead
CI dependency rules: forbidden, allowed, required, reachable, circular; baseline, SARIF, --since <rev>Rules · fields · CI
Bundle bytes, CPU and heap profiles (hot), minified frames (locate), SARIF or path-flow evidenceProviders · bundles · profiles, locate · data flow
What a metric means · quality, risk, retest and migration orderAlgorithms · Quality checks
A PR, branch or refactor comparisonReview workflow · diff evidence
Docs, configs and manifests linked to code (links); record a missed linkLinks
Build options, replay · build phases, cache, registry · viewer server, eventsCommands · Pipeline · Viewer and events
Saved files, coverage lines, HTML exportOutput
Viewer chat · durable notes · architecture layersChat · Wiki · Modeling

Read returned source locations with localFetch or an available source reader (evidence); run the confirm: call before claiming every caller. Finish with the answer, the source or witness locations supporting it, and the coverage gaps that limit it. Aggregates and rankings are graph measurements, not source citations; brief.txt describes coverage (output).

MCP: octocode-graph mcp serves build_graph, query_graph, refresh_graph, diff_graph, check_graph and link_graph; channel adds the live viewer. Native graphBuild and graphQuery run through the graph CLI only. The JavaScript API exports buildGraph, openGraph, openFreshGraph and refreshGraph; an opened graph has .query(text) and .diffFrom(before). Surface arguments and freshness

相似的 Skill

rea-ci-tests-audit

MOmorluto/rea486k近 7 天新增 8,943 个 star

rea-changelog-update

MOmorluto/rea486k近 7 天新增 8,943 个 star

wizard

MAmattpocock/skills337k近 7 天新增 4,978 个 star

pr

MAmattpocock/skills337k近 7 天新增 4,978 个 star

triage

MAmattpocock/skills337k近 7 天新增 4,978 个 star

精选

git-guardrails-claude-code

阻止危险的 git 命令,避免误推、误删分支。

MAmattpocock/skills337k近 7 天新增 4,978 个 star