Skip to content
Skills Library
Programming · Review & audit

stylecop-analyzers

/stylecop-analyzers

Use the open-source free `StyleCop.Analyzers` package for naming, layout, documentation, and style rules in .NET projects. Use when a repo wants stricter style conventions than the SDK analyzers alone provide. USE FOR: the repo wants StyleCop.Analyzers; naming, layout, or documentation style needs stronger enforcement; the team needs stylecop.json guidance. DO NOT USE FOR: repos that intentionally rely only on SDK analyzers; repos where StyleCop overlaps too heavily with an existing style package and no. INVOKES: inspect the repository context, edit targeted files, and run relevant build, test

Licence
MIT
Last repository change
26.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
5
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 26.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Use the open-source free `StyleCop.Analyzers` package for naming, layout, documentation, and style rules in .NET projects. Use when a repo wants stricter style conventions than the SDK analyzers alone provide. USE FOR: the repo wants StyleCop.Analyzers; naming, layout, or documentation style needs stronger enforcement; the team needs stylecop.json guidance. DO NOT USE FOR: repos that intentionally rely only on SDK analyzers; repos where StyleCop overlaps too heavily with an existing style package and no. INVOKES: inspect the repository context, edit targeted files, and run relevant build, test

Original author description

Use the open-source free `StyleCop.Analyzers` package for naming, layout, documentation, and style rules in .NET projects. Use when a repo wants stricter style conventions than the SDK analyzers alone provide. USE FOR: the repo wants StyleCop.Analyzers; naming, layout, or documentation style needs stronger enforcement; the team needs stylecop.json guidance. DO NOT USE FOR: repos that intentionally rely only on SDK analyzers; repos where StyleCop overlaps too heavily with an existing style package and no. INVOKES: inspect the repository context, edit targeted files, and run relevant build, test

How it works

  1. Trigger On
  2. Value
  3. Do Not Use For
  4. Inputs
  5. Quick Start
  6. Workflow
  7. Bootstrap When Missing
  8. Deliver
  9. Validate
  10. Ralph Loop
Original SKILL.md headings · 103 lines, 541 words
SKILL.md preview
---
name: stylecop-analyzers
description: "Use the open-source free `StyleCop.Analyzers` package for naming, layout, documentation, and style rules in .NET projects. Use when a repo wants stricter style conventions than the SDK analyzers alone provide. USE FOR: the repo wants StyleCop.Analyzers; naming, layout, or documentation style needs stronger enforcement; the team needs stylecop.json guidance. DO NOT USE FOR: repos that intentionally rely only on SDK analyzers; repos where StyleCop overlaps too heavily with an existing style package and no. INVOKES: inspect the repository context, edit targeted files, and run relevant build, test, lint, or validation commands when changes are made."
compatibility: "Requires a .NET SDK-based repository; respects the repo's `AGENTS.md` commands first."
---

# StyleCop Analyzers

## Trigger On

- the repo wants `StyleCop.Analyzers`
- naming, layout, or documentation style needs stronger enforcement
- the team needs `stylecop.json` guidance

## Value

- produce a concrete project delta: code, docs, config, tests, CI, or review artifact
- reduce ambiguity through explicit planning, verification, and final validation skills
- leave reusable project context so future tasks are faster and safer

## Do Not Use For

- repos that intentionally rely only on SDK analyzers
- repos where `StyleCop` overlaps too heavily with an existing style package and no consolidation is planned

## Inputs

- the nearest `AGENTS.md`
- current `.editorconfig`
- any existing `stylecop.json`

## Quick Start

1. Read the nearest `AGENTS.md` and confirm scope and constraints.
2. Run this skill's `Workflow` through the `Ralph Loop` until outcomes are acceptable.
3. Return the `Required Result Format` with concrete artifacts and verification evidence.

## Workflow

1. Add `StyleCop.Analyzers` only if the repo wants its opinionated style rules.
2. Keep severity in the root `.editorconfig`.
3. Use `stylecop.json` only for StyleCop-specific behavioral options.
4. Prefer one checked-in `stylecop.json` per repo unless a project genuinely needs its own behavior.
5. Avoid rule duplication with SDK analyzers or other analyzer packs when possible.

## Bootstrap When Missing

If `StyleCop.Analyzers` is not configured yet:

1. Detect current state:
   - `rg -n "StyleCop\\.Analyzers|stylecop\\.json" -g '*.csproj' -g 'stylecop.json' .`
2. Add package to the intended scope:
   - `dotnet add PROJECT.csproj package StyleCop.Analyzers`
3. Keep severity in root `.editorconfig` and use `stylecop.json` only for StyleCop-specific behavior.
4. Prevent overlap with existing analyzer packs by defining ownership.
5. Run `dotnet build SOLUTION_OR_PROJECT` and return `status: configured` or `status: improved`.
6. If the repo intentionally uses SDK analyzers only, return `status: not_applicable`.


## Deliver

- explicit StyleCop package setup
- repo-owned StyleCop rule configuration
- clear split between root `.editorconfig` and `stylecop.json`

## Validate

- StyleCop severity is versioned in repo config
- `stylecop.json` is used only where it adds value

## Ralph Loop

Use the Ralph Loop for every task, including docs, architecture, testing, and tooling work.

1. Plan first (mandatory):
   - analyze current state
   - define target outcome, constraints, and risks
   - write a detailed execution plan
   - list final validation skills to run at the end, with order and reason
2. Execute one planned step and produce a concrete delta.
3. Review the result and capture findings with actionable next fixes.
4. Apply fixes in small batches and rerun the relevant checks or review steps.
5. Update the plan after each iteration.
6. Repeat until outcomes are acceptable or only explicit exceptions remain.
7. If a dependency is missing, bootstrap it or return `status: not_applicable` with explicit reason and fallback path.

### Required Result Format

- `status`: `complete` | `clean` | `improved` | `configured` | `not_applicable` | `blocked`
- `plan`: concise plan and current iteration step
- `actions_taken`: concrete changes made
- `validation_skills`: final skills run, or skipped with reasons
- `verification`: commands, checks, or review evidence summary
- `remaining`: top unresolved items or `none`

For setup-only requests with no execution, return `status: configured` and exact next commands.

## Load References

- [references/stylecop-analyzers.md](references/stylecop-analyzers.md)
- [references/rules.md](references/rules.md)
- [references/config.md](references/config.md)

## Example Requests

- "Add `StyleCop.Analyzers` to this solution."
- "Configure StyleCop without losing `.editorconfig` ownership."
Files in this package (5)
  • SKILL.md 5 KB
  • manifest.json 1 KB
  • references/config.md 9 KB
  • references/rules.md 9 KB
  • references/stylecop-analyzers.md 3 KB

Versions

The database has no other skills named stylecop-analyzers.

Database snapshot: 13.11.2026 · package version b98540cba152 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100dotnet-quality
    .NET code quality with Roslyn analyzers, StyleCop, and dotnet format. Covers linting, formatting, and best practices for C#/.NET. USE WHEN: user works with "C#", ".NET", "ASP.NET Core", asks about "Roslyn analyzers", "StyleCop", "dotnet format", ".NET linting", "C# best…
  • 100code-analysis
    Use the free built-in .NET SDK analyzers and analysis levels with gradual Roslyn warning promotion. USE FOR: the repo wants first-party .NET analyzers; CI should fail on analyzer warnings; the team needs AnalysisLevel or AnalysisMode guidance. DO NOT USE FOR: third-party…
  • 100style-enforcement
    Validate code against style rules from .editorconfig, StyleCop.json, and Directory.Build.props. Use when you say "check style compliance", "validate editorconfig rules", "run style enforcement", "check naming conventions", or "validate line endings". Detects line ending…
  • 100style-enforcement
    Validate code against style rules from .editorconfig, StyleCop.json, and Directory.Build.props. Use when you say "check style compliance", "validate editorconfig rules", "run style enforcement", "check naming conventions", or "validate line endings". Detects line ending…
  • 100analyzer-config
    Use a repo-root `.editorconfig` to configure free .NET analyzer and style rules. Use when a .NET repo needs rule severity, code-style options, section layout, or analyzer ownership made explicit. USE FOR: the repo needs a root .editorconfig; analyzer severity and style ownership…
  • 100fix-trailing-newlines
    Fix SA1518 StyleCop violations by removing trailing newlines from .cs, .xaml, .axaml, .csproj, .props, .targets, .editorconfig, .slnx, .sln, and .json files. Targets projects where .editorconfig has insert_final_newline = false. Use when SA1518 violations appear, trailing…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.