Skip to content
Skills Library
Programming · Automation

code-formatting

/code-formatting

Hand formatting to an opinionated tool run automatically so the team stops arguing style and diffs stay readable. Use when adopting a formatter, onboarding a repo, or cleaning up noisy review diffs.

Repository
AI-SKILLS ↗
Licence
MIT
Last repository change
05.09.2026

Assessment and security

90/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content25 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 05.09.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Hand formatting to an opinionated tool run automatically so the team stops arguing style and diffs stay readable. Use when adopting a formatter, onboarding a repo, or cleaning up noisy review diffs.

Original author description

Hand formatting to an opinionated tool run automatically so the team stops arguing style and diffs stay readable. Use when adopting a formatter, onboarding a repo, or cleaning up noisy review diffs.

How it works

  1. Method
  2. Litmus tests
  3. Boundaries
Original SKILL.md headings · 50 lines, 410 words
SKILL.md preview
---
name: code-formatting
description: Hand formatting to an opinionated tool run automatically so the team stops arguing style and diffs stay readable. Use when adopting a formatter, onboarding a repo, or cleaning up noisy review diffs.
---

# Code formatting

Formatting debates are the cheapest possible way to spend a team's
attention: everyone has a preference, none of them affect behavior, and the
argument recurs on every pull request. The escape is to hand the whole
question to a tool with almost no options, run it automatically, and never
discuss brace placement again.

## Method

1. **Pick one opinionated formatter and take its defaults.** Prettier for
   JS/TS, Black for Python, gofmt for Go, rustfmt for Rust, spotless or
   ktlint for Kotlin/Java. The point is to remove choices, so do not spend
   the meeting tuning line width past the default (Black 88, Prettier 80).
2. **Format the whole repo in one commit.** Run the formatter across every
   file, commit it alone with a message like "Apply Black", and add that
   SHA to `.git-blame-ignore-revs` so `git blame` skips the reformat and
   still points at the real author of each line.
3. **Enforce in CI, not by asking.** Add `black --check`, `prettier
   --check`, or `gofmt -l` as a pipeline step that fails on any unformatted
   file. A check that lives only in a reviewer's head gets skipped the week
   they are busy.
4. **Format on save and on commit.** Wire the formatter into editor "format
   on save" and a pre-commit hook (pre-commit, or husky with lint-staged)
   so files are correct before they are ever pushed. CI becomes the
   backstop, not the first line of defense.
5. **Keep formatting out of feature diffs.** Never let a reformat ride
   along in a behavior change: the reviewer cannot find the two lines that
   matter under two hundred that only moved. Reformat in its own PR, then
   build on the clean base.
6. **Pin the formatter version.** Lock the exact version in the lockfile or
   tool config so two developers on different releases do not fight over a
   rule that changed between them. Upgrade deliberately, in its own commit.

## Litmus tests

- Does a fresh clone plus one command format identically on every machine?
- Can a reviewer read any diff with no formatting-only lines in the way?
- Does `git blame` on a reformatted line show the author, not the reformat
  commit?

## Boundaries

Formatters own whitespace and layout, not naming, structure, or clarity:
those belong to review and to linting. Where a language has no dominant
formatter, a documented editorconfig plus a lint rule set is the fallback,
and consistency within the repo outranks which style would have won an
argument.

Versions

The database has no other skills named code-formatting.

Database snapshot: 13.11.2026 · package version 7459b4f0833a (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100code-formatter
    Execute automatically formats and validates code files using Prettier and other formatting tools. Use when users mention "format my code", "fix formatting", "apply code style", "check formatting", "make code consistent", or "clean up code formatting". Handles JavaScript,…
  • 100code-review
    Use when reviewing code changes before committing or merging — staged diffs, branch diffs, or PR readiness checks. Triggers: 'review my code', 'check these changes', 'review this branch', 'give feedback on my diff', 'is this PR ready?'. Not for implementing features, running…
  • 100code-layout
    Lay out code for the reader and for one-line diffs. Use when writing, editing, or reviewing code or configuration in any language, including one-line edits, even when the request does not mention layout.
  • 90reviewing-code-diffs
    Use when reviewing code diffs is required during implementation work, especially when the result must be traceable, independently reviewable, and safe to hand to another agent.
  • 100ruff-formatting
    Python code formatting with ruff format. Fast, Black-compatible formatter. Use when formatting Python files, enforcing style, or checking format compliance.
  • 100csharpier
    Use the open-source free `CSharpier` formatter for C# and XML. Use when a .NET repo intentionally wants one opinionated formatter instead of a highly configurable `dotnet format`-driven style model. USE FOR: the repo uses or wants CSharpier; the team prefers an opinionated…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.