| name | deslop |
|---|---|
| description | 清理 AI 生成感明显的代码膨胀。用户要求 deslop、去掉 AI 味、清理冗余、提交前简化 diff、删除多余注释/防御式代码/无意义抽象时使用。 |
Use this skill to clean the current diff while preserving behavior.
- Inspect
git status --short,git diff --staged, andgit diff. - Limit edits to changed lines or directly adjacent code needed to simplify those lines.
- Remove only clear slop:
- Comments that restate code or explain obvious behavior.
- TODO/FIXME/HACK comments not explicitly requested by the user.
- Defensive checks, try/catch blocks, or fallbacks inconsistent with trusted local paths.
any, broad casts, or optionality added only to silence TypeScript.- One-off helpers, wrappers, flags, or configuration added for a single use.
- Nested conditionals that can be made direct with early returns.
- Debug logs or temporary output.
- Preserve existing local style even if another style would be preferable.
- Run the smallest relevant verification, usually
npm run type-check, focused tests, or lint.
- Keep behavior unchanged unless fixing a clear bug found during cleanup.
- Do not refactor unrelated code.
- Do not introduce new dependencies.
- Do not delete files.
- Do not edit
.envfiles. - If cleanup would become a rewrite, stop and propose the smaller path first.
Report only:
- What slop was removed.
- Verification run and result.
- Any remaining risk or skipped check.