plankton-code-quality

Solid

Write-time code quality enforcement using Plankton — auto-formatting, linting, and Claude-powered fixes on every file edit via hooks.

Code & Development 196,640 stars 30253 forks Updated 2 days ago MIT

Install

View on GitHub

Quality Score: 96/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# 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...

Details

Author
affaan-m
Repository
affaan-m/everything-claude-code
Created
4 months ago
Last Updated
2 days ago
Language
JavaScript
License
MIT

Integrates with

Related Skills