Dotnet Csharp Code Smells

🌐Community
by novotnyllc · vlatest · Repository

This skill identifies common C# code smells in .NET projects, helping developers improve code quality and maintainability.

Install on your platform

We auto-selected Claude Code based on this skill’s supported platforms.

1

Run in terminal (recommended)

terminal
claude mcp add dotnet-csharp-code-smells npx -- -y @trustedskills/dotnet-csharp-code-smells
2

Or manually add to ~/.claude/settings.json

~/.claude/settings.json
{
  "mcpServers": {
    "dotnet-csharp-code-smells": {
      "command": "npx",
      "args": [
        "-y",
        "@trustedskills/dotnet-csharp-code-smells"
      ]
    }
  }
}

Requires Claude Code (claude CLI). Run claude --version to verify your install.

About This Skill

What it does

This skill analyzes C# code and identifies common code smells, such as long methods, duplicate code blocks, and complex conditional logic. It provides suggestions for refactoring to improve code readability, maintainability, and overall design quality. The skill leverages established coding best practices and patterns to pinpoint areas needing attention within a .NET codebase.

When to use it

  • Refactoring Legacy Code: Identify and address problematic areas in older C# projects that may be difficult to understand or modify.
  • Code Review Assistance: Quickly surface potential code quality issues during peer reviews, accelerating the feedback process.
  • Improving New Development: Proactively detect and correct code smells as new features are implemented, preventing technical debt from accumulating.
  • Learning Best Practices: Use the skill to understand why certain coding patterns are considered "smelly" and how to avoid them in future development.

Key capabilities

  • Identifies long methods
  • Detects duplicate code blocks
  • Flags complex conditional logic
  • Provides refactoring suggestions

Example prompts

  • “Analyze this C# code for potential code smells: [paste code here]”
  • "What are the most common code smells in this .NET project?"
  • "Suggest ways to refactor this method to reduce its complexity: [paste method code here]"

Tips & gotchas

  • The skill is best suited for C# code within a .NET environment.
  • While it provides suggestions, always review and understand the implications of any proposed refactoring changes before implementing them.

Tags

🛡️

TrustedSkills Verification

Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.

Security Audits

Gen Agent Trust HubPass
SocketPass
SnykPass

Details

Version
vlatest
License
Author
novotnyllc
Installs
8

🌐 Community

Passed automated security scans.