Sharpitect plugins for intelligent C# codebase navigation in Claude Code
npx claudepluginhub nick-boey/sharpitectSharpitect MCP server with skills for intelligent C# codebase navigation. Automatically prefers semantic analysis over text-based searching.
Sharpitect generates C4 architecture diagrams from annotated C# codebases. It analyzes your code using Roslyn and builds a declaration graph that can be queried and visualized.
Sharpitect maps C# constructs to C4 model elements following these conventions:
[Component] attribute to mark types as C4 componentsusing Sharpitect.Analysis.Analyzers;
using Sharpitect.Analysis.Persistence;
// Create repository
var repository = new SqliteGraphRepository("architecture.db");
await repository.InitializeAsync();
// Analyze solution
var analyzer = new GraphSolutionAnalyzer(repository);
await analyzer.AnalyzeAsync("path/to/solution.sln");
using Sharpitect.Analysis.Graph;
using Sharpitect.Analysis.Search;
// Create search service with in-memory source
var graph = new DeclarationGraph();
var source = new InMemoryGraphSource(graph);
var searchService = new GraphSearchService(source);
// Search for classes containing "Service"
var query = new SearchQuery
{
SearchText = "Service",
MatchMode = SearchMatchMode.Contains,
KindFilter = [DeclarationKind.Class]
};
var results = await searchService.SearchAsync(query);
Contains, StartsWith, EndsWith, or Exactdotnet tool install -g Sharpitect.Tool
If the sharpitect command is not found after installation, you need to add the .NET tools directory to your PATH. Add the following line to your shell configuration file (~/.bashrc, ~/.bash_profile, or ~/.zshrc):
export PATH="$PATH:$HOME/.dotnet/tools"
Then reload your shell configuration:
source ~/.bashrc # or ~/.bash_profile or ~/.zshrc
Alternatively, you can run this one-liner to add it permanently:
echo 'export PATH="$PATH:$HOME/.dotnet/tools"' >> ~/.bashrc && source ~/.bashrc
dotnet build Sharpitect.sln
dotnet test Sharpitect.sln
See LICENSE file for details.