# Mcaf Formatting

> Format code and keep style consistent using the repository’s canonical formatting/lint commands from `AGENTS.md`. Use after implementing changes or when formatting drift causes noisy diffs; keep formatting changes intentional and verified with build/tests.

- Skill: `majiayu000/mcaf-formatting` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds add majiayu000/mcaf-formatting`
- Raw SKILL.md: https://api.skillmd.com/api/skills/majiayu000/mcaf-formatting/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: majiayu000 (https://skillmd.com/u/majiayu000)
- Updated: 2026-09-09
- Page: https://skillmd.com/skills/majiayu000/mcaf-formatting

---


# 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.

