Deslop

作者 cursorccb5507cec15無授權條款10K 個星標收錄於 2026年10月8日更新於 2026年10月8日儲存庫今天更新

Remove AI-generated code slop and clean up code style

AI 產生的概覽

檢查分支相對 main 的差異,清除 AI 產生的程式碼冗餘,同時保持行為不變。

功能
此技能會檢查目前分支與 main 之間的差異,並清理 AI 產生的程式碼冗餘。它針對不必要或與本機風格不一致的註解、在可信任程式碼路徑中不正常的防禦性檢查與 try/catch、僅為繞過型別問題而使用的 any 強制轉型,以及應改用提前回傳的深層巢狀程式碼。修改以最小、聚焦為原則,除修正明確缺陷外保持行為不變,最後給出 1-3 句的簡潔總結。
適用情境
適用於在分支上進行 AI 輔助編碼之後,差異中出現冗餘註解、多餘防禦性程式碼或繞過型別的強制轉型時。適合在審查或合併前做最終清理,而非大範圍重構。
執行需求
需要存取程式碼倉庫及其 git 歷史,以便檢查分支相對 main 的差異。此技能不含指令碼,僅為指示。

Remove AI code slop

Check the diff against main and remove AI-generated slop introduced in the branch.

Focus Areas

  • Extra comments that are unnecessary or inconsistent with local style
  • Defensive checks or try/catch blocks that are abnormal for trusted code paths
  • Casts to any used only to bypass type issues
  • Deeply nested code that should be simplified with early returns
  • Other patterns inconsistent with the file and surrounding codebase

Guardrails

  • Keep behavior unchanged unless fixing a clear bug.
  • Prefer minimal, focused edits over broad rewrites.
  • Keep the final summary concise (1-3 sentences).

來源與署名

來源:cursor/plugins位於cursor-team-kit/skills/deslop提交ccb5507

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架