strip-ai-slop Strip AI filler words, bold markers, and em-dashes
Flags
--mode select: clean | highlight default: clean
Examples
Strip AI filler openers, bold markers, and em-dashes
Usage
"Certainly! Here's a great summary.
The **key insight** is t..." | strip-ai-slop Clean up a ChatGPT response to sound more natural in an essay
Usage
"Great question! Here's the answer.
The **most important thi..." | strip-ai-slop Remove AI writing tells from a product description
Usage
"Absolutely! Let me explain.
Our **premium widget** offers *..." | strip-ai-slop View source
(input, opts = {})=>{
const mode = opts.mode || "clean";
let out = input;
const openers = /^(Certainly!?\s*|Great question!?\s*|Of course!?\s*|Sure!?\s*|Absolutely!?\s*|I'd be happy to\b[^.]*\.\s*|Let me\b[^.]*\.\s*|Here's\b[^.]*\.\s*)/gm;
if (mode === "highlight") {
out = out.replace(openers, (m)=>`[SLOP: ${m.trim()}] `);
out = out.replace(/\*\*(.+?)\*\*/g, (_, inner)=>`[SLOP: **]${inner}[SLOP: **]`);
out = out.replace(/\u2014/g, "[SLOP: —]");
} else {
out = out.replace(openers, "");
out = out.replace(/\*\*(.+?)\*\*/g, "$1");
out = out.replace(/\u2014/g, "-");
}
out = out.replace(/\n{3,}/g, "\n\n");
return out;
}