Graphify dotnet

From managedcode/dotnet-skills · View interactive version

Graphify dotnet is an AI agent skill from the GitHub repository managedcode/dotnet-skills. Use `graphify-dotnet` to generate codebase knowledge graphs, architecture snapshots, and exportable repository maps from .NET or polyglot source trees, with optional AI-enriched semantic relationships. USE FOR: graphify commands; graph JSON, HTML, SVG, Cypher, Markdown, and Obsidian exports; reposit

How to use this skill

Skill file

graphify-dotnet

Trigger On

Workflow

  1. Confirm the problem is structural discovery, architecture review, onboarding, or graph export. If the user only needs one symbol lookup, one bug fix, or one dependency trace, normal repo search and tests are cheaper than a full graph run.
  2. Install and verify the tool before doing anything else:

```bash

dotnet --version

dotnet tool install -g graphify-dotnet

graphify --version

```

  1. Start with a bounded AST-only run so the first output is fast and deterministic:

```bash

graphify run ./src --format json,html,report --provider none --verbose

```

  1. Review outputs in this order:
  1. Add AI enrichment only when inferred relationships or conceptual grouping matter more than strict syntax-only structure.
  2. Expand export formats for the real consumer:
  1. Use watch for iterative architecture work, but rerun a clean run periodically because deletes and renames can leave stale references behind.
  2. Run benchmark only after you already trust the generated graph.json; its value is comparative token-reduction evidence, not billing-grade accounting.

Architecture

flowchart LR
  A["Repository or subtree"] --> B["graphify run / watch"]
  B --> C{"AI provider configured?"}
  C -->|No| D["AST extraction only"]
  C -->|Yes| E["AST + semantic extraction"]
  D --> F["Knowledge graph + Louvain communities"]
  E --> F
  F --> G{"Output target"}
  G -->|Human review| H["graph.html + GRAPH_REPORT.md"]
  G -->|Automation| I["graph.json"]
  G -->|Static docs| J["graph.svg"]
  G -->|Knowledge base| K["obsidian/ or wiki/"]
  G -->|Graph queries| L["graph.cypher for Neo4j"]

Practical Recipes

Write a quick architecture snapshot

graphify run . --format html,report --output ./artifacts/graph

Use this when you need a fast human-readable map of the current repo. Read ./artifacts/graph/GRAPH_REPORT.md first, then open ./artifacts/graph/graph.html.

Write queryable and documentation exports

graphify run ./src --format json,neo4j,svg,obsidian,wiki --output ./graphify-out

Use this when the graph will be consumed by scripts, Neo4j, docs, or knowledge-base tooling instead of only a browser.

Read and benchmark an existing graph

graphify benchmark ./graphify-out/graph.json

Treat this as a heuristic efficiency check for AI-context workflows after the graph already exists.

Provider Choice

Choose the provider by operational constraint first, not by model hype:

Configuration Patterns

graphify resolves settings in this priority order:

  1. CLI arguments
  2. user secrets
  3. environment variables
  4. appsettings.local.json
  5. appsettings.json

Use graphify config for the interactive wizard and graphify config show to inspect the resolved effective settings.

Common environment-variable patterns:

# AST-only explicit override
export GRAPHIFY__Provider=None

# Ollama
export GRAPHIFY__Provider=Ollama
export GRAPHIFY__Ollama__Endpoint=http://localhost:11434
export GRAPHIFY__Ollama__ModelId=llama3.2

# Azure OpenAI
export GRAPHIFY__Provider=AzureOpenAI
export GRAPHIFY__AzureOpenAI__Endpoint=https://myresource.openai.azure.com/
export GRAPHIFY__AzureOpenAI__ApiKey=...
export GRAPHIFY__AzureOpenAI__DeploymentName=gpt-4o

# GitHub Copilot SDK
export GRAPHIFY__Provider=CopilotSdk
export GRAPHIFY__CopilotSdk__ModelId=gpt-4.1

Tradeoffs And Constraints

Deliver

Validate

Load References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.