dotnet-format
Run dotnet format (whitespace + style + analyzers) and region layout checks on C# files changed on the current branch and optionally auto-fix violations.
Skill by EJRyan89
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/ejryan89-dotnet-format
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Python package
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/dotnet-format
What's inside
- Skill name
dotnet-format- Description
- Run dotnet format (whitespace + style + analyzers) and region layout checks on C# files changed on the current branch and optionally auto-fix violations. Use it when asked to format or style-check C# changes before a commit or pull request.
- License
- MIT
- Instructions
- 38 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
Agent Skills spec issues
- allowed-tools: must be a space-separated string
Files (7)
- SKILL.md
- csharp_layout.py · scripts/
- dotnet_format_targets.py · scripts/
- run_dotnet_format.py · scripts/
- test_csharp_layout.py · scripts/
- test_dotnet_format_targets.py · scripts/
- test_run_dotnet_format.py · scripts/
SKILL.md (first lines)
Check the C# files changed on the current branch with the .NET SDK's `dotnet format`, or the `dotnet-format` global tool for a `.sln` holding a project that is not SDK-style (whitespace, code-style, and analyzer rules the repository configures), and with this skill's region layout checker, then offer to fix what they find. Every step is one script command, run exactly as shown. Each prints one tab-separated fact per line. Do not read the changed files, count braces, or edit source files yourself: the tools find and fix every violation. Act on the printed lines, not the exit code: a command that reports findings also exits 1. Report each `REFUSED <path> <reason>` line: the script left that path outside the repository, or behind a link, unread or unwritten. A last line `FAILED <reason>` means stop: `Read` the end of the `LOG` file, when one was printed, and report the reason, the cause the log shows, and its path.
## Steps
1. **Resolve the targets** from the directory the user invoked the skill in:
```bash
{{PYTHON}} -B "${CLAUDE_SKILL_DIR}/scripts/dotnet_format_targets.py" resolve
```
`STOP <reason>` means there is nothing to format: report the reason and stop. Report a `FETCH_FAILED <reason>` line (the base is origin as last fetched, so it may be stale) and go on. Report each `SKIPPED_ASPNET <file> <project>` line (the solution is formatted with the global tool, which the skill does not run on ASP.NET projects) and each `OUTSIDE_SOLUTION <file>` line (no project of the chosen solution owns it); the formatter skips both, and only the layout checker sees them. Keep the path from the `REPO_ROOT <path>` line, the solution from the `SOLUTION <solution> <score>` line (the score counts the changed files its projects own and is not passed on), and the path from the `FILE_LIST <path>` line as `<REPO_ROOT>`, `<SOLUTION>`, and `<FILE_LIST>` in the next steps.
2. **Check the layout analyzer configuration:**
```bash
{{PYTHON}} -B "${CLAUDE_SKILL_DIR}/scripts/csharp_layout.py" config --repo-root "<REPO_ROOT>" --solution "<SOLUTION>" --file-list "<FILE_LIST>"
```
The command evaluates each project that owns a changed file with MSBuild (`dotnet msbuild -getItem`), which follows the project's imports and may resolve its SDK, as step 3's formatter does when it loads the solution, so it runs nothing a `dotnet format` of the same solution would not. Each setting is judged as the changed files see it, so path-specific sections and `.globalconfig` values count. If any `SETTING` line says `missing`, list those settings and call `AskUserQuestion` with **Add settings** / **Skip**. On **Add settings**, rerun the command with `--apply` and report its `ADDED` lines; it adds the missing settings as the first section of the outermost `.editorconfig`, so every existing section still overrides them. A `SETTING` state of `other:<value>` is the repository's own choice: report it, never change it. If `PACKAGE Roslynator.Formatting.Analyzers missing`, tell the user the `RCS*` layout rules run only once the solution references that NuGet package (for example a `PackageReference` with `PrivateAssets="all"` in `Directory.Build.props`, followed by a restore or build, since the formatter runs with `--no-restore`). If `PACKAGE Roslynator.Formatting.Analyzers unknown <reason>`, report the reason: whether the `RCS*` rules run could not be told. Never add the package yourself.
3. **Check.** Run both commands from step 1's values, giving the formatter run a 600000 ms timeout:
```bash
{{PYTHON}} -B "${CLAUDE_SKILL_DIR}/scripts/run_dotnet_format.py" check --repo-root "<REPO_ROOT>" --solution "<SOLUTION>" --include-file "<FILE_LIST>"
{{PYTHON}} -B "${CLAUDE_SKILL_DIR}/scripts/csharp_layout.py" check --repo-root "<REPO_ROOT>" --file-list "<FILE_LIST>"
```
Each prints `DIAGNOSTIC` or `VIOLATION` lines and a `SUMMARY <count> <files> <rules>` line; the formatter also prints `LOG <path>` with its full output when it ran. Report each `UNREADABLE <file> <reason>` line: the layout checker left that file unchecked and unfixed.
4. **If both summaries count 0**, report "no formatting issues found on changed files" and stop. Otherwise report the counts, files, and distinct rules, and call `AskUserQuestion` with **Fix** / **Skip**. `region-scope` violations are report-only: tell the user which `#endregion` to move into the scope where its `#region` opened.
5. **If Fix**, run the step 3 formatter command with `fix` in place of `check` (same timeout) and the layout command with `--fix` added, then rerun both step 3 commands once to re-verify. If the formatter's fix ends `FAILED`, report its `SAVED <file>` lines (fixes already in the working tree) and its `UNFINISHED <file>` lines (fixes not saved) with the reason, and stop. Report what remains, with the `LOG` path if the formatter still reports diagnostics; do not loop.
## Important
- Do **not** stage or commit fixed files; leave them in the working tree for the developer to review.From EJRyan89/coding-agent-skills, MIT.
More from EJRyan89/coding-agent-skills
- 0.599score
audit-ai-config
EJRyan89
Read-only assessment of a repository's AI agent configuration for Claude Code, Codex, and Copilot that reports findings and never writes files.
SkillAFreshness: A★ 2Claude Code +9 - 0.599score
dotnet-dependencies
EJRyan89
Answer why a package or assembly is in a legacy or SDK-style C# solution, which projects reference an assembly, and where versions and binding redirects…
SkillAFreshness: A★ 2Claude Code +9 - 0.599score
curate-agent-memory
EJRyan89
Audit and clean up Claude Code auto-memory for a project: find stale, duplicated, or misplaced memories, move durable rules to their proper home, and apply…
SkillAFreshness: A★ 2Claude Code +9 - 0.599score
audit-skill
EJRyan89
Audit an agent skill's contract, grants, and cost: whether its Markdown names the lines and exit codes its scripts print, its allowed-tools grants and…
SkillAFreshness: A★ 2Claude Code +9 - 0.592score
ejryan89-code-review-core
EJRyan89
Internal support for the code-review operations bundle.
SkillAFreshness: A★ 2Claude Code +9 - 0.589score
evaluate-skill
EJRyan89
Run a skill's fixed scenarios on each model from throwaway homes, once or several times, and judge each record by script: a review's, or whether a request…
SkillAFreshness: A★ 2Claude Code +9 - 0.589score
implement-change
EJRyan89
Procedure for making a change in a repository that publishes an implementation profile (docs/implementing-changes.md), from the worktree and the plan to the…
SkillAFreshness: A★ 2Claude Code +9 - 0.589score
change-skill
EJRyan89
Procedure for adding or changing a skill in this repository, shipped under skills/ or repository-only under .claude/skills: its SKILL.md, scripts, metadata…
SkillAFreshness: A★ 2Claude Code +9 - 0.586score
shepherd-pull-requests
EJRyan89
Run one merge-shepherd tick from the hub over this repository's open pull requests: fast-forward main, arm auto-merge, merge main into behind branches, judge…
SkillAFreshness: A★ 2Claude Code +9 - 0.586score
review-repository
EJRyan89
This repository's own pull request reviewer: a specialists manifest that routes the deployer, the skills, the validation policies, the trust-boundary files…
SkillAFreshness: A★ 2Claude Code +9 - 0.586score
runtime-canary
EJRyan89
Check that Claude Code, Codex, and Copilot CLI find and run deployed skills, by deploying this checkout into a throwaway home and starting each runtime there.
SkillAFreshness: A★ 2Claude Code +9 - 0.586score
audit-repository
EJRyan89
Run this repository's audits per release: the release audit of the diff since the last tag, before tagging, and after it the rotation audit of one area read…
SkillAFreshness: A★ 2Claude Code +9
Signals
- Stars
- 2
- Forks
- 4
- Open issues
- 93
- Last commit (this folder)
- Oct 24, 2026 (5 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/EJRyan89/coding-agent-skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from EJRyan89
- 0.599score
audit-ai-config
EJRyan89
Read-only assessment of a repository's AI agent configuration for Claude Code, Codex, and Copilot that reports findings and never writes files.
SkillAFreshness: A★ 2Claude Code +9 - 0.599score
dotnet-dependencies
EJRyan89
Answer why a package or assembly is in a legacy or SDK-style C# solution, which projects reference an assembly, and where versions and binding redirects…
SkillAFreshness: A★ 2Claude Code +9 - 0.599score
curate-agent-memory
EJRyan89
Audit and clean up Claude Code auto-memory for a project: find stale, duplicated, or misplaced memories, move durable rules to their proper home, and apply…
SkillAFreshness: A★ 2Claude Code +9 - 0.599score
audit-skill
EJRyan89
Audit an agent skill's contract, grants, and cost: whether its Markdown names the lines and exit codes its scripts print, its allowed-tools grants and…
SkillAFreshness: A★ 2Claude Code +9 - 0.592score
ejryan89-code-review-core
EJRyan89
Internal support for the code-review operations bundle.
SkillAFreshness: A★ 2Claude Code +9 - 0.589score
evaluate-skill
EJRyan89
Run a skill's fixed scenarios on each model from throwaway homes, once or several times, and judge each record by script: a review's, or whether a request…
SkillAFreshness: A★ 2Claude Code +9
Cite this page
dotnet-format skill. Agent Mart. https://agentmart.dev/skills/ejryan89-dotnet-format (last updated 2026-10-24)