Claude Code Prettier Formatter Skill for Scoped File Changes
Check formatting with the repository's configured rules, apply it only to selected files and inspect the resulting diff.
中文Install in Claude Code
Use the project-pinned Prettier version and existing ignore rules. Record any existing edits before applying formatting.
- Get the complete `plugins/examples/formatter/skills/code-formatter` directory from the pinned GitHub checkout.
- Copy it under the target project's `.claude/skills/`. Confirm `.claude/skills/code-formatter/SKILL.md`, open Claude Code at the project root, and call `/code-formatter`.
Example task
Format only `docs/setup.md` and `src/parse.ts`. Show the format checks before and after, then inspect changed files.What to check
The selected files pass the final check. The formatting changes stay within the selected paths.
Original SKILL.md on GitHub · Updated
Frequently asked question
What if other files also fail the style check?
Record those separately and keep the write step scoped to the files requested for this task.