SKILL

plankton-code-quality

Enforce code quality at writing time with Plankton: hooks automatically format, lint, and apply Claude-powered fixes on every file edit.

Translation reviewed
Read the original Chinese text

使用Plankton进行编写时代码质量强制执行——通过钩子在每次文件编辑时自动格式化、代码检查和Claude驱动的修复。

Target: Software development & testing. Automatically collected · unverified.

Excerpt from the author’s documentation

Extracted from a fixed version of SKILL.md in its original language. This is the author’s documentation; installation, compatibility and runtime results have not been verified by this site.

Read the original Chinese text

Topics in the source

  • Plankton 代码质量技能
  • 何时使用
  • 工作原理
  • 三阶段架构
  • 主代理看到的内容
  • 配置保护(防御规则博弈)
  • 包管理器强制执行
  • 设置

Plankton(作者:@alxfazio)的集成参考,这是一个用于 Claude Code 的编写时代码质量强制执行系统。Plankton 通过 PostToolUse 钩子在每次文件编辑时运行格式化程序和 linter,然后生成 Claude 子进程来修复代理未捕获的违规。 你希望每次文件编辑时都自动格式化和检查(不仅仅是提交时) 你需要防御代理修改 linter 配置以通过检查,而不是修复代码 你想要针对修复的分层模型路由(简单样式用 Haiku,逻辑用 Sonnet,类型用 Opus) 你使用多种语言(Python、TypeScript、Shell、YAML、JSON、TOML、Markdown、Dockerfile) 每次 Claude Code 编辑或写入文件时,Plankton 的 multilinter.sh PostToolUse 钩子都会运行: | 场景 | 代理看到 | 钩子退出码 | |----------|-----------|-----------| | 无违规 | 无 | 0 | | 全部由子进程修复 | 无 | 0 | | 子进程后仍存在违规 | [hook] N violation(s) remain | 2 | | 建议性警告(重复项、旧工具) | [hook:advisory] ... | 0 | 主代理只看到子进程无法修复的问题。大多数质量问题都是透明解决的。 LLM 会修改 .ruff.toml 或 biome.json 来禁用规则,而不是修复代码。Plankton 通过三层防御阻止这种行为: 1. PreToolUse 钩子 — protectlinterconfigs.sh 在编辑发生前阻止对所有 linter 配置的修改 2. Stop 钩子 — stopconfigguardian.sh 在会话结束时通过 git diff 检测配置更改 3. 受保护文件列表 — .ruff.toml, biome.json, .shellcheckrc, .yamllint, .hadolint.yaml 等 Bash 上的 PreToolUse 钩子会阻止遗留包管理器: pip, pip3, poetry, pipenv → 被阻止(使用 uv) npm, yarn, pnpm → 被阻止(使用 bun) 允许的例外:npm audit, npm view, npm publish 无需安装命令,无需插件配置。当你运行 Claude Code 时,.claude/settings.json 中的钩子会在 Plankton 目录中被自动拾取。 要在你自己的项目中使用 Plankton 钩子: 1. 将 .claude/hooks/ 目录复制到你的项目 2. 复制 .claude/settings.json 钩子配置 3.

This is an excerpt. Refer to the complete source and its current requirements.

Source repository
affaan-m/ECC
Source file
docs/zh-CN/skills/plankton-code-quality/SKILL.md
Fixed revision
d2ef2680594f9a17526a6e1a2e18b3d242c5d17b
Read the complete original documentation ↗

Requirements

  • Only the author’s Skill metadata is included. Read the full instructions to check dependencies, licensing and conditions of use.

A small first task

先阅读原作者说明,再决定是否在自己的 AI 工具中使用。

Instructions for your AI tool

Author documentation is not live verification by this site. Without evidence, we do not mark a resource as compatible, safe or free.

Sources and evidence

This record was collected automatically. Its documentation, suitability and runtime behavior have not been manually verified.

Author: affaan-m/ECC · original repository metadata. Documentation review: Not reviewed. Last source check: 2026-11-09T15:01:42.508Z.

Categories are inferred from names, descriptions and paths. They do not establish compatibility.

License and attribution

MIT. Third-party content and copyright remain with their authors. Refer to the original license and terms.

Original license ↗

Synchronization, copying and user-reported success do not mark a resource as runtime-tested.

Limitations and notes

  • Collecting metadata does not mean this site has installed, adapted, runtime-tested or security-reviewed the resource.