Format code

From CERTCC/Vultron · View interactive version

Format code is an AI agent skill from the GitHub repository CERTCC/Vultron. Format Python sources in the repository with ruff and apply its safe lint fixes (pre-commit enforced).

How to use this skill

Skill file

Skill: Format code with ruff

Purpose

Format Python source files with ruff format and apply ruff's safe lint fixes

(import sorting among them). This keeps a consistent code style and avoids

pre-commit failures.

Inputs

be executed.

Outputs

reformatted.

Procedure

  1. From the repository root, run:

```bash

uv run ruff check --fix

uv run ruff format

```

  1. Inspect the output and stage changes if any files were rewritten.

Constraints / Rules

(IMPLTS-07-021); ruff format excludes Markdown there, so fenced Python in

docs, notes and plan/history/ is never rewritten.

ruff check and mypy after formatting; use it before committing. A stranded

# pyright: ignore[...] is reported by CI's pyright job, which is the only

place pyright runs (PAD-18-027).

Rationale

One formatter, whose import sorting and lint fixes share one configuration,

keeps the pre-commit hook, the CI lint-ruff job and local runs in agreement

(ADR-0094).

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.