dynamo-dotnet-janitor

Modernizes and cleans up C#/.NET codebases through refactoring, testing, and documentation.

2.0k|679|Updated Feb 9, 2012
One-click install
npx skills add https://github.com/DynamoDS/Dynamo --skill dynamo-dotnet-janitor
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dynamo-dotnet-janitor
Source: https://github.com/DynamoDS/Dynamo/tree/main/.claude/skills/dynamo-dotnet-janitor
Command: npx skills add https://github.com/DynamoDS/Dynamo --skill dynamo-dotnet-janitor

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

C#/.NET codebases accumulate technical debt over time: obsolete APIs, compiler warnings, inconsistent naming, missing tests, and outdated syntax. This Skill provides a systematic workflow for cleaning up, modernizing, and documenting .NET code without breaking existing behavior.

Core Features & Use Cases

  • Code Modernization: Upgrades code to modern C# language features supported by .NET 10, including nullable reference types, pattern matching, collection expressions, and primary constructors.
  • Quality & Performance Cleanup: Removes unused usings and members, fixes naming violations, resolves compiler warnings, and applies performance patterns like StringBuilder, Span<T>, and correct async/await usage.
  • Test Coverage & Documentation: Identifies coverage gaps, adds NUnit tests following the AAA pattern, and writes XML documentation comments for public APIs.
  • Use Case: Point the Skill at a legacy Dynamo node library project and have it replace deprecated APIs, resolve all compiler warnings, and add missing unit tests incrementally, validating with test runs after each change.

Quick Start

Ask the assistant to scan this C# project for compiler warnings and obsolete API usage, then modernize the code and add missing NUnit tests incrementally.

Frequently Asked Questions about dynamo-dotnet-janitor

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

FAQPage Schema
How do I modernize legacy C# code to the latest .NET version?

Modernize C# code by replacing obsolete APIs, adopting nullable reference types, applying pattern matching and switch expressions, and using collection expressions and primary constructors. Make small incremental changes and run tests after each modification to preserve behavior.

How to improve test coverage for a .NET project?

Identify untested public APIs and critical workflows, then add unit tests using NUnit with the AAA (Arrange, Act, Assert) pattern. Prefer clear, readable assertion messages and add integration tests for critical workflows.

What C# performance optimizations should I apply first?

Start by replacing inefficient collection operations, using StringBuilder for string concatenation, and applying async/await correctly. Then reduce memory allocations and boxing, and adopt Span<T> and Memory<T> where profiling shows benefit.

Does this refactoring approach work with older .NET Framework projects?

Modernization targets the C# language version supported by the project's target framework, currently .NET 10. Older framework projects may need a target framework upgrade before some modern syntax features become available.

Why should refactoring changes be made incrementally?

Incremental changes let you run tests after each modification, isolating regressions immediately. This preserves existing functionality and makes it easy to revert a single problematic change instead of debugging a large combined refactor.