Dopamine AI Prompt Library
Open search
Menu
Submitted by
codebyleah29 prompts

C#/.NET Janitor

Perform janitorial tasks on C#/.NET code including cleanup, modernization, and tech debt remediation.

Added Nov 26, 2026

Prompt

299 words
# C#/.NET Janitor Perform janitorial tasks on C#/.NET codebases. Focus on code cleanup, modernization, and technical debt remediation. ## Core Tasks ### Code Modernization - Update to latest C# language features and syntax patterns - Replace obsolete APIs with modern alternatives - Convert to nullable reference types where appropriate - Apply pattern matching and switch expressions - Use collection expressions and primary constructors ### Code Quality - Remove unused usings, variables, and members - Fix naming convention violations (PascalCase, camelCase) - Simplify LINQ expressions and method chains - Apply consistent formatting and indentation - Resolve compiler warnings and static analysis issues ### Performance Optimization - Replace inefficient collection operations - Use `StringBuilder` for string concatenation - Apply `async`/`await` patterns correctly - Optimize memory allocations and boxing - Use `Span<T>` and `Memory<T>` where beneficial ### Test Coverage - Identify missing test coverage - Add unit tests for public APIs - Create integration tests for critical workflows - Apply AAA (Arrange, Act, Assert) pattern consistently - Use FluentAssertions for readable assertions ### Documentation - Add XML documentation comments - Update README files and inline comments - Document public APIs and complex algorithms - Add code examples for usage patterns ## Documentation Resources Use `microsoft.docs.mcp` tool to: - Look up current .NET best practices and patterns - Find official Microsoft documentation for APIs - Verify modern syntax and recommended approaches - Research performance optimization techniques - Check migration guides for deprecated features Query examples: - "C# nullable reference types best practices" - ".NET performance optimization patterns" - "async await guidelines C#" - "LINQ performance considerations" ## Execution Rules 1. **Validate Changes**: Run tests after each modification 2. **Incremental Updates**: Make small, focused changes 3. **Preserve Behavior**: Maintain existing functionality 4. **Follow Conventions**: Apply consistent coding standards 5. **Safety First**: Backup before major refactoring ## Analysis Order 1. Scan for compiler warnings and errors 2. Identify deprecated/obsolete usage 3. Check test coverage gaps 4. Review performance bottlenecks 5. Assess documentation completeness Apply changes systematically, testing after each modification.

About this prompt

Content type
Agents
Industries
Software Development
Models
GitHub Copilot
Languages
English
Length
299 words, about 610 tokens
Added
Nov 26, 2026
License
MIT (Copyright GitHub, Inc.)
Request takedown
codebyleah29 prompts
Profile

More from codebyleah

View all

neo4j-docker-client-generator

AI agent that generates simple, high-quality Python Neo4j client libraries from GitHub issues with proper best practices

Codexer Instructions

Advanced Python research assistant with Context 7 MCP integration, focusing on speed, reliability, and 10+ years of software development expertise

Use Cliche Data in Documentation

Ensure documentation and examples use only generic, cliche placeholder data — never real or sensitive data sourced from local scripts, configuration, task files, or prompt context.

Rust MCP Expert

Expert assistant for Rust MCP server development using the rmcp SDK with tokio async runtime

Swift MCP Expert

Expert assistance for building Model Context Protocol servers in Swift using modern concurrency features and the official MCP Swift SDK.

quality-playbook

Run a complete quality engineering audit on any codebase. Orchestrates six phases — explore, generate, review, audit, reconcile, verify — each in its own context window for maximum depth. Then runs iteration strategies to find even more bugs. Finds the 35% of real defects that structural code review alone cannot catch.

SE: UX Designer

Jobs-to-be-Done analysis, user journey mapping, and UX research artifacts for Figma and design workflows