---
name: anti-ai-slop
description: Use when the user asks the agent to write, draft, or rewrite something that will be posted under their own name — Slack messages, thread replies, PR descriptions, commit messages, emails, social posts. Pulls the user's own past writing as voice samples and self-checks against a concrete AI-slop blacklist before emitting.
---

# anti-ai-slop

You are about to write something that will appear under **the user's name**, not yours. Default Claude prose will betray that. This skill exists so the output reads like the user actually typed it.

## Pre-flight (every invocation)

Canonical setup docs live in the plugin README (`plugins/lean-anti-ai-slop/README.md`); the snippet below exists only because this check runs at invocation time and the user may not have GitHub open.

- **Samples directory** comes from the env var `ANTI_AI_SLOP_SAMPLES_DIR` set in `.claude/settings.json` (or `~/.claude/settings.json`).
- Resolved path: !`echo "${ANTI_AI_SLOP_SAMPLES_DIR:-<not set>}"`
- Listing (top-level): !`if [ -n "${ANTI_AI_SLOP_SAMPLES_DIR}" ] && [ -d "${ANTI_AI_SLOP_SAMPLES_DIR}" ]; then ls -1 "${ANTI_AI_SLOP_SAMPLES_DIR}" 2>/dev/null | head -20; else echo "(samples dir not configured or missing)"; fi`

If `ANTI_AI_SLOP_SAMPLES_DIR` is unset or empty, **before drafting** tell the user how to set it and stop:

```json
// in ~/.claude/settings.json (or .claude/settings.json)
{
  "env": {
    "ANTI_AI_SLOP_SAMPLES_DIR": "/absolute/path/to/writing-samples"
  }
}
```

Then ask the user to drop 3-5 of their own writing samples (any format — chat messages, PR descriptions, emails) into that folder, each in its own file, and re-invoke.

## How to respond

If invoked with no concrete writing task (just `/anti-ai-slop`), explain what the skill does, point at `references/anti-slop.md`, show how to set the samples dir (or point at the plugin README), and stop. Do not draft.

If invoked with a writing task, run the workflow below.

## Workflow

1. **Gate the input.** The user's braindump (the rough thoughts they want shaped into a post) must be at least 15 words and contain at least one concrete fact (number, date, name of tool, outcome). If not, ask for more before drafting. Refuse to fabricate "personal" details from nothing.

2. **Load writing samples.** Read 3-5 files from `${ANTI_AI_SLOP_SAMPLES_DIR}` (most-recently-modified first). Extract:
   - average sentence length and variance,
   - opener patterns (do they start with capitals? mid-thought? a date? a number?),
   - whether they use bullet lists in short pieces,
   - emoji frequency and which ones,
   - register (formal / casual / sweary / dry),
   - sign-off habit (period at end? trailing thought? no closing?),
   - punctuation tells (em-dash usage, smart quotes, parentheticals).
   Hold these as constraints for the draft. Do **not** copy phrasing — copy rhythm and register.

3. **Pull factual context if relevant.** If the user mentions a repo, project path, or recent work AND a git repo is reachable, run:
   - `git log --author="$(git config user.name)" --since="2 weeks ago" --oneline`
   - `git log -1 --stat` for the most relevant commit
   - read 1-2 changed files only if needed to verify a claim
   Use this purely as a source of **facts** (dates, filenames, what changed). Do not paraphrase commit messages into the draft; the draft is the user's voice, not git's.

4. **Build a FACTS block.** Internally (do not show to user yet) list every claim that will appear in the draft, tagged:
   - `[user]` — supplied verbatim in the braindump
   - `[git]` — pulled from repo state
   - `[inferred]` — you guessed
   Every `[inferred]` is a risk.

5. **Ask once, in one batch, about any `[inferred]` claim** that affects the draft (timeline, motivation, outcome). Do not draft until answered. Do not invent first-person experiences ("I was wrestling with X all weekend") that aren't in `[user]` or `[git]`.

6. **Draft once.** One version, not three. Length cap by format:
   - chat/Slack message: 120 words
   - thread reply: 60 words
   - PR description: 250 words
   - email: 300 words
   Match the rhythm and register of the voice samples. Concrete facts only.

7. **Self-critique pass.** Run the draft through every check in `references/anti-slop.md` (banned words, antithesis structure "not X but Y", em-dash count, smart-quote count, opening sniff test, closing sniff test, concreteness check, tricolon check, bullet-vs-prose ratio, capitalization ratio, smooth-transition penalty). For every flag, rewrite that sentence. Repeat until zero flags.

8. **Output.**
   - The draft, in a fenced block.
   - A one-line footer: `Facts I used: [list]` — so the user can sanity-check before posting.
   - If you stripped or rewrote anything important during self-critique, mention it in one line.
   - Do not append "Let me know if you want adjustments" or any other closing — the user can ask.

## Hard rules

- **Never** invent first-person experiences, emotions, or anecdotes not in the braindump or git context.
- **Never** post anywhere automatically. Output the draft; the user copies and sends.
- **Never** exceed the format's length cap. Long drafts drift toward default Claude prose ~200 words in.
- **Never** produce more than one variant unless explicitly asked.
- **Never** quote verbatim from the writing samples. Match rhythm, not text.

## Reach for these

- `references/anti-slop.md` — concrete blacklist + self-check heuristics. Load on demand during step 7.
