by alexfazio
Write-time code quality enforcement system for Claude Code. Every file edit triggers automated formatting and linting through fast Rust-based linters and dedicated Claude instances that intelligently fix remaining violations
# Add to your Claude Code skills
git clone https://github.com/alexfazio/plankton
Write-time code quality enforcement for AI coding agents, built on Claude Code hooks.
[!CAUTION] Research project under active development. Hooks are tested against Claude Code >= 2.1.50 (see badge). Newer CC versions usually work but are not guaranteed. Disable CC auto-updates to prevent silent breakage (see Quick Start). If you encounter issues, file a report including the output of
claude --version. To pin to a specific Plankton version:git checkout v0.1.0.
git clone https://github.com/alexfazio/plankton.git
cd plankton
pip install uv && uv sync --all-extras
claude # hooks activate automatically
That's it. Plankton works by being the directory you run Claude Code from.
The hooks in .claude/hooks/ are picked up automatically — no install
command, no plugin, no config. Clone, cd, claude.
<!-- -->[!TIP] You can work on any codebase from inside plankton. Just tell Claude: "work on /path/to/my-project" — it will apply the same quality enforcement to that codebase while the hooks stay active.
[!NOTE] Existing codebases: the agent edits a file, Plankton enforces every violation in it, pre-existing included. Messy files get cleaned up on first touch. After that, they're fast. Scope it down with exclusions:
"exclusions": ["tests/", "legacy/", "vendor/", "node_modules/"]
Recommended: disable Claude Code auto-updates. Plankton depends on undocumented CC internals — a silent auto-update can break hooks without warning.
No comments yet. Be the first to share your thoughts!
# Option A: disable auto-updates entirely (most reliable)
echo 'export DISABLE_AUTOUPDATER=1' >> ~/.zshrc && source ~/.zshrc
# Option B: use the stable channel (~1 week behind latest, fewer regressions)
curl -fsSL https://claude.ai/install.sh | bash -s stable
jaq, ruff, and uv are required for all languages. TypeScript also
needs biome. Everything else is optional and gracefully skipped if not
installed. See docs/SETUP.md for per-language setup.
Code quality gate enforcement at write-time, using Claude Code hooks. The agent is blocked from proceeding until its output passes your checks — style, types, security, complexity — all enforced before commits and code review.
For the full motivation and design story, read the original writeup.
# Install pre-commit hooks (optional but recommended)
uv ...