deslop
Remove AI-generated code slop from current branch. Identifies and removes inconsistent comments, over-defensive code patterns, and style mismatches introduced by AI. Use when: cleaning up AI-generated code, before committing AI changes, after code generation session.
📖 中文导读:Remove AI-generated code slop from current branch. Identifies and removes inconsistent comments, over-defensive code patterns, and style mismatches introduced by AI. Use when: cleaning up AI-generated code, before committing AI changes, after code generation session. 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。
name: deslop description: > Remove AI-generated code slop from current branch. Identifies and removes inconsistent comments, over-defensive code patterns, and style mismatches introduced by AI. Use when: cleaning up AI-generated code, before committing AI changes, after code generation session. user-invocable: true allowed-tools: - Read - Edit - Bash - Glob - Grep
Remove AI Code Slop
デフォルトブランチとの差分を確認し、このブランチで導入された AI 特有の冗長な記述を削除してください。
削除対象
- ファイル内の他のコードと整合性のないコメント
- コードベースの慣習にそぐわない防衛的コード(既存コードで同様のパターンがガードなしで動作している場合の過剰な nil チェック、不要な try/catch)
- ファイル全体のスタイルと矛盾する記述
手順
- デフォルトブランチを特定:
git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@'(失敗時は main を使用) git diff <default-branch>...HEADで変更箇所を把握- 各ファイルの既存スタイルを確認し、基準に基づき修正
- 変更内容を1〜3文で要約報告