返回 Skill 列表
extension
分类: 开发与工程无需 API Key

code-cleanup

将重复的任务委托给专门的代理以保持上下文。当用户要求修复语法错误、修正诊断、跨文件重命名变量、更新导入、修复格式问题或对多个文件执行其他机械性的批量更改时使用。

person作者: jakexiaohubgithub

Delegate to Code Janitor

When you encounter repetitive, mechanical code tasks, launch the code-janitor agent instead of doing the work yourself to preserve context.

Delegate When:

  • Fixing multiple linting errors across files
  • Renaming variables/functions consistently across codebase
  • Updating import statements in multiple files
  • Fixing formatting or style violations throughout project
  • Resolving IDE diagnostics in batch
  • Bulk refactoring that doesn't require design decisions

Keep in Main When:

  • Task requires architectural decisions
  • Single file with 1-2 changes
  • User explicitly wants you to do it

How:

Use Task tool with subagent_type: "essentials:code-janitor" providing task description and scope.

The code-janitor agent uses TodoWrite to track work, iterates until complete, and verifies with linters.