agentleFS
dprakash2101dprakash2101/dotnet-production-agent-skills/skills/code-quality/SKILL.md

code-quality

Skill4 starsChanged 2 months agoMITView on GitHub

Use when improving or reviewing modified .NET code for SonarCloud/Roslyn findings, duplication, complexity, maintainability, or existing helper reuse. Avoid unrelated legacy cleanup.

38 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use spring-boot, design-patterns and 8 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • MindrallySkill

    spring-boot

    Expert guidance for Spring Boot application development with best practices for RESTful APIs, testing, security, and deployment

    Also in 3 projects that use this

  • ratacatSkill

    design-patterns

    Use when designing software architecture, refactoring code structure, solving recurring design problems, or when code exhibits symptoms like tight coupling, rigid hierarchies, scattered responsibilities, or difficult-to-test components. Also use when choosing between architectural approaches or reviewing code for structural improvements.

    Also in 3 projects that use this

  • rogue-dev-studioSkill

    python

    Python 3.13 with uv package manager via mise. Use when the project needs this capability or the user / team manifest asks for it. Use for specialized `python` work when listed in TEAM.yaml or explicitly requested.

    Also in 3 projects that use this

  • 0xSeroSkill

    security

    Also in 4 projects that use this

  • BlockSkill

    debugging

    Debugging guidelines and best practices

    Also in 3 projects that use this

  • NVIDIASkill

    testing

    Run Python and Rust tests for physicsnemo-curator using uv + pytest with coverage reporting via pytest-cov, and cargo-nextest for Rust tests. Includes benchmark workflows with pytest-benchmark and criterion.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 3 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 37 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Do not extract an abstraction because two trivial lines look alike, combine unrelated concepts in a global helper, or refactor a large area …

    line 12
  2. Distinctive:

    Prefer clear names, focused methods, guard clauses, accurate null handling, structured logging, correct async/cancellation, dependency …

    line 14
  3. Distinctive:

    Avoid deep nesting, giant methods, unexplained magic values, unnecessary static state, swallowed or over-broad exceptions, dead/commented …

    line 16

“Common” is measured: kept by at least 6 in 10 of the 37 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

.NET code quality

Write new and materially modified code cleanly on the first pass. Optimize it for reliability, security, maintainability, readability, testability, low cognitive complexity, and low duplication. Inspect and obey repository-specific SonarCloud/SonarQube configuration, quality profiles or suppressions represented in source, analyzers, .editorconfig, nullable settings, language version, and conventions; repository rules take precedence over generic assumptions.

Before adding substantial logic, search the relevant feature, layer, and shared components for materially equivalent behavior. Reuse an existing sound implementation when its contract and scope match. When multiple callers genuinely need the same meaningful business or technical behavior, consider a focused helper, service method, extension, mapper, utility, or shared component. Search usages and preserve every caller's behavior before changing shared code.

Do not extract an abstraction because two trivial lines look alike, combine unrelated concepts in a global helper, or refactor a large area to remove insignificant duplication.

Prefer clear names, focused methods, guard clauses, accurate null handling, structured logging, correct async/cancellation, dependency injection, safe disposal, and immutable/read-only state where useful. Design exception paths, resource ownership, and async behavior alongside the happy path. Keep code straightforward to test.

Avoid deep nesting, giant methods, unexplained magic values, unnecessary static state, swallowed or over-broad exceptions, dead/commented code, complex LINQ that obscures intent, sync-over-async, secret logging, hardcoded credentials, unjustified allocations on hot paths, and analyzer suppression as a substitute for a fix.

Apply Clean-as-You-Code: introduce no new issues, vulnerabilities, security hotspots, or avoidable duplication in changed code. Improve a pre-existing issue only when the requested change materially touches it or it blocks safe implementation. Do not turn feature work into a historical Sonar cleanup. Run the repository's configured analyzer/Sonar-equivalent check when available and proportionate; do not invent a generic rule set when the repository defines one.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.