style-review
Skill25 starsChanged 19 days agoApache-2.0View on GitHub
Review changed or staged C# code against the docs-builder coding standards and flag violations. Use when the user asks to review code style, check for standards violations, or audit a diff before committing.
We split this skill into the rules it gives an agent
6 rules. 0 are common, 1 is distinctive, and 5 are very specific to this project.
0
Common
Most of the 5 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 27
Run dotnet format (or /lint) to fix those.
- Very specific: line 43
Never .Result or .Wait() on an async call
- Very specific: line 45
All async methods should accept CancellationToken ct = default
- Very specific: line 62
Test method naming: MethodName_Scenario_Expected
- Very specific: line 63
No assertions without fluent style (Should().Be(...) not Assert.Equal(...))
- Distinctive: line 83
If no violations: "No behavioral style violations found."
“Common” is measured: kept by at least 6 in 10 of the 5 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.
Files
Style Review Skill
Reviews C# changes for violations that dotnet format and .editorconfig cannot catch — behavioral patterns, naming conventions, and architectural rules.
What this skill does NOT check
.editorconfig + dotnet format already enforce (mechanically):
vareverywhere, no explicit types- No
this.qualifier - Language keywords (
stringnotString) - Expression bodies
- Allman braces, newlines before
{ - Null propagation (
?.,??) - Pattern matching over
is/ascasts - Inlined variable declarations (
out var x) - Throw expressions, conditional delegate calls
- Modifier order
- File-scoped namespaces
- Object/collection initializers
[]instead ofnew List<T>()/Array.Empty<T>()
Run dotnet format (or /lint) to fix those. Only continue with this skill for the behavioral checks below.
Steps
1. Get the diff
git diff # unstaged changes
git diff --staged # staged changes
git diff main...HEAD # full branch2. Check behavioral rules
Async correctness (error-level):
- Public async methods must end in
Async; private async methods must NOT - Never
.Resultor.Wait()on an async call - Library code must use
.ConfigureAwait(false)on awaits - All async methods should accept
CancellationToken ct = default
Method design (error-level):
- Max 4 parameters — flag anything over that without a record/options object
- Boolean parameters must use named argument syntax at every call site
- Cyclomatic complexity > 7 branches in one method — flag and suggest extraction
Structural (error-level):
- No
#regiondirectives - Class member order violated: fields → constructors → properties → methods (grouped by function, not visibility)
Return values (error-level):
- Methods returning collections must never return
null— must return[] - Lookups should use the TryGet pattern, not null returns
Testing (style-level, in tests/ and tests-integration/):
- New test projects should use TUnit + AwesomeAssertions, not xUnit directly
- Test method naming:
MethodName_Scenario_Expected - No assertions without fluent style (
Should().Be(...)notAssert.Equal(...))
Comments (style-level):
- Comments that describe what the code does (not why) — flag for removal
- Multi-paragraph docstrings on non-public members
#region(already error-level above)
3. Report
Format violations as a numbered list with severity:
ERROR:
1. src/Elastic.Markdown/Foo.cs:42 — public async method `GetData` missing `Async` suffix
2. src/Elastic.Markdown/Foo.cs:67 — `.Result` blocks on async call; use `await`
STYLE:
3. tests/Elastic.Markdown.Tests/Bar.cs:15 — test name `TestGetUser` should follow `GetUser_ValidId_ReturnsUser` patternIf no violations: "No behavioral style violations found."
4. Do NOT auto-fix
Report only. For formatting issues, run /lint. For logic violations (blocking async, null collections), the developer must fix manually.
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- MetaMask/metamask-docs★ 869same name
- yzhao062/agent-style★ 732same name
- tranhieutt/software_development_department★ 71same name
- meowdiocre/meowpi★ 3same name
- hsigstad/research-kit★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository12 other files it gives its agents.
- AGENTS.mdAGENTS.md
- src/Elastic.ApiExplorer/AGENTS.mdAGENTS.md
- src/Elastic.Documentation.Site/AGENTS.mdAGENTS.md
- src/Elastic.Markdown/AGENTS.mdAGENTS.md
- src/services/search/Elastic.Documentation.Search.Contract/AGENTS.mdAGENTS.md
- commitSkill
- feature-flagSkill
- issueSkill
- lintSkill
- mcp-searchSkill
- prSkill
- testSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
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.

