C# Project Expert
Compiler-accurate semantic analysis for C# using Roslyn APIs. Not text search - understands C# semantics.
When to Use
Use this skill for:
- •Finding symbol definitions (classes, methods, interfaces, properties)
- •Finding all references before refactoring
- •Safe renaming across entire solution (always preview first!)
- •Understanding method signatures and type hierarchies
- •Checking compilation errors/warnings
- •Finding interface implementations
- •Analyzing method call chains (callers/callees)
- •Finding unused code
Don't use for: Non-C# files, simple text/comment searches, projects without .sln/.csproj
CLI Path (Cross-Platform)
| Platform | Path |
|---|---|
| Linux x64 | ./scripts/linux-x64/csharp-skill |
| macOS x64 | ./scripts/osx-x64/csharp-skill |
| macOS ARM | ./scripts/osx-arm64/csharp-skill |
| Windows x64 | ./scripts/win-x64/csharp-skill.exe |
Command Syntax
code
<cli-path> [-s <solution.sln> | -p <project.csproj>] [-o json|text|markdown] <command> [options]
Auto-Discovery: If -s or -p is not specified, the tool automatically searches the current directory for a .sln file (preferred) or .csproj file.
All Commands (18)
| Command | Purpose | Key Options |
|---|---|---|
find-definition <name> | Where is symbol defined | `--type class |
find-references <name> | All usages of symbol | --type, --in-namespace |
rename <old> <new> | Rename across solution | --preview (use first!), --type, --rename-file |
signature <name> | Method/type signature | --include-overloads, --include-docs |
list-members <type> | Members of a type | `--kind method |
diagnostics | Compilation errors/warnings | `--severity error |
check-symbol-exists <name> | Verify symbol exists | --type |
find-implementations <name> | Interface implementations | - |
inheritance-tree <type> | Type hierarchy | `--direction ancestors |
find-callers <method> | Who calls this method | - |
find-callees <method> | What does method call | - |
dependencies <target> | Type/file dependencies | - |
unused-code | Find dead code | - |
generate-interface <class> | Extract interface | - |
implement-interface <iface> | Generate stubs | - |
list-types | Types in namespace/file | --namespace |
namespace-tree | Namespace hierarchy | - |
analyze-file <path> | Quick file analysis | - |
Critical Workflows
Safe Rename (Always Follow)
- •Check usage:
find-references OldName --type method - •Preview changes (REQUIRED):
rename OldName NewName --type method --preview - •Apply:
rename OldName NewName --type method - •When renaming classes/types: Add
--rename-fileto also rename the file - •Verify:
diagnostics --severity error
Understand Unknown Code
- •What is it?
find-definition ClassName --type class - •What can it do?
list-members ClassName - •How does it fit?
inheritance-tree ClassName - •What does it need?
dependencies ClassName
Output Formats
- •
json(default) - Machine-readable - •
text- Human-readable terminal - •
markdown- Documentation format
Requirements
- •.NET 10.0 runtime
- •Valid .sln or .csproj file
- •Solution must compile
Exit Codes
- •
0Success |1Error |2Not found
Detailed References
- •COMMANDS.md - Full command reference
- •WORKFLOWS.md - Step-by-step workflows
- •EXAMPLES.md - Real-world scenarios