一键导入
csharpener
C# static analysis tool for call graphs, unused code detection, impact analysis, HTML documentation generation, and Graphviz diagram export
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
C# static analysis tool for call graphs, unused code detection, impact analysis, HTML documentation generation, and Graphviz diagram export
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Protocol fuzzer script development using boofuzz framework. Use when creating network protocol fuzzers, defining protocol PDUs (Protocol Data Units), writing mutation-based fuzzing scripts, or contributing to the boofuzz project. Covers binary protocol definitions, session management, crash detection, and reporting findings.
Real-time browser debugging and interaction via WebSocket bridge server on localhost:3141
Guide for creating Claude Code skill documents with YAML frontmatter, instructions, examples, and reference implementations
JavaScript/TypeScript static analysis tool for call graphs, unused code detection (tree shaking), dependency analysis, and circular dependency detection
UTF-8 JSON file I/O utilities to avoid Windows encoding issues (CP-1252 vs UTF-8)
Rust development patterns, project setup, CLI/TUI applications, error handling, and system integration
| name | CSharpener |
| description | C# static analysis tool for call graphs, unused code detection, impact analysis, HTML documentation generation, and Graphviz diagram export |
CSharpener is a Roslyn-based static analysis tool that analyzes C# codebases to build call graphs, identify unused code, and help with refactoring decisions.
ALWAYS use this exact command format when invoking CSharpener:
"Y:/CSharpDLLs/CSharpener/CSharpener.exe" <command> --solution "<path-to-solution>" --format console
Key Requirements:
Y:/CSharpDLLs/CSharpener/CSharpener.exeCommon Commands:
analyze --solution <path> --format console --include-call-graph - Full analysis with call graphunused --solution <path> --format console - Find unused methodscallers --solution <path> --method <name> --format console - Find who calls a methoddependencies --solution <path> --method <name> --format console - Find method dependenciesimpact --solution <path> --method <name> --format console - Analyze removal impactPrimary: Y:\CSharpDLLs\CSharpener\CSharpener.exe (use Y:/ with forward slashes in bash)
Fallback: If the Y: drive is not available, the source code can be built from:
dotnet build -c ReleaseCSharpCallGraphAnalyzer\bin\Release\net9.0\win-x64\csharp-analyzer.exePerforms comprehensive analysis including call graph, unused methods, and statistics.
Y:\CSharpDLLs\CSharpener\CSharpener.exe analyze --solution <path> --format console
Options:
--solution, -s (required): Path to .sln or .csproj file--format, -f: Output format (json, console, dot, graphviz, html) [default: json]--output, -o: Output file path (stdout if not specified)--include-call-graph: Include full call graph in output [default: true]--exclude-namespace: Namespaces to exclude from analysisQuickly scans for potentially unused methods with confidence levels.
Y:\CSharpDLLs\CSharpener\CSharpener.exe unused --solution <path> --format console
Options:
--solution, -s (required): Path to .sln or .csproj file--format, -f: Output format (json, console, dot, graphviz) [default: json]--output, -o: Output file path--exclude-namespace: Namespaces to excludeConfidence Levels:
Finds all methods that call a specific method.
Y:\CSharpDLLs\CSharpener\CSharpener.exe callers --solution <path> --method <method-name> --format console
Options:
--solution, -s (required): Path to .sln or .csproj file--method, -m (required): Fully qualified or partial method name to search for--format, -f: Output format [default: json]Example:
Y:\CSharpDLLs\CSharpener\CSharpener.exe callers -s MySolution.sln -m "BuildCallGraphAsync" -f console
Finds all methods that a specific method calls (its dependencies).
Y:\CSharpDLLs\CSharpener\CSharpener.exe dependencies --solution <path> --method <method-name> --format console
Options:
--solution, -s (required): Path to .sln or .csproj file--method, -m (required): Method name to analyze--format, -f: Output format [default: json]Analyzes what would break if you removed a method (safety check before deletion).
Y:\CSharpDLLs\CSharpener\CSharpener.exe impact --solution <path> --method <method-name> --format console
Options:
--solution, -s (required): Path to .sln or .csproj file--method, -m (required): Method to analyze--format, -f: Output format [default: json]Shows:
Generates HTML documentation with cross-referenced code, call graphs, and navigation.
Y:\CSharpDLLs\CSharpener\CSharpener.exe document --solution <path> --output docs/analysis.html
Options:
--solution, -s (required): Path to .sln or .csproj file--output, -o (required): Output HTML file path--include-unused: Include unused methods in documentation--include-tests: Include test projectsUser Request: "Find unused methods in my solution"
Claude Action:
Y:\CSharpDLLs\CSharpener\CSharpener.exe unused --solution "C:\path\to\solution.sln" --format console
Interpretation:
User Request: "What would break if I deleted the ProcessData method?"
Claude Action:
Y:\CSharpDLLs\CSharpener\CSharpener.exe impact --solution "C:\path\to\solution.sln" --method "ProcessData" --format console
Interpretation:
User Request: "Who calls the BuildAsync method?"
Claude Action:
Y:\CSharpDLLs\CSharpener\CSharpener.exe callers --solution "C:\path\to\solution.sln" --method "BuildAsync" --format console
User Request: "Generate HTML documentation for my project"
Claude Action:
Y:\CSharpDLLs\CSharpener\CSharpener.exe document --solution "C:\path\to\solution.sln" --output docs/csharpener-analysis.html
Then open the generated HTML file in a browser.
User Request: "Analyze my solution and show me statistics"
Claude Action:
Y:\CSharpDLLs\CSharpener\CSharpener.exe analyze --solution "C:\path\to\solution.sln" --format console
--exclude-namespace "*.Tests,*.Test" for large solutions.csharpener-cache/ in solution directory (can be deleted to force refresh)unused --solution MySolution.slnimpact --method MethodNamecallers --method Maindependencies --method ProcessRequestanalyze --format dot (use Graphviz to render)document --output review.htmldotnet build first to ensure it compiles--exclude-namespace# Example GitHub Actions workflow
- name: Analyze for unused code
run: |
Y:\CSharpDLLs\CSharpener\CSharpener.exe unused \
--solution MySolution.sln \
--format json \
--output unused-methods.json
- name: Upload results
uses: actions/upload-artifact@v3
with:
name: code-analysis
path: unused-methods.json