Community编程与开发github.com

Deslop

在自动审查之前,清理当前分支差异中的AI生成代码冗余:去除不必要的注释、防御性检查、类型擦除和风格漂移。

Deslop 是什么?

Deslop 是一个专注于代码差异范围的清理工具,旨在去除 AI 辅助开发中常见的“slop”(冗余代码),如不必要的注释、防御性检查、类型擦除、一次性变量和风格漂移。它通过比较当前分支与 `origin/main` 的 `git diff`,仅检查变更的 hunk,确保不会对整个代码库进行大规模清理。其核心原则是保持行为绝对不变:如果清理可能改变行为,则仅报告而不修改。Deslop 适用于任何使用 Git 的开发环境(如 Claude Code、Cursor 等),通过非破坏性的预处理,帮助审查者专注于更重要的正确性和安全性问题。运行 `$deslop` 后仍需运行 `$autoreview`,后者才是正确性和安全性审查的必需环节。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/clawdbot/clawdbot/tree/main/.agents/skills/deslop

Installed? Explore more 编程与开发 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

Deslop 是做什么的?

在审查之前,仅清理当前分支的差异。绝对保持行为不变。

检查清单

  1. 将扫描范围限定为针对 origin/main 的 git diff,或者当合并基准不同时使用分支合并基准。切勿进行全仓库清理。
  2. 检查每个变更的 hunk,关注以下内容:
    • 人类维护者不会写的注释,包括叙述、语法解释以及仅复述代码的散文;
    • 对于周围模块而言不正常的防御性检查或 try/catch 块,它们仅保护想象中的状态;
    • 用于擦除类型的类型转换,特别是 as any、as unknown as T 以及先展宽再断言的流程(受控代码中 Oxlint 已拒绝后两种模式);
    • 冗余的中间变量或一次性使用的辅助函数,它们未增加领域语义、未减少重复或未简化控制流;
    • 缺少已命名的交付合约和移除计划的兼容性垫片、别名、重试和回退分支;
    • 与周围文件冲突的命名、控制流、导入、格式化及其他风格问题。
  3. 不进行任何功能性编辑。如果清理可能改变行为,则跳过它并改为报告该问题。
  4. 仅当清理是琐碎的且行为中性时,才内联修复发现的问题。否则,将该问题记录给作者。
  5. 用 1-3 句话报告结果,包括是否有任何更改以及任何需要审阅的非琐碎项目。

在 $autoreview 之前 运行 $deslop,切勿替代它。Autoreview 仍然是正确性和安全性审查的必需关口。

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

1password

Set up and use 1Password CLI for sign-in, desktop integration, and reading or injecting secrets.

acp-router

Route plain-language requests for Claude Code, Cursor, Copilot, OpenClaw ACP, OpenCode, Gemini CLI, Grok Build, Qwen, Kiro, Kimi, iFlow, Factory Droid, Kilocode, or explicit ACP harness work into either OpenClaw ACP runtime sessions or direct acpx-driven sessions ("telephone game" flow). For coding-agent thread requests, read this skill first, then use only `sessions_spawn` for thread creation. Codex chat binding defaults to the native Codex app-server plugin unless ACP is explicit or background spawn needs ACP.

add-model-provider

Add and live-prove a model provider with non-interactive config one-liners, without exposing credentials.

agent-transcript

Requested GitHub PR/issue agent transcripts: redact, trim, preview, and insert safely.

apple-notes

Create, view, edit, delete, search, move, or export Apple Notes via the memo CLI on macOS.

apple-reminders

List, add, edit, complete, or delete Apple Reminders and reminder lists via remindctl.

auto-qa

Run OpenClaw-wide autonomous QA and live/stress campaigns across independent subsystem lanes, with verified fixes and a resumable evidence report.

autoreview

Structured code review through the shared OpenClaw agent-skills installation.

bear-notes

Create, search, and manage Bear notes via grizzly CLI.

blacksmith-testbox

Run Blacksmith Testbox for CI-parity checks, secrets, hosted services, migrations, or builds local cannot reproduce.

block-kit

Use proactively for structured or interactive Slack replies, and when asked to author or validate native Slack Block Kit JSON.

blogwatcher

Monitor blogs and RSS/Atom feeds for updates using the blogwatcher CLI.

blucli

BluOS CLI (blu) for discovery, playback, grouping, and volume.

bluebubbles

Send and manage iMessages via BlueBubbles, including attachments, tapbacks, edits, replies, and groups.

browser-automation

Use when controlling web pages with the OpenClaw browser tool, especially multi-step flows, login checks, tab management, or recovery from stale refs/timeouts.

camsnap

Capture frames or clips from RTSP/ONVIF cameras and local webcams, including USB pan/tilt/zoom control.

canvas

Present HTML on connected OpenClaw node canvases, navigate/eval/snapshot, and debug canvas host URLs.

channel-message-flows

Use when running QA Lab channel message flow evidence.

clawdtributor

Clawtributor PRs here, last week or another window: discover conversation refs, recheck GitHub, rank by impact.

clawhub

Search ClawHub for plugins by default, or skills and agent Templates when requested; add Templates; install, verify, update, uninstall, publish, or sync skills.

相关技能