Code formatter

From Krusty84/SKILL.md-Inspector · View interactive version

Code formatter is an AI agent skill from the GitHub repository Krusty84/SKILL.md-Inspector. Run the project's configured formatter (prettier, black, gofmt, rustfmt) on changed files and fix formatting-only CI failures. Use when the user asks to format code, fix a lint/format CI step, or normalize whitespace and import order. Do not use for logic changes or refactoring.

How to use this skill

Skill file

Code Formatter

Apply the project's own formatter — never impose a different style.

Workflow

  1. Detect the formatter from config files (.prettierrc, pyproject.toml

[tool.black], .editorconfig, rustfmt.toml) or the CI step that failed.

If none exists, ask before introducing one.

  1. Run it on the changed files only (git diff --name-only), not the whole

repository, unless the user asks for a full pass.

  1. Re-run the exact failing CI command locally to confirm it now passes.
  2. Show the user a summary: which files changed and which tool/version ran.

Rules

output alters behavior (rare, but possible with aggressive import sorting),

stop and report it.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.