Write-time code quality enforcement using Plankton — auto-formatting, linting, and Claude-powered fixes on every file edit via PostToolUse hooks. USE WHEN you want automatic format/lint on each edit, defense against agents weakening linter configs, or tiered model routing for fixes across many languages.
Standardmäßig ist der Prompt ausgewählt, der zuerst die Quelle prüft. Sie können zu einem direkten Befehl wechseln oder eine lokale Kopie herunterladen.
Quelldateien prüfen
Lesen Sie SKILL.md und alle von SkillsMP angezeigten Begleitdateien, bevor Sie sich für eine Installation entscheiden.
Mit Codex oder Claude installieren Kopieren Sie diesen Prompt, fügen Sie ihn in Codex, Claude oder einen anderen Assistant ein und lassen Sie die Skill-Seite prüfen und installieren.
Ein direkter Befehl überspringt den Prüf-Prompt. Prüfen Sie die Quelle, bevor Sie ihn ausführen.
Write-time code quality enforcement using Plankton — auto-formatting, linting, and Claude-powered fixes on every file edit via PostToolUse hooks. USE WHEN you want automatic format/lint on each edit, defense against agents weakening linter configs, or tiered model routing for fixes across many languages.
origin
community
cluster
quality-eval
version
1.0.0
Plankton Code Quality Skill
Integration reference for Plankton (credit: @alxfazio), a write-time code quality enforcement system for Claude Code. Plankton runs formatters and linters on every file edit via PostToolUse hooks, then spawns Claude subprocesses to fix violations the agent didn't catch.
When to Use
You want automatic formatting and linting on every file edit (not just at commit time)
You need defense against agents modifying linter configs to pass instead of fixing code
You want tiered model routing for fixes (Haiku for simple style, Sonnet for logic, Opus for types)
You work with multiple languages (Python, TypeScript, Shell, YAML, JSON, TOML, Markdown, Dockerfile)
How It Works
Three-Phase Architecture
Every time Claude Code edits or writes a file, Plankton's multi_linter.sh PostToolUse hook runs:
Phase 1: Auto-Format (Silent)
├─ Runs formatters (ruff format, biome, shfmt, taplo, markdownlint)
├─ Fixes 40-50% of issues silently
└─ No output to main agent
Phase 2: Collect Violations (JSON)
├─ Runs linters and collects unfixable violations
├─ Returns structured JSON: {line, column, code, message, linter}
└─ Still no output to main agent
Phase 3: Delegate + Verify
├─ Spawns claude -p subprocess with violations JSON
├─ Routes to model tier based on violation complexity:
│ ├─ Haiku: formatting, imports, style (E/W/F codes) — 120s timeout
│ ├─ Sonnet: complexity, refactoring (C901, PLR codes) — 300s timeout
│ └─ Opus: type system, deep reasoning (unresolved-attribute) — 600s timeout
├─ Re-runs Phase 1+2 to verify fixes
└─ Exit 0 if clean, Exit 2 if violations remain (reported to main agent)
What the Main Agent Sees
Scenario
Agent sees
Hook exit
No violations
Nothing
0
All fixed by subprocess
Nothing
0
Violations remain after subprocess
[hook] N violation(s) remain
2
Advisory (duplicates, old tooling)
[hook:advisory] ...
0
The main agent only sees issues the subprocess couldn't fix. Most quality problems are resolved transparently.
Config Protection (Defense Against Rule-Gaming)
LLMs will modify .ruff.toml or biome.json to disable rules rather than fix code. Plankton blocks this with three layers:
PreToolUse hook — protect_linter_configs.sh blocks edits to all linter configs before they happen
Stop hook — stop_config_guardian.sh detects config changes via git diff at session end
Protected files list — .ruff.toml, biome.json, .shellcheckrc, .yamllint, .hadolint.yaml, and more
Package Manager Enforcement
A PreToolUse hook on Bash blocks legacy package managers:
No install command, no plugin config. The hooks in .claude/settings.json are picked up automatically when you run Claude Code in the Plankton directory.
ty (types), vulture (dead code), bandit (security)
TypeScript/JS
biome
oxlint, semgrep, knip (dead exports)
Shell
shellcheck, shfmt
—
YAML
yamllint
—
Markdown
markdownlint-cli2
—
Dockerfile
hadolint (>= 2.12.0)
—
TOML
taplo
—
JSON
jaq
—
Pairing with other quality gates
Complementary, Not Overlapping
Plankton is the write-time gate (every file edit). It pairs cleanly with a
commit-time gate (verification-loop) and a release-time gate
(production-audit). Plankton catches style/lint/type drift the instant it
lands; the later gates catch behavior and shipping risk.