slopbuster 是做什么的?
AI文本人性化工具,适用于散文、代码与学术写作。100+模式、两遍审计、三级评分、语音注入。适用于Claude Code。无需API调用——纯本地模式匹配。旨在研究AI实际写作方式而非简单替换同义词。
工作原理
- 加载 100+ 种 AI 写作模式(来自
~/.slopbuster/patterns/) - 对输入文本执行两遍审计:
- 第一遍:语法/节奏
- 第二遍:重复/模式
- 生成三级评分:
- AI分:文本有多“像AI”
- 流畅度分:自然阅读流畅度
- 隐喻密度分:创意语言使用情况
- 根据分数和用户配置替换匹配的模式
- 应用语音注入:通过自定义词典个性化词汇选择
安装
# 使用 npm
npm install -g slopbuster
# 或使用 curl
curl -fsSL https://raw.githubusercontent.com/gabelul/slopbuster/main/install.sh | bash
用法
# 基本用法的
slopbuster humanize < input.txt > output.txt
# 文件模式
slopbuster humanize --file input.txt --output output.txt
# 管道模式:分析并输出 JSON
cat input.txt | slopbuster audit --json
# Git 钩子集成(处理提交信息)
echo "$COMMIT_MESSAGE" | slopbuster humanize --mode commit
配置
在项目根目录创建 .slop-dictionary.yml:
# 自定义词汇注入
voice:
preferred:
- "kick off" # 替代 "initiate"
- "dig into" # 替代 "delve into"
avoided:
- "leverage"
- "utilize"
- "utilize"
# 评分阈值
scores:
min_fluency: 65
max_ai_score: 30
# 模式覆盖
patterns:
enabled:
- elevated_diction
- hedging_language
disabled:
- passive_voice_constructs
集成
Claude Code 集成
作为 Claude Code 技能,Slopbuster 可在以下场景直接使用:
- 写作助手:改进 Claude 生成的文本
- 代码审查:确保代码注释并文档自然阅读
- 学术写作:调整论文和报告的语气
Git 钩子
# 将此添加到 .git/hooks/prepare-commit-msg
commit_message=$(cat "$1")
humanized=$(echo "$commit_message" | slopbuster humanize --mode commit)
echo "$humanized" > "$1"
模式列表
| 类别 | 模式示例 | 严重程度 |
|---|---|---|
| 措辞 | "elevated" -> "simple" | 高 |
| 填充词 | "actually", "essentially" | 中 |
| 重复 | "delve", "navigate" | 中 |
| 被动语态 | 结构检测 | 低 |
许可证
MIT