返回 Skill 列表
extension
分类: 开发与工程无需 API Key

mcaf-formatting

使用`AGENTS.md`中的标准格式/检查命令来格式化代码并保持风格一致。在实现更改后或当格式变化导致差异噪音时使用;确保格式更改是有意的,并通过构建/测试进行验证。

person作者: jakexiaohubgithub

MCAF: Formatting

Outputs

  • Formatted code changes (consistent with repo style)
  • Evidence: formatting command(s) run and any follow-up build/tests

Workflow

  1. Use the canonical format command from AGENTS.md (do not invent commands).
  2. Run the formatter on the smallest scope possible (if your tools allow it).
  3. Review the diff:
    • ensure changes are formatting-only
    • if the formatter touched many files, separate the change or confirm it was explicitly requested
  4. Verify (follow AGENTS.md for sequencing + required commands):
    • for formatting-only changes: run the smallest meaningful verification the repo requires (build/tests/analyze as applicable)
    • for formatting as part of a behaviour change: follow the repo’s normal order (don’t reorder the pipeline)
  5. If format/linters are missing or flaky:
    • fix AGENTS.md to point to a real, repeatable command
    • only then rerun formatting
  6. Report what was run and what changed.

Guardrails

  • Do not introduce unrelated refactors under the cover of formatting.
  • Keep formatting changes and behaviour changes reviewable.