graphify-cli
Installation
SKILL.md
Graphify CLI
Reusable contract for querying a Graphify code graph. The graph is read-only material: this skill covers finding it, querying it, and degrading gracefully — never building it. The division of paths is fixed:
| Graph | Path | Who |
|---|---|---|
Repository's own (.ai/graphify-out/graph.json) |
graphify MCP tools (query_graph, get_neighbors, …) |
Agents |
Cross-repository global (~/.graphify/global-graph.json) |
graphify-global MCP tools + ~/.graphify/global-manifest.json |
Agents |
| Either graph, by hand | Read-only CLI with explicit --graph |
Humans only |
| Lifecycle (first indexing, refresh) | /graphify-index command + graphify-init plugin |
Human and plugin only — never agents |
Availability detection
- The per-repository graph lives at
.ai/graphify-out/graph.json(repo root). Check that literal path. If the file exists and parses, the graph is available; recordgraphify: available. - If the graph file is missing, record
graphify: absentand skip Graphify entirely. Do not build it: first indexing is human-gated behind the/graphify-indexcommand, and thegraphify-initOpenCode plugin owns refreshes afterwards. Mention/graphify-indexto the user once as the way to enable the graph, then continue without it. - Check freshness: compare the graph's
built_at_commitwithgit rev-parse HEAD, and check whether.ai/graphify-out/.opencode-extract-lockexists (a refresh is in flight). On a commit mismatch or a present lock, downgrade the record tographify: stale: still query the graph, but treat every answer as an approximate locator — verify each claim against the current files before citing it, and never base impact or blast-radius conclusions on the stale graph alone. Thegraphify-initplugin refreshes it on the next session; never refresh it yourself. - Documentation coverage depends on the recorded indexing mode — read
.ai/graphify-out/.opencode-index-mode(one JSON line):docsmeans markdown and other documents are indexed as document and concept nodes, so documentation questions are graph-first too;code-onlymeans the graph holds no documentation and docs questions go straight to filesystem tools. When the mode file is missing (a graph indexed before it existed), fall back to.ai/graphify-out/.graphify_semantic_marker— Graphify writes it only when a semantic docs pass ran, so present meansdocscoverage, absent meanscode-only.
Never conclude "no graph" from a wildcard search. Patterns like **/graphify-out/graph.json do not match inside dot-directories, so they silently miss .ai/graphify-out/graph.json. An empty glob is inconclusive, not evidence of absence — check the literal path before reporting graphify: absent.