by ozgurcd
Local Go static analysis, call-graph, blast-radius, and CI architecture-gate CLI—with a built-in stdio MCP server
# Add to your Claude Code skills
git clone https://github.com/ozgurcd/gographgograph is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by ozgurcd. Local Go static analysis, call-graph, blast-radius, and CI architecture-gate CLI—with a built-in stdio MCP server. It has 234 GitHub stars.
gograph's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
Clone the repository with "git clone https://github.com/ozgurcd/gograph" and add it to your Claude Code skills directory (see the Installation section above).
gograph is primarily written in Go. It is open-source under ozgurcd on GitHub, so you can review or fork the full source.
Yes. AgentsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh gograph against similar tools.
No comments yet. Be the first to share your thoughts!
Unlocks once the catalog security scan passes (runs nightly).
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.
Local Go static analysis, call-graph, blast-radius, and CI architecture-gate CLI—with a built-in stdio MCP server (gograph mcp).
gograph indexes a Go repository into a local AST and optional type-checked (CHA/SSA) graph. Use it from the terminal or CI to trace transitive callers, select tests for uncommitted changes, render Mermaid dependency diagrams, and enforce package boundaries—without hosted services, embeddings, or target-code execution.
# Install
brew install --cask ozgurcd/tap/gograph
# or: go install github.com/ozgurcd/gograph/cmd/gograph@latest
# Index a Go repository (AST + type-checked CHA/SSA)
gograph build . --precise
# CLI workflows: blast radius, Mermaid graphs, targeted tests, CI gates
gograph impact Store.Save
gograph callers Store.Save --mermaid
gograph tests Store.Save --transitive
gograph tests --uncommitted --format go-test --max-depth 3
gograph boundaries && gograph gate
# Built-in stdio MCP server (no manual build step required)
gograph mcp .
Documentation · Interactive Demo · CI Architecture Gates · Tool Comparisons · Benchmark

gograph doctor --json # verify binary path and graph health
gograph build . --precise # AST + type-checked CHA/SSA graph
gograph build . --precise --strict # CI mode: exit non-zero if precise enrichment falls back
gograph stats # inspect precision and package/symbol/call counts
Common build flags:
--tags=integration — include build-tagged files and tests in the fingerprinted graph context.--exclude-dirs=legacy,examples/broken — omit unrelated non-compiling subtrees (details).--memory-mode=low --max-memory=1GiB — reduce Go heap pressure on constrained CI hosts without reducing precision.--force — rebuild and rewrite even when the graph is current; without it, a build of an unchanged checkout writes nothing (decided from the small .gograph/graph.meta.json sidecar, so it takes a fraction of a second).--rev origin/main (global query flag) — query another commit, branch, or tag without a checkout (cached under <user cache>/gograph/revs/, shared by worktrees; precise when the working graph is precise).# Repository-wide entry points (no symbol name required)
gograph summary
gograph hotspot --top 10
gograph coupling --internal-only
gograph flow --no-tests
# Symbol-level analysis (supports path/to/file.go:Name and file.go:Receiver.Method)
gograph explore YourSymbol --compact
gograph context YourSymbol
gograph plan YourSymbol
gograph path HandleOrder CommitLedger --mermaid
.gograph/graph.json produced by gograph build . (or --precise). Check freshness with gograph stale (exit 0 current, 2 stale, 1 error).gograph mcp .): Requires no manual build step. It builds an in-memory graph on first use, incrementally reparses changed packages before queries, and writes no disk artifacts unless started with --persist-refresh.Local-only analysis:
gographdoes not execute target code or transmit source or telemetry to external services. It invokes the installedgotoolchain for module/build context and--precisepackage loading (setGOPROXY=off GOTOOLCHAIN=localfor offline runs). See docs/security-model.md for symlink confinement,.artifacts.lockpublication, SHA-256 policy markers, and platform atomicity details.
Illustrative point-in-time output comparison from an earlier gograph revision (counts vary as the repository evolves; these commands return different kinds of evidence):
| Task | grep -rn |
gograph |
Observed output difference |
|---|---|---|---|
Find callers of loadGraph |
158 matching lines (comments, docs, vars) | 56 AST-derived call-site rows | ~65% fewer rows in that run |
| Locate symbol definitions | 842 lines matching "Symbol" | 83 true type/method declarations | ~90% noise eliminated |
| Read one function body | cat displays 180+ lines of the whole file |
source extracts the 12-line function |
~93% fewer source lines in that run |
| Gather common symbol context | Separate node, source, caller, callee, and test queries | context bundles those fields |
Five evidence types in one response |
Call-Graph and Blast-Radius Analysis — trace direct and transitive callers, callees, paths, interface implementations (CHA/SSA), struct field mutations, HTTP routes, static PostgreSQL queries, and error origins. Export graph slices as text, --json, --files-only, or --mermaid.
Change-Scoped Test Selection and Coverage Gaps — run gograph tests --uncommitted --format go-test --max-depth 3 to print runnable go test -run commands for local changes (--package <pkg> narrows them to one package; stderr notes how much of a selection rests only on possible interface-dispatch paths and what --exact-only keeps), gograph tests --uncommitted --skip-passed --run to run only the tests that have not already passed on identical inputs in any checkout (each package is recorded as it finishes; --max-time and --stop-on-fail stop early; on a --precise graph a process start, unnamed environment read or service connection refuses only the tests that may reach it; see gograph help test-memory), gograph untested --exclude-interface-methods to list untested production paths, and gograph uncovered --uncommitted --coverprofile cover.out to report unexecuted changed lines.
CI Architecture and Policy Gates — enforce package import layers (gograph boundaries), complexity/instability/god-object limits (gograph gate via .gograph.yml), exported API drift (gograph api --since origin/main), and machine-verifiable structural predicates (gograph validate). See the CI Architecture Gates guide.
Security Flow Triage — gograph flow --no-tests traces interprocedural source-to-sink paths from HTTP requests, decoded JSON, and environment variables to SQL, process execution, filesystem, and outbound HTTP sinks, with configurable sanitizer rules in gograph/flow.json.
Federated Workspaces — model multiple checked-out repositories through independently fingerprinted repository graphs plus a small deterministic cross-repository overlay. Resolution scopes support alternative fleets such as OSS/CE without merging repository ownership. P0 resolves Go modules, ordinary cross-repository Go calls, and first-class HTTP contracts for workspace-wide status, query, path, and impact analysis. The four read-only workspace MCP tools return the same native result values as CLI --json; member refresh and overlay publication remain explicit CLI mutations. Workspace guide →
Built-In Native MCP Server — all 66 repository query, analysis, and workflow capabilities have project-MCP equivalents (gograph_<command>) plus 4 session lifecycle tools (70 project tools total), and a separate 4-tool workspace MCP server (gograph workspace mcp). CLI-only process/host/artifact operations are build, validate, doctor, gate, snapshot, plugin/hook installation, MCP startup, workspace build/member refresh, version, and help. Complete CLI/MCP matrix →
Explicit Freshness and Query Contracts — CLI --json envelopes include gograph.graph-state.v1 (source, freshness, completeness, precision, refresh/persistence outcome); MCP attaches the same state in _meta.gograph_graph_state. File-qualified selectors (path/to/file.go:Name, file.go:Receiver.Method; an exact-case spelling wins over names differing only by case; gograph source prints a .go file the build context leaves out, unindexed), bounded pagination (--limit/--cursor), and constant/field resolution are specified in docs/query-contracts.md.
Agent Compliance Auditing — optional local session tracking (gograph session create|end|audit|cleanup) records whether agents run plan before edits and review after, grading sessions A–F without logging raw query results. See llm-wiki/session-scope.md.
Companion projects: Scrinium provides repository-owned, evidence-backed knowledge for coding agents, while Rulefloor binds repository invariants to concrete tests and detects drift. They are independent, optional tools.
Query and composed-analysis commands support --json; --files-only emits deduplicated paths; --mermaid renders callers, callees, impact, endpoint, dependents, deps, path, coupling, and diagram as fenced Mermaid (MCP accepts mermaid=true).
| Category | Commands | What it does |
|---|---|---|
| Indexing | `build . [--precise] [--strict] [--force] [--tags=...] [--exclude-dirs=...] |