graph-explorer

graph-explorer is a skill for Claude Code from kouroshez/coding-os. It costs 68 tokens per session (3,348 once invoked), scanned A, original, Apache-2.0.

A guide to exploring a codebase's knowledge graph, which records relationships between symbols, files, APIs, and other code elements. It helps an agent find callers, dependencies, related code, and likely effects before editing.

In plain words
What is it for?
Use it when tracing dependencies, planning a rename or refactor, auditing APIs or MCP tools, finding what breaks after a change, or isolating the path of a fault.
Why use it?
It reduces the chance of changing one piece of code while missing the other places that rely on it. It is especially useful when the change may have a wide or unclear impact.

Skill for Claude Code

Written for Claude Code: PostToolUse hook event. Also seen: mentions CLAUDE.md.

Good fit Use it when tracing dependencies, planning a rename or refactor, auditing APIs or MCP tools, finding what breaks after a change, or isolating the path of a fault.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kouroshez/coding-os/graph-explorer
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add kouroshez/coding-os --skill graph-explorer
Clone the repo
git clone --depth 1 https://github.com/kouroshez/coding-os

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for graph-explorer

README.md
[![agentmods](https://agentmods.dev/badge/skills/kouroshez/coding-os/graph-explorer/github.svg)](https://agentmods.dev/skills/kouroshez/coding-os/graph-explorer)
Your own site
<a href="https://agentmods.dev/skills/kouroshez/coding-os/graph-explorer"><img src="https://agentmods.dev/badge/skills/kouroshez/coding-os/graph-explorer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for graph-explorer

Your own site · 80×15
<a href="https://agentmods.dev/skills/kouroshez/coding-os/graph-explorer"><img src="https://agentmods.dev/badge/skills/kouroshez/coding-os/graph-explorer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 68 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,348 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00068 $0.03348
Opus 5.5 $0.00027 $0.01339
Sonnet 5.5 $0.00014 $0.00670
Haiku 4.5 $0.00007 $0.00335

Measured 10d ago against content hash 6b34318bd739, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

graph-explorer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/explain-impact.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

src/core/skills/graph-explorer/SKILL.md · 237 lines

How it starts

The opening of the file, as written. The whole thing — 237 lines — stays where its author put it; the contents beside it link to each section on GitHub.

graph-explorer

Purpose: Load the graph_os toolset (cos_graph_* MCP tools) and use it deliberately before any non-trivial code edit. The graph is the third retrieval layer (CLAUDE.md Three-Layer Retrieval) — use it when tree-grep or past-memory searches return noise.

Read when: Editing src/core/** or src/cli/**, producing a rename plan, auditing API/MCP contracts, answering "what depends on X".

Skip when: You already know the blast radius, or the change is a self-contained one-file edit with no callers.

Decision ladder

  1. Need to know "what calls this?" → cos_graph_references(uid).
  2. Need surrounding context before editing? → cos_graph_context(uid_or_name, depth=1) (Implementer pre-impl step).
  3. Planning a refactor? → cos_graph_impact(uid, depth=3) (Analyst dependency map) groups edges by risk tier.
  4. Renaming a symbol? → cos_graph_rename_plan(uid, new_name) before any Edit — returns call-sites, doc refs, tests, string literals.
  5. API / contract audit? → cos_graph_contracts(kinds=["http","mcp"]) (Documenter + Deployer).
  6. Tracing a fault? → cos_graph_trace(entry_uid) (Debugger fault isolation step).
  7. "Is anything similar?" → cos_graph_similar(uid, top_k=5).
  8. Shortest dependency path? → cos_graph_path(source, target).
  9. Need a diagram? → cos_graph_export(format="mermaid", root_uid=...).
  10. Pre-commit self-review? → cos_graph_detect_changes(files=[...]) — call BEFORE make verify; it also lists names the touched files use but never define or import.
  11. Copy-pasted code? → cos_graph_duplicates(scope="src/", clone_type="exact"|"renamed") — clone groups of ≥50 tokens and identical files; tests and generated files stay out unless include_tests=True.
  12. Forgotten import / undefined name? → cos_graph_undefined(scope=...) — names used but never defined or imported (Python, TS/JS, Go) and imports of a name the module does not export.
  13. How many files use a library? → cos_graph_references(uid) on code:module:npm:react, code:module:fastapi or code:external:github.com/gofiber/fiber/v2 — data.source_files counts each importing file once, sub-paths included, even when the rows are trimmed.

Read the full file on GitHub · 237 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago Changed · +11 lines 6b34318bd739
  2. 1mo ago First seen · 226 lines · 68 tokens per session scan A 442e7076b67a

Subscribe to this mod's changes

graph-explorer is a skill published in the GitHub repository kouroshez/coding-os (6 stars, last pushed 5d ago), licensed Apache-2.0. It adds 68 tokens to every session and 3,348 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.