scripted-formatting-delegation

Installation
SKILL.md

Deterministic Formatting Delegation Protocol (Prettier & Ruff CLI)

Overview

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:

  1. Severe Token Waste: Reformatting a 600-line file consumes 3,500+ expensive output tokens for zero semantic or algorithmic changes.
  2. Streaming Latency: Takes 15 to 25 seconds of streaming wait time.
  3. Hallucination Risk: Models frequently introduce subtle syntax errors (e.g., dropped commas, altered regex escapes) while attempting to re-indent code.

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.


LLM Code Re-Streaming vs. Local Formatter Execution

Installs
1
GitHub Stars
2
First Seen
Oct 24, 2026