Write-time code quality enforcement for Claude Code edits
GitHub RepoImpressions693

Write-time code quality enforcement for Claude Code edits

@githubprojectsPost Author

Project Description

View on GitHub

Plankton: Write-Time Quality Enforcement for Claude Code Edits

If you've been using Claude Code or similar AI coding assistants, you've probably noticed a pattern: they can generate decent code, but they also love inserting questionable imports, unused variables, or inconsistent styling. It's like pair programming with a junior dev who's very enthusiastic but needs guardrails.

That's exactly what Plankton aims to fix. It's a lightweight tool that runs quality checks as you work with Claude Code, catching problems before they ever hit your commit history.

What It Does

Plankton sits between Claude Code and your file system, intercepting edits and running a suite of checks at write time. Think of it as a linting layer that activates the moment Claude writes code to disk.

It doesn't replace your existing linter (ESLint, Ruff, etc.) β€” it wraps around Claude Code's output and prevents bad code from even making it into your repo. The checks happen locally, in real time, and can be configured per project.

Current checks include:

  • Unused import detection
  • Inconsistent string quoting
  • Trailing whitespace enforcement
  • Basic style consistency rules
  • Custom regex patterns you define

Why It’s Cool

The clever part is when it runs. Most AI code quality tools run post-hoc (after commits or in CI). Plankton catches issues at the moment of insertion, meaning Claude can self-correct immediately. It's a tight feedback loop that teaches better behavior over time.

The implementation is refreshingly simple. Plankton hooks into file write operations using Node.js fs.watch or inotify, parses the diff, and runs its checks before letting the change persist. No complex AST manipulation, no heavy dependencies β€” just focused guardrails.

Use cases that stand out:

  • Team onboarding: Let new devs use Claude Code freely without worrying about code style drift
  • Monorepos: Enforce per-package rules so Claude doesn't mix conventions
  • Legacy codebases: Prevent Claude from modernizing imports in ways that break older patterns

How to Try It

Clone the repo, install it, and point it at your project:

git clone https://github.com/alexfazio/plankton.git
cd plankton
npm install
npx plankton --target ./your-project

Then open Claude Code and make an edit. Plankton will log any violations it catches. You can configure the rules by adding a plankton.config.json to your project root:

{
  "rules": {
    "no-unused-imports": true,
    "consistent-quotes": true,
    "no-trailing-spaces": true
  },
  "customPatterns": [
    { "pattern": "console\.log\(", "message": "Avoid console.log in production" }
  ]
}

Final Thoughts

Plankton isn't trying to solve every problem with AI code generation. It's a focused, practical tool for a specific pain point: inconsistent quality when using Claude Code for edit tasks. If you've ever spent 10 minutes cleaning up an AI's trailing whitespace or removing dead imports, this will feel like a small but meaningful win.

It's still early (the repo has about 15 stars as of this writing), but the concept is solid. No hype needed β€” just a practical band-aid for a real workflow annoyance.


Found this useful? Follow us @githubprojects for more dev tools you'll actually use.

Back to Projects
Project ID: b589174b-3b80-48b7-af04-f24a693ef405Last updated: May 17, 2026 at 05:12 PM