/major-ai-skills:scripted-formatting-delegationfrom major-ai-skills
Run the repository's formatter for mechanical whitespace and style changes and inspect the resulting diff.
Ships in major-ai-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
When asked to fix styling, adjust indentation from 4 spaces to 2 spaces, or format messy JSON/code files, naive agents rewrite the entire file from scratch using LLM code generation turns.
Re-formatting code through an LLM is a major anti-pattern:
The Deterministic Formatting Delegation Protocol offloads 100% of formatting, indentation, and wrapping to local high-speed CLI formatters (ruff format, prettier --write, biome format, gofmt), completing repository-wide formatting in sub-20 milliseconds at $0.00 cost.
┌─────────────────────────────────────────────────────────────┐
│ Formatting Mechanism Comparison │
│ │
│ LLM Token Re-Streaming (600 Lines / 3,800 Tokens): │
│ • Agent regenerates all 600 lines to fix indentation │
│ • 3,800 output tokens billed ($0.057) │
│ • 18.5 seconds streaming latency │
│ • Risk of dropped comments or subtle syntax drift │
│ │
│ Local Formatter Delegation (`ruff format` / `prettier`): │
│ • Agent executes: `ruff format src/` via CLI │
│ ↳ 600 lines formatted in 8 milliseconds on local CPU │
│ ↳ 0 Tokens Billed ($0.00), 2,300x Faster Execution! │
└─────────────────────────────────────────────────────────────┘
Execute these CLI formatters via run_command:
| Language / Filetype | Recommended CLI Formatter | Execution Command | Speed |
|---|---|---|---|
| Python | ruff format | ruff format src/ | ~5 ms (Rust-native) |
| JS / TS / JSON / CSS | biome | npx -y @biomejs/biome format --write src/ | ~15 ms |
| JS / TS / Markdown / YAML | prettier | npx -y prettier --write "src/**/*.{ts,tsx,md,json}" | ~120 ms |
| Go | gofmt | gofmt -w . | ~8 ms |
| Rust | rustfmt | cargo fmt | ~25 ms |
| C / C++ / CUDA | clang-format | clang-format -i src/**/*.{cpp,hpp,cu} | ~18 ms |
┌───────────────────────────────────────────────────────────────────────────┐
│ STEP 1: APPLY ATOMIC LOGIC PATCH │
│ Agent modifies target business logic using `replace_file_content` │
│ │
│ STEP 2: RUN FORMATTER SWEEP LOCALLY │
│ Agent runs `npx prettier --write <file>` or `ruff format <file>` via CLI │
│ ↳ Auto-formats whitespace, line wraps, and trailing commas instantly │
└───────────────────────────────────────────────────────────────────────────┘
Formatting 20 messy source files across a full-stack codebase:
| Metric | LLM Output Re-Generation | Local CLI Formatter Delegation | Improvement |
|---|---|---|---|
| Total LLM Tokens Billed | 42,000 tokens | 0 tokens | 100% Token Savings |
| Execution Duration | 94.0 seconds | 0.04 seconds | 2,350x Faster |
| Formatting Consistency | 82% (Model style drift) | 100% (Strict rule engine) | 100% Deterministic |
MANDATORY: Agents must NEVER generate token streams to reformat code, adjust indentation, or fix trailing commas. Always run a local CLI formatter (
ruff format,prettier --write,gofmt) via terminal execution.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub alivirgo/major-ai-skills --plugin major-ai-skills412 skills in this plugin
/3d-slicerAutomate 3D Slicer research workflows with MRML, VTK/ITK, DICOM data, and Segment Editor. Use for software workflows, not clinical interpretation./abbreviated-git-statusInspect Git branch, staging, and working-tree changes with short or porcelain status output when a compact repository check is needed./ableton-liveAutomate Ableton Live sessions with Python MIDI Remote Scripts, Max for Live, AbletonOSC, and Link synchronization./act-as-a-personal-tutorExplain a subject step by step, assess prior knowledge, and use short exercises to check understanding before advancing.Other plugins' skills for the same job