with one click
plankton-code-quality
Write-time code quality enforcement using Plankton โ auto-formatting, linting, and Claude-powered fixes on every file edit via hooks.
Menu
Write-time code quality enforcement using Plankton โ auto-formatting, linting, and Claude-powered fixes on every file edit via hooks.
Track and report Claude Code token usage, spending, and budgets from the local ECC cost-tracker metrics log. Use when the user asks about costs, spending, usage, tokens, budgets, or cost breakdowns by model, session, or date.
Instinct-based learning system that observes sessions via hooks, creates atomic instincts with confidence scoring, and evolves them into skills/commands/agents. v2.1 adds project-scoped instincts to prevent cross-project contamination.
Create reproducible, cross-platform (macOS/Linux) development environments with Flox, a declarative Nix-based environment manager. Use when setting up project toolchains for any language, installing system-level dependencies (compilers, databases, native libs like openssl/BLAS), pinning exact package versions for a team, running local services (PostgreSQL, Redis, Kafka), onboarding developers with one command, or solving 'works on my machine' problems โ including agent/vibe-coding setups that need project-scoped tools without sudo. Also use when the user mentions .flox/, manifest.toml, flox activate, or FloxHub.
Commercial-grade Python installer expert for Windows: Nuitka extreme compilation, dist slimming, DLL footprint analysis, and Inno Setup packaging to ship the smallest, fastest installers. Use only for advanced packaging/optimization (minimal size, fast startup), not basic script-to-exe conversion. ไธญๆ่งฆๅ๏ผNuitka ๆ้ไผๅใPython ๅไธๆๅ ใๆ้็ผ่ฏ Pythonใdist ็ฆ่บซใDLL ๅๆใๆๅฐๅฎ่ฃ ๅ ใๆๅฟซๅฏๅจใๅไธ็บงๆๅ ้ฃๆ ผ
Use when a brand needs to discover or articulate its identity through structured multi-session interviews. Covers purpose, positioning, audience, personality, voice, narrative, and founder-brand tension across 8 modules using laddering, 5 Whys, and projective techniques. Produces a resumable session with disk-persisted state and a master brandbook (90_SYNTHESIS.md).
Use when a brand needs to discover or articulate its identity through structured multi-session interviews. Covers purpose, positioning, audience, personality, voice, narrative, and founder-brand tension across 8 modules using laddering, 5 Whys, and projective techniques. Produces a resumable session with disk-persisted state and a master brandbook (90_SYNTHESIS.md).
| name | plankton-code-quality |
| description | Write-time code quality enforcement using Plankton โ auto-formatting, linting, and Claude-powered fixes on every file edit via hooks. |
| metadata | {"origin":"community"} |
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.
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)
| 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.
LLMs will modify .ruff.toml or biome.json to disable rules rather than fix code. Plankton blocks this with three layers:
protect_linter_configs.sh blocks edits to all linter configs before they happenstop_config_guardian.sh detects config changes via git diff at session end.ruff.toml, biome.json, .shellcheckrc, .yamllint, .hadolint.yaml, and moreA PreToolUse hook on Bash blocks legacy package managers:
pip, pip3, poetry, pipenv โ Blocked (use uv)npm, yarn, pnpm โ Blocked (use bun)npm audit, npm view, npm publishNote: Plankton requires manual installation from its repository. Review the code before installing.
# Install core dependencies
brew install jaq ruff uv
# Install Python linters
uv sync --all-extras
# Start Claude Code โ hooks activate automatically
claude
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.
To use Plankton hooks in your own project:
.claude/hooks/ directory to your project.claude/settings.json hook configuration.ruff.toml, biome.json, etc.)| Language | Required | Optional |
|---|---|---|
| Python | ruff, uv | 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 | โ |
| Concern | ECC | Plankton |
|---|---|---|
| Code quality enforcement | PostToolUse hooks (Prettier, tsc) | PostToolUse hooks (20+ linters + subprocess fixes) |
| Security scanning | AgentShield, security-reviewer agent | Bandit (Python), Semgrep (TypeScript) |
| Config protection | โ | PreToolUse blocks + Stop hook detection |
| Package manager | Detection + setup | Enforcement (blocks legacy PMs) |
| CI integration | โ | Pre-commit hooks for git |
| Model routing | Manual (/model opus) | Automatic (violation complexity โ tier) |
If running both ECC and Plankton hooks:
Plankton's .claude/hooks/config.json controls all behavior:
{
"languages": {
"python": true,
"shell": true,
"yaml": true,
"json": true,
"toml": true,
"dockerfile": true,
"markdown": true,
"typescript": {
"enabled": true,
"js_runtime": "auto",
"biome_nursery": "warn",
"semgrep": true
}
},
"phases": {
"auto_format": true,
"subprocess_delegation": true
},
"subprocess": {
"tiers": {
"haiku": { "timeout": 120, "max_turns": 10 },
"sonnet": { "timeout": 300, "max_turns": 10 },
"opus": { "timeout": 600, "max_turns": 15 }
},
"volume_threshold": 5
}
}
Key settings:
volume_threshold โ violations > this count auto-escalate to a higher model tiersubprocess_delegation: false โ skip Phase 3 entirely (just report violations)| Variable | Purpose |
|---|---|
HOOK_SKIP_SUBPROCESS=1 | Skip Phase 3, report violations directly |
HOOK_SUBPROCESS_TIMEOUT=N | Override tier timeout |
HOOK_DEBUG_MODEL=1 | Log model selection decisions |
HOOK_SKIP_PM=1 | Bypass package manager enforcement |
Set strict quality behavior:
export ECC_HOOK_PROFILE=strict
export ECC_QUALITY_GATE_FIX=true
export ECC_QUALITY_GATE_STRICT=true
During quality enforcement, flag changes to config files in same iteration:
biome.json, .eslintrc*, prettier.config*, tsconfig.json, pyproject.tomlIf config is changed to suppress violations, require explicit review before merge.
Use the same commands in CI as local hooks:
Track: