dotnet-format
Run dotnet format after Phase 7.4 (write code). Applies solution-wide formatting (whitespace, style, analyzers) before unit tests and dev gate. Use on every .NET task.
- License 许可
- MIT
- 最近更新
- 2026-10-31
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- dotnet-format
- description
- Run dotnet format after Phase 7.4 (write code). Applies solution-wide formatting (whitespace, style, analyzers) before unit tests and dev gate. Use on every .NET task.
- disable-model-invocation
- true
02 资源文件 1
- 脚本scripts/dotnet-format.ps12.3 KB
03 SKILL.md 正文
dotnet-format
Run immediately after step 7.4 (Write code) and before 7.5 (unit tests).
When to run
| Step | Action |
|---|---|
| 7.4 | Write code per file map |
| → this skill | dotnet format — fix style/whitespace/analyzers |
| 7.5 | Unit tests |
| 7.7 | Re-run if analyzers still warn; optional -Verify before handoff |
Commands
From repo root (PowerShell Core):
$Fmt = '.cursor/skills/dotnet-format/scripts/dotnet-format.ps1'
# Apply formatting (default — after 7.4)
pwsh $Fmt
# Check only — fail if unformatted (before 7.8 / PR)
pwsh $Fmt -Verify
What it does
- Resolves the solution (
.sln/.slnx) or.csprojat repo root. - Runs
dotnet format(apply) ordotnet format --verify-no-changes(verify). - Exits non-zero on failure — loop back to 7.4 and fix.
Manifest override (optional)
Add to pipeline.manifest.json after adapt:
"format": { "command": "dotnet format MyApp.sln" }
If omitted, the script auto-detects *.sln / *.slnx / *.csproj.
Checkpoint
Save formatter output when verbose (optional, token-saving):
dotnet format 2>&1 | pwsh .cursor/skills/checkpoint/scripts/save-artifact.ps1 -Session <session> -ArtifactRel gates/dotnet-format.log -Mode --stdin
Constraints
- Run after every 7.4 that touches
.csfiles. - Do not skip for "small" diffs — keeps TL review focused on logic.
- If format changes files, re-run
build.commandbefore 7.5.
04 同仓库更多 Skills
petstore
Call the Swagger Petstore API. A sample API that uses a petstore as an example to demonstrate api2skill.
petstore
Call the Swagger Petstore API. A sample API that uses a petstore as an example to demonstrate api2skill.
petstore
Call the Swagger Petstore API. A sample API that uses a petstore as an example to demonstrate api2skill.
api2skill-creator
Interview the user about an OpenAPI/Swagger API (including multi-spec, base URL, and authorization), assemble exact api2skill CLI commands, guide secrets.json setup, and migrate existing generated skills after api2skill upgrades (update / regenerate / merge). Prefer Plan mode for multi-spec interviews and migrations.
speckit-taskstoissues
Convert existing tasks into actionable, dependency-ordered GitHub issues for the feature based on available design artifacts.
speckit-tasks
Generate an actionable, dependency-ordered tasks.md for the feature based on available design artifacts.