Full semantic understanding of C# solutions for Claude Code through Roslyn's compilation model.
A server-based architecture that provides comprehensive code analysis, generation, and transformation capabilities using Roslyn's semantic model. All tools operate on an in-memory workspace with full type resolution and cross-project awareness.
RoslynTools uses a Global Coordinator architecture:
- Global Server (localhost:5000) manages multiple solution servers
- Solution Servers (ports 5001+) each maintain one solution's Roslyn Workspace
- Automatic port assignment - no manual configuration needed
- Real-time monitoring via SignalR for live activity tracking
- Skill executables auto-discover their solution's server port
Each solution server maintains an in-memory Roslyn Workspace with:
- Full
Compilationwith all projects loaded SemanticModelfor symbol resolution and type information- Cross-project type hierarchy and reference tracking
- Real-time diagnostics with full context
- Transaction-safe commits with rollback support
Analysis (Read-only semantic analysis):
- ComplexityAnalyzer - Cyclomatic complexity with method symbols
- TypeFinder - Find types with full inheritance information
- NamespaceExplorer - Explore namespace hierarchy across solution
- TypeCollisionDetector - Detect duplicate type names
- MemberIdentifier - Identify members with semantic information
- BuildFixer - Analyze compilation diagnostics
Generation (Create new code):
- DocGenerator - Generate XML docs using semantic inference
- CodeWriter - Generate and validate new code
Transformation (Modify existing code):
- CodeReader - Strip documentation from code
- CodeEditor - Apply semantic-aware refactorings
Install the global CLI tool:
dotnet tool install -g CyberdyneDevelopment.ClaudeToolsNavigate to any C# repository and run:
cd my-csharp-project
claude-tools initThis will:
- Auto-detect your solution file
- Let you select skills to enable (complexity-analyzer, type-finder, refactor, etc.)
- Create
.claude-tools.jsonconfiguration (port assigned automatically) - Copy selected skills with executables to
.claude/skills/ - Update
.gitignore
claude-tools server startThe server will:
- Auto-start the Global Coordinator (if not running)
- Register with Global Server and get assigned port
- Start in the background
- Load your solution into memory
- Expose analysis endpoints on assigned port
- Track process ID in
.claude-tools/server.pid
claude-tools server status# List all available skills
claude-tools skills list
# Enable a skill
claude-tools skills enable namespace-explorer
# Disable a skill
claude-tools skills disable namespace-explorerclaude-tools server stopFor programmatic access:
using CyberdyneDevelopment.RoslynTools.Client;
var client = new RoslynWorkspaceClient("http://localhost:5000");
// Analyze complexity with semantic model
var complexity = await client.AnalyzeComplexity(
projectFilter: "MyProject.Core",
groupBy: GroupBy.Class
);
// Find types with full symbol information
var types = await client.FindTypes(
pattern: ".*Service$",
useRegex: true
);
// Generate documentation
await client.GenerateDocumentation(
scope: DocScope.AllPublic,
inferFromNames: true
);
// Commit all changes
await client.Commit();See the docs directory for complete documentation:
- How to Use - Complete usage guide for all tools
- Quick Start - Get started quickly
- Server/Client Guide - Using the workspace server
- Architecture - Technical architecture details
- .NET 10.0 SDK
- Roslyn 5.0.0-2.final
- Windows, macOS, or Linux
This project uses Nerdbank.GitVersioning for semantic versioning.
Current version: 0.1.0-alpha
See LICENSE file for details.
This project includes skills for Claude Code in the Skills/ directory.
After running claude-tools init, the selected skills will be available in .claude/skills/ for use with Claude Code. These skills provide intelligent workflows for:
- complexity-analyzer - Analyze cyclomatic complexity across your codebase
- type-finder - Find types with full inheritance and interface information
- namespace-explorer - Explore namespace hierarchy and organization
- type-collision-detector - Detect duplicate type names across projects
- member-identifier - Identify class members with semantic information
- build-fixer - Analyze and fix compilation diagnostics
- doc-generator - Generate XML documentation with semantic inference
- code-reader - Read code with semantic awareness
- code-writer - Generate new code with validation
- code-editor - Apply semantic-aware refactorings
- refactor - Common refactoring operations
Initialize RoslynTools in the current directory with interactive prompts.
Start the solution server (auto-starts Global Server if needed).
Stop the running solution server.
Check if the solution server is running and view status information.
Manually start the Global Coordinator (usually auto-started).
Stop the Global Coordinator (stops all solution servers).
View all active solution servers and their ports.
Launch real-time activity monitor for all solutions.
List all available skills and their enabled status.
Enable a skill by copying it to .claude/skills/.
Disable a skill, optionally deleting the files.