text-human — remove AI artifacts

Caution

AI pair-programming sessions leave fingerprints. Fake issue references (BUG-001, ISSUE-42), unicode long dashes, curly quotes, and comment blocks like // Added by AI or // Claude suggestion accumulate silently across commits. They break diffs, confuse reviewers, and signal “generated code” to anyone reading later.

Tip

One command, any scope. Pass a commit hash to process every changed file from that session, or pass a path for targeted cleanup. Everything after the first token becomes a custom instruction — no quotes needed. Parallel sub-agents handle large folders without blocking.

Quick reference

FieldValue
Command/brewtools:text-human
Arguments<commit-hash|path> [custom instructions]
Modelsonnet
Contextsession
ToolsRead, Write, Edit, Grep, Glob, Bash, Task, AskUserQuestion

When to use

  • After an AI-assisted commit — pass the hash, clean all touched files in one run
  • Before code review — strip obvious AI markers so reviewers focus on logic, not noise
  • Single file cleanup — path to one file runs directly, no delegation overhead
  • Folder-wide unicode pass — fix arrows and curly quotes across an entire package
  • Custom-rule pass — append instructions to override or extend defaults ("only fix unicode", "also remove @author tags")

Examples

# All files from a recent AI-assisted commit
/brewtools:text-human 3be67487

# Single service class
/brewtools:text-human src/main/java/com/example/OrderService.java

# Entire package
/brewtools:text-human src/main/java/services/

# Commit cleanup — preserve public API docs
/brewtools:text-human 3be67487 don't touch docs on public records

# Folder pass — only unicode and AI markers
/brewtools:text-human src/ only remove AI artifacts and fix unicode

# Add extra rule on top of defaults
/brewtools:text-human 3be67487 also remove all @author tags

No arguments? The skill asks: commit hash, file path, or folder path.

Flow

  1. Scope resolution

    Parses the first token as commit hash (7+ hex digits), file path, or folder path. Missing or ambiguous scope triggers AskUserQuestion — “entire project” always asks to narrow down.

  2. File discovery

    Commit mode: git diff —name-only hash^..hash, all text files. Path mode: recursive find excluding target/, node_modules/, build/, binaries, images, archives. Single file: straight to processing.

  3. Language detection and block formation

    Loads the matching language reference (Java/Kotlin, TypeScript/JS, Python) before classifying. Files split into 3–10 parallel blocks by complexity: simple config/data/text files go to haiku agents; source with logic, tests, and complex SQL go to sonnet agents.

  4. Parallel execution

    All Task calls fire in one message for true parallelism. Each sub-agent receives its block, the language reference, and any custom instructions prepended at highest priority. Custom instructions override defaults on conflict.

  5. Aggregation and report

    JSON results from all agents merge into a unified Humanization Report: total files, blocks used, haiku/sonnet split, comments removed, docs simplified, unicode fixed — per file and as totals. Files are edited in place; use git to revert.

Internals

What gets removed

CategoryPatternAction
AI comment markers// Added by AI, // Claude suggestion, /* Suggested by */Delete
Fake issue refsBUG-001, FIX-123, ISSUE-42Delete (real project tickets kept)
Unicode long dashU+2014Replace with --
Unicode arrows, , Replace with ->, <-, =>
Unicode bullets/quotes, ", ", ', 'Replace with ASCII equivalents
Trivial docsJavadoc/docstring restating method nameDelete
Obvious comments// Initialize the list, // Loop through itemsDelete
Formatting noise3+ blank lines, trailing whitespace, /* single line */Normalize

What gets kept

PreservedReason
”Why” comments// Retry 3x — flaky external API explains non-obvious behavior
Public API docsExternal contracts
Real ticket refsJIRA-456, GH-123 are project-specific
Structural SQL/YAML commentsSection organization
Complex algorithm explanationsNot trivially obvious from code

Block sizing

FilesLinesBlocksAgents
1–2<2001direct
3–5<5003parallel
6–10500–15005parallel
11–201500–30007parallel
21+3000+10parallel

Custom prompt handling: everything after the first arg token is prepended to every sub-agent prompt as CUSTOM INSTRUCTIONS (highest priority, override defaults). It wins over all default rules on conflict.

Text Optimize

Trim token waste from prompts and docs. Complements text-human for pre-commit cleanup.

🔗

GitHub source

Source code, language references (java.md, typescript.md, python.md).

🚀

Brewtools overview

All brewtools skills — text, secrets, deploy, SSH, provider switching.

Updating plugins

Use /brewtools:plugin-update to check and update the brewcode plugin suite in one command. See the FAQ for details.