CSharpener

Identifies dead code and generates call graphs for C# projects via Roslyn-based static analysis.

Updated Nov 7, 2025
One-click install
npx skills add https://github.com/lawless-m/FreeBird --skill csharpener
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: CSharpener
Source: https://github.com/lawless-m/FreeBird/tree/main/.claude/skills/CSharpener
Command: npx skills add https://github.com/lawless-m/FreeBird --skill csharpener

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Understanding complex C# codebases, identifying dead code, or assessing the impact of changes can be time-consuming and error-prone. This Skill provides a powerful Roslyn-based static analysis tool to automate these tasks, enabling confident refactoring and improved code quality.

Core Features & Use Cases

  • Unused Code Detection: Automatically scan solutions to find private, internal, and public methods that are never called, with confidence levels to guide safe removal.
  • Impact Analysis: Before deleting or modifying a method, analyze its direct and transitive callers to understand what would break, preventing unintended side effects.
  • Call Graph & Documentation: Generate interactive HTML documentation with cross-referenced code and call graphs, or export to Graphviz for visual analysis.
  • Use Case: You're tasked with cleaning up a legacy C# solution. Use this Skill to identify all unused methods, then for each suspicious method, run an impact analysis to confirm it's safe to delete, streamlining your refactoring efforts.

Quick Start

Use the CSharpener skill to find all unused methods in the attached 'MySolution.sln' and display them in the console.

Frequently Asked Questions about CSharpener

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find unused methods in a C# solution?

Unused code detection scans your C# solution to automatically identify private, internal, and public methods that are never called, with confidence levels to guide safe removal decisions.

How can I analyze the impact before removing a C# method?

Impact analysis traces direct and transitive callers of a method to show what would break if removed, helping you confirm it's safe to delete before refactoring.

Can I generate call graphs and documentation from C# code?

You can export call graphs as interactive HTML with cross-referenced code, or in Graphviz format for visual analysis of method relationships in your codebase.

What type of static analysis does this use for C# projects?

Roslyn-based static analysis examines C# projects without executing code, producing structured outputs in JSON, console, Graphviz, DOT, or HTML formats for documentation and refactoring.

Is this tool suitable for large, legacy C# codebases?

Yes; it's designed for large codebases to automate dead code detection and refactoring assessment, streamlining cleanup of complex legacy solutions.

What output formats are available for analysis results?

Analysis results export as JSON, console output, DOT diagrams, Graphviz visualizations, and interactive HTML documentation for flexible downstream use.

Related Skills