Graphify C# brings compiler-accurate Find Usages to coding agents

Graphify C# brings compiler-accurate Find Usages to coding agents

Graphify C# is a new, free tool that gives AI coding agents, including Codex and Claude Code, compiler-accurate answers to the kind of question a developer would normally take to an IDE: what calls this method, what implements this interface, what overrides this member. Its documentation states the underlying problem plainly: a plain text search can find matching spellings, but it cannot reliably tell which overload was bound, which project the caller belongs to, or whether an interface implementation is the symbol actually meant. Graphify C# instead loads the target project through MSBuild and asks Roslyn, the C# compiler platform, what each symbol actually resolves to, then writes the result as one JSON document of nodes, edges and hyperedges that an agent, a script or a person can query directly. It is MIT licensed, needs no IDE and no compiled project DLL, and stores its output as a plain JSON file rather than a database.

The project demonstrates the approach on its own codebase. It highlights an internal method, DeclarationCatalogBuilder.ForTesting, and shows the graph resolving exactly one compiler-verified incoming call to it, from a test class, CSharp14FeatureTests, at line 143 of the file that defines it. Because the relationship comes from Roslyn's own symbol resolution rather than a text match, the documentation argues a consumer, human or automated, can classify that caller by its project or namespace convention and flag the method as test-only for human review, something a keyword search cannot do reliably.

Graphify C# installs as a dotnet global tool named Graphify.CSharp and reads a .sln, .slnx, .csproj, or an SDK-style file-based .cs app, provided the repository's own SDKs, packages and MSBuild inputs are available locally. The package contains two tool assets, chosen with a --framework flag; the documentation's own examples show net10.0 used to install the tool and net11.0 used later to update it. A separate, optional --target-framework argument picks which single compilation to analyze when a project targets more than one framework, and a single-target project does not need it. For repeated agent work, an optional --watch mode keeps the Roslyn workspace warm and prepares changed projects in the background, while a normal invocation acts as an explicit refresh barrier that returns only once a complete JSON snapshot is current; a --rebuild flag invalidates the incremental cache when needed.

The tool ships with an agent skill that, per its documentation, teaches an agent when to refresh the index, how to follow the semantic edges, and where static analysis stops. Installation differs by agent: a curl command into .agents/skills/graphify-csharp/SKILL.md for Codex-compatible projects, or the same file placed under .claude/skills/graphify-csharp/SKILL.md for Claude Code, followed by a reload of the agent session. Projects that skip skills entirely can instead add a project instruction telling the agent to refresh graphify-out/csharp.json with graphify-csharp before answering C# structure questions, identify declarations by their symbol_key, and read the incoming calls and references edges, while treating zero inbound edges as observed static evidence rather than proof that the code is unreachable at runtime.

The documentation positions Graphify C# against three neighbors rather than claiming to replace any of them. Rider and ReSharper give a developer interactive navigation, inspections, refactorings and quick fixes inside an IDE. NDepend is a commercial, broader architecture and code-quality suite built around dependency analysis, metrics, rules, reports, baselines and visualizations, and the documentation explicitly acknowledges real overlap with it on callers, dependencies, inheritance and dead-code investigation, framing the difference as a product boundary: Graphify C# supplies headless, open-format evidence built for agents, not a commercial suite built for people in an IDE. A separate, general graph-workflow tool called Graphify is entirely optional; without it, the JSON can be queried with an agent, jq, C#, Python or any other consumer, and with it, the same C# evidence feeds Graphify's higher-level query, path, explanation, clustering and export features.

The documentation is explicit about what the graph does not capture. It reflects only what Roslyn can observe statically, so reflection, dependency injection, native callbacks, dynamic invocation, and code outside the loaded compilation may create real relationships that never appear as an edge. Three consequences follow from that limit, stated directly in the documentation: zero inbound references means zero observed static references, not proof that code is unreachable at runtime; whether a result counts as test-only depends on the user's own project or namespace classification, not a determination the tool makes; and every deletion candidate the graph surfaces still requires human judgment. Unsupported semantic shapes are reported as diagnostics rather than crashing the whole extraction or silently vanishing.

Key facts

  • Graphify C# is a free, MIT-licensed, headless Roslyn and MSBuild indexer that turns a C# codebase's compiler-resolved calls, references, inheritance and overrides into one JSON graph of nodes, edges and hyperedges.
  • It installs as the dotnet global tool Graphify.CSharp, works on .sln, .slnx, .csproj and SDK-style file-based .cs apps, and ships two tool assets selected with --framework, shown in the docs installing against net10.0 and updating against net11.0.
  • On the project's own repository, the graph resolves exactly one compiler-verified incoming call to an internal method, DeclarationCatalogBuilder.ForTesting, tracing it to a test class at line 143 of CSharp14FeatureTests.cs.
  • An included agent skill, installed to a different path for Codex-compatible projects than for Claude Code, teaches an agent when to refresh the index and how to follow its semantic edges; an optional --watch mode keeps the Roslyn workspace warm between runs.
  • The documentation states its own limits: reflection, dependency injection, native callbacks and dynamic invocation can create real relationships the graph never shows as edges, so zero inbound references only means zero observed static references, and every deletion candidate still needs human judgment.

Why it matters

AI coding agents working on a C# codebase have mostly had to rely on text search for exactly the questions an IDE answers precisely: what calls this method, what implements this interface, what overrides this member. The documentation states the limit plainly: a text search can find matching spellings, but it cannot reliably tell which overload was bound, which project the caller belongs to, or whether an interface implementation is the symbol actually meant. Graphify C# closes that gap by asking Roslyn, the same compiler platform IDEs already use, what each symbol resolves to, then writing the result as one JSON graph an agent can query directly instead of guessing from text matches. Because the output is a plain, open JSON file rather than a proprietary IDE index, it also works headlessly, without an IDE, a compiled project DLL, or a database, which is what lets it run inside an agent's own workflow rather than beside it.

Who it affects

Teams building or maintaining C#-heavy codebases who already point coding agents like Codex or Claude Code at their repository stand to gain the most, since the tool is C#-specific and depends on Roslyn resolving the project through MSBuild. It also matters to anyone who already uses Rider, ReSharper or NDepend for similar navigation and dependency analysis: the documentation names all three directly and positions Graphify C# as a narrower, headless, open-format layer alongside them rather than a replacement, useful specifically where an agent, not a developer sitting in an IDE, needs the answer. Developers who build their own tooling on top of the output are covered too, since the JSON can be queried with jq, Python or C#, or fed into a separate, optional tool called Graphify for higher-level path and clustering queries.

How to use it

Install it as a dotnet global tool, for example dotnet tool install --global Graphify.CSharp --framework net10.0, then point it at a solution with graphify-csharp --input ./src/MyProduct.sln --root . --configuration Release --output ./graphify-out/csharp.json; it also reads .slnx, .csproj, and SDK-style file-based .cs apps, provided the repository's own SDKs, packages and MSBuild inputs are available locally. The package ships two tool assets chosen through that same --framework flag, illustrated in the docs with net10.0 for installing and net11.0 for updating; a separate --target-framework argument, needed only for multi-target projects, picks which single compilation to analyze. For an agent to use the index automatically, install the included skill, from a curl command into .agents/skills/graphify-csharp/SKILL.md for Codex-compatible projects, or the same file under .claude/skills/graphify-csharp/SKILL.md for Claude Code, then reload the agent session; without a skill, a project instruction can tell the agent to refresh graphify-out/csharp.json before answering C# structure questions, identify declarations by symbol_key, and read the incoming calls and references edges. Running with --watch keeps the Roslyn workspace warm in the background for repeated agent work, while a plain invocation acts as a refresh barrier that returns only once a full snapshot is current, and --rebuild invalidates the incremental cache when needed. It is free and MIT licensed, and the separate Graphify tool is entirely optional.

How solid is it

This is a brand-new Show HN submission that had gathered 27 points and 11 comments in its first five hours, not the marks of a large-scale launch. The documentation does not name any individual or organization as the tool's author or maintainer; a GitHub account, zachsaw, appears only inside example install commands, never as a stated byline. No benchmark or performance figures, such as indexing speed or accuracy, and no adoption numbers, such as stars or downloads, appear anywhere in the material, and no version number or release history is given either. The one worked example, the incoming-call graph for DeclarationCatalogBuilder.ForTesting, is run against the tool's own repository rather than an independent codebase, so it demonstrates the mechanism without proving it holds up at scale. The underlying technique, resolving symbols through the compiler rather than matching text, is well established: the documentation itself points to Rider, ReSharper and the commercial tool NDepend as doing related analysis already, and frames Graphify C# as a narrower, headless slice of that same idea rather than a new method.

Risks and caveats

The documentation is explicit that the graph reflects only what Roslyn can observe statically: reflection, dependency injection, native callbacks, dynamic invocation, and any code outside the loaded compilation may create real relationships that never show up as an edge. Three consequences follow directly from that limit, stated in the documentation itself: zero inbound references means zero observed static references, not proof that the code is unreachable at runtime; whether a result counts as test-only depends on the user's own project or namespace classification, not a determination the tool makes by itself; and every deletion candidate the graph surfaces still requires human judgment before anyone removes anything. Running it at all also requires the target repository's own SDKs, packages and MSBuild inputs to be available locally, so it cannot analyze a codebase from source text alone; unsupported semantic shapes are reported only as diagnostics rather than crashing the whole extraction or silently disappearing.