beutl-format
GitHub用于对 Beutl 解决方案运行 dotnet format,支持验证或应用代码格式与风格检查。需确认范围和模式,自动匹配 CI 规则,不手动修改样式,格式化后生成变更摘要但不自动提交。
Trigger Scenarios
Install
npx skills add b-editor/beutl --skill beutl-format -g -y
SKILL.md
Frontmatter
{
"name": "beutl-format",
"description": "Run dotnet format against the Beutl solution. Use when the user asks to format code, check\nstyle, or fix lint errors. Triggers on \"フォーマットして\", \"format\", \"lint\", \"style check\".\nAlways confirm scope and mode (verify vs apply) before running.\n",
"allowed-tools": "Bash(dotnet format:*) Bash(git diff:*) Bash(git status:*)",
"argument-hint": "[verify|apply] [path|project]"
}
Format Beutl
Always confirm scope and mode with the user unless they specified them in this turn or $ARGUMENTS is non-empty. Use AskUserQuestion with these defaults:
- Mode:
verify(default, recommended pre-commit) —--verify-no-changes, fails if formatting would change anything. Matches the CIformat-check.yml.apply— actually rewrites files.
- Scope: whole solution (
Beutl.slnx) / a single project / specific files (--include "<glob>").
Once scope is decided, run the matching command:
# verify mode (default)
dotnet format Beutl.slnx --verify-no-changes --verbosity diagnostic
# apply mode
dotnet format Beutl.slnx --verbosity diagnostic
# scoped to a single project
dotnet format <path/to/Project.csproj> --verbosity diagnostic
# scoped to specific files
dotnet format Beutl.slnx --include "<glob>" --verbosity diagnostic
If $ARGUMENTS starts with verify or apply, treat the first token as the mode and the rest as scope.
Notes
- Style is enforced by
.editorconfigandDirectory.Build.props— do NOT propose style edits by hand. .github/workflows/format-check.ymlrunsdotnet format Beutl.slnx --verify-no-changes; matching it locally avoids round-trips.- XAML formatting is handled separately by
xamlstyler.json(run XAML Styler in your editor, or viadotnet toolif installed).
After running
In apply mode, summarise the changed files with git diff --stat. Do NOT commit automatically — leave staging and commit to the user.
Version History
- db01de7 Current 2026-08-20 13:43


