---
name: text-slop-cleaner
description: This skill should be used when the user asks to "clean up this text", "remove the AI slop", "make this sound human", "humanize this", "rewrite this in plain English", "remove unnecessary comments", "strip the comments", "this reads like AI wrote it", or "/text-slop-cleaner". Rewrites machine sounding prose and removes every comment that is not 100% necessary.
title: text-slop-cleaner
canonical_url: https://skilld.dev/gh/utkudarilmaz/claude-code-setup/text-slop-cleaner
last_updated: 2026-11-23T08:06:03.000Z
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> Supporting files, fetch one when the Skill refers to it: [references/slop-patterns.md](https://skilld.dev/api/skills-raw/utkudarilmaz/claude-code-setup/text-slop-cleaner/references/slop-patterns.md).
>
> If the user asked to install this Skill, run `npx skilld install utkudarilmaz/claude-code-setup/text-slop-cleaner`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/text-slop-cleaner`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/utkudarilmaz/claude-code-setup/text-slop-cleaner) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/text-slop-cleaner`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/text-slop-cleaner --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/text-slop-cleaner --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

# Text Slop Cleaner Skill

## Purpose

Turns machine sounding text into plain English, and removes every comment that is not 100% necessary. Dispatches to the `text-slop-cleaner` agent, which reads the target, rewrites padded prose, cuts unnecessary comments, and leaves protected content alone.

Two standards, applied to two different things. Prose is rewritten rather than deleted when it carries information. A comment stays only when the code cannot tell the reader what it says, and every removal is verified against that code first.

With no argument it works out its own target: the uncommitted changes, or the commits this branch has that the base does not, or the branch's open PR, whichever it finds first.

Applies changes directly. Use `check` mode to see the report without touching anything.

Text only. This skill never changes code behaviour and never edits string literals.

## When to Invoke

Invoke this skill:

- After generating documentation, a README, or a pull request body
- When a file has picked up comments that only restate the code
- Before sharing writing that reads as generated
- When reviewing a change that added more comments than code
- Before opening a PR, or on a branch whose work is already committed and pushed

## Invocation Modes

### Default: `/text-slop-cleaner`

Clean whatever this branch has in flight. The agent resolves the target itself.

```
Task tool with subagent_type="core:text-slop-cleaner"
prompt: "Clean the prose and comments in whatever this branch has in
flight. Resolve the target with this cascade and stop at the first step
that has something in it:
1. Uncommitted changes, found with git status --porcelain. Work only on
   the lines those changes touched.
2. Commits this branch has that the base branch does not, pushed or not.
   Work on every file those commits touched.
3. An open PR for the branch, found with gh pr view. Clean the body and
   your own comments, and never another person's.
4. Nothing in any of those. Say so in one line and stop.
Resolve the base branch with gh repo view, or git symbolic-ref
refs/remotes/origin/HEAD when gh is missing.
State which step fired in the first line of the report, and say why the
earlier steps were empty.
Rewrite padded prose into plain English, never deleting a sentence
that carries information.
Remove every comment that is not 100% necessary. Read the code a
comment describes before cutting it, and keep it only when the code
cannot tell the reader what it says.
Never touch lint directives, build tags, generated file markers,
licence headers, or doc comments a toolchain requires.
Never change code behaviour and never edit string literals.
Apply the changes directly. Report what changed, what was protected,
and the word count before and after.
Consult ${CLAUDE_SKILL_DIR}/references/slop-patterns.md for the full pattern list."
```

**What the cascade picks:**

| Order | When | Target |
|-------|------|--------|
| 1 | The working tree is dirty | The uncommitted changes |
| 2 | The tree is clean but the branch is ahead of the base | The files those commits touched |
| 3 | Nothing local, but the branch has an open PR | The PR body and your own comments |
| 4 | Nothing anywhere | One line saying so, no changes |

Steps 1 and 2 need only `git`. Step 3 needs `gh`. The cascade never reaches every markdown file in the repository; ask for `all` when you want that.

### Scoped: `/text-slop-cleaner <path>`

Clean a specific file or directory.

```
Task tool with subagent_type="core:text-slop-cleaner"
prompt: "Clean the prose and comments in: [path]
Read each file fully before cutting anything from it.
Rewrite padded prose into plain English, never deleting a sentence
that carries information.
Remove every comment that is not 100% necessary. Read the code a
comment describes before cutting it, and keep it only when the code
cannot tell the reader what it says.
Never touch lint directives, build tags, generated file markers,
licence headers, or doc comments a toolchain requires.
Never change code behaviour and never edit string literals.
Apply the changes directly. Report what changed, what was protected,
and the word count before and after.
Consult ${CLAUDE_SKILL_DIR}/references/slop-patterns.md for the full pattern list."
```

**Scope examples:**
- `/text-slop-cleaner README.md` - one file
- `/text-slop-cleaner docs/` - every file in a directory
- `/text-slop-cleaner src/auth/handler.go` - comments in one source file

### Pull request: `/text-slop-cleaner <number|url>`

Clean a pull request body and your own comments on it.

```
Task tool with subagent_type="core:text-slop-cleaner"
prompt: "Clean the text on pull request: [number or url]
Read the body and every comment with gh pr view and gh api.
Separate your own comments from other people's before changing anything.
Rewrite the body and your own comments into plain English, and apply
them with gh pr edit and gh api.
Never edit another person's comment. GitHub does not allow it. List
what reads as slop in theirs and leave it alone.
Report what changed and what was reported only."
```

### All: `/text-slop-cleaner all`

Clean every markdown file in the repository.

```
Task tool with subagent_type="core:text-slop-cleaner"
prompt: "Clean the prose in every markdown file in the repository.
Skip vendored, generated, and dependency directories.
Work file by file. Read each one fully before cutting anything.
Rewrite padded prose into plain English. Keep every code block,
command, path, and number exactly as written.
Never add headings, sections, or summaries that were not there.
Apply the changes directly. Report per file, then a total word count
before and after.
Consult ${CLAUDE_SKILL_DIR}/references/slop-patterns.md for the full pattern list."
```

### Check: `/text-slop-cleaner check`

Report what would change, without changing anything. Resolves its target with the same cascade as the default.

```
Task tool with subagent_type="core:text-slop-cleaner"
prompt: "Report the slop in whatever this branch has in flight. Resolve
the target with the default cascade: uncommitted changes, then the
commits this branch has that the base does not, then the branch's open
PR, then nothing. State which step fired. Change nothing.
Do not edit any file and do not call gh.
Apply the 100% necessary rule to comments and show the verification
against the code for each one you would cut.
For each finding show the current text and the proposed replacement.
List protected content you would leave alone and why.
Consult ${CLAUDE_SKILL_DIR}/references/slop-patterns.md for the full pattern list."
```

## What Is Protected

The agent never touches these, even though they can read as noise:

| Kind | Examples |
|------|----------|
| Lint and type directives | `//nolint`, `# noqa`, `# type: ignore`, `// eslint-disable` |
| Build and tooling markers | build tags, `//go:generate`, encoding lines, shebangs |
| Generated file markers | `Code generated by ... DO NOT EDIT` |
| Legal | licence headers, copyright notices, SPDX identifiers |
| Required doc comments | godoc on exported symbols, JSDoc on published APIs |
| Pragma comments that are code | `# frozen_string_literal: true`, webpack magic comments, `/** @type {...} */` |
| Sole statement docstrings | removing one breaks the syntax of the block |
| Other people's comments | reported, never edited |

## Rules

- Meaning never changes. A padded sentence that carries information gets rewritten, not deleted
- A comment that is not 100% necessary is removed, after reading the code it describes
- Code blocks, commands, paths, and numbers are copied through exactly
- Only prose and comments change. Never code, never string literals
- Nothing new is added. No new headings, no new summaries
- When a run touches a source file, the working tree is reviewed with `git diff` and the project's tests are run, since a comment edit can break syntax
- Default, scoped, pull request, and all modes apply without asking. Use `check` to review first

## Agent Dispatch Summary

| Invocation | Agent | Output |
|------------|-------|--------|
| `/text-slop-cleaner` | `text-slop-cleaner` | Uncommitted changes, branch commits, or the open PR, whichever comes first |
| `/text-slop-cleaner <path>` | `text-slop-cleaner` | Named file or directory cleaned in place |
| `/text-slop-cleaner <number\|url>` | `text-slop-cleaner` | PR body and own comments rewritten |
| `/text-slop-cleaner all` | `text-slop-cleaner` | Every markdown file cleaned |
| `/text-slop-cleaner check` | `text-slop-cleaner` | Same target as the default, report only |

## Usage Examples

```
/text-slop-cleaner              # Clean whatever is in flight: changes, commits, or the PR
/text-slop-cleaner README.md    # Clean one file
/text-slop-cleaner docs/        # Clean a directory
/text-slop-cleaner 142          # Clean the body and your comments on PR 142
/text-slop-cleaner all          # Clean every markdown file
/text-slop-cleaner check        # Same target, show what would change, change nothing
```

## Additional Resources

### Reference Files

- **`references/slop-patterns.md`** - the full pattern list for prose and comments, with before and after examples
