Skills humanize-beagle
Rewrite AI-generated developer text to sound human — fix inflated language, filler, tautological docs, and robotic tone. Use after review-ai-writing identifies issues.
git clone https://github.com/openclaw/skills
T=$(mktemp -d) && git clone --depth=1 https://github.com/openclaw/skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/anderskev/humanize-beagle" ~/.claude/skills/openclaw-skills-humanize-beagle && rm -rf "$T"
T=$(mktemp -d) && git clone --depth=1 https://github.com/openclaw/skills "$T" && mkdir -p ~/.openclaw/skills && cp -r "$T/skills/anderskev/humanize-beagle" ~/.openclaw/skills/openclaw-skills-humanize-beagle && rm -rf "$T"
skills/anderskev/humanize-beagle/SKILL.mdHumanize
Apply fixes from a previous
review-ai-writing run with automatic safe/risky classification.
Usage
/beagle-docs:humanize-beagle [--dry-run] [--all] [--category <name>]
Flags:
- Show what would be fixed without changing files--dry-run
- Fix entire codebase (runs review with --all first)--all
- Only fix specific category:--category <name>content|vocabulary|formatting|communication|filler|code_docs
Instructions
1. Parse Arguments
Extract flags from
$ARGUMENTS:
- Preview mode only--dry-run
- Full codebase scan--all
- Filter to specific category--category <name>
2. Pre-flight Safety Checks
# Check for uncommitted changes git status --porcelain
If working directory is dirty, warn:
Warning: You have uncommitted changes. Creating a git stash before proceeding. Run `git stash pop` to restore if needed.
Create stash if dirty:
git stash push -u -m "beagle-docs: pre-humanize backup"
3. Load Review Results
Check for existing review file:
cat .beagle/ai-writing-review.json 2>/dev/null
If file missing:
- If
flag: Run--all
first/beagle-docs:review-ai-writing --all - Otherwise: Fail with: "No review results found. Run
first."/beagle-docs:review-ai-writing
If file exists, validate freshness:
# Get stored git HEAD from JSON stored_head=$(jq -r '.git_head' .beagle/ai-writing-review.json) current_head=$(git rev-parse HEAD) if [ "$stored_head" != "$current_head" ]; then echo "Warning: Review was run at commit $stored_head, but HEAD is now $current_head" fi
If stale, prompt: "Review results are stale. Re-run review? (y/n)"
4. Load Reference Material
Read the appropriate reference files based on the findings being fixed:
- Read
when applyingreferences/vocabulary-swaps.md
orai_vocabulary_high
fixesai_vocabulary_low - Read
for strategy details and before/after examples for any categoryreferences/fix-strategies.md - Read
for tone/register guidance when rewriting prosereferences/developer-voice.md
Only load what you need — if fixing only vocabulary, skip the voice guide.
5. Filter Findings
If
--category is set, filter findings to that category only.
Partition remaining findings by
fix_safety:
Safe Fixes (auto-apply):
- Delete conversational artifactschat_leak
- Delete knowledge cutoff referencescutoff_disclaimer
- Delete filler phrasesfiller_phrase
- Delete restating first sentenceheading_restatement
- Remove emoji from technical textemoji_decoration
- Remove excessive bold formattingboldface_overuse
- Swap high-signal AI wordsai_vocabulary_high
- Delete obvious code commentsnarrating_obvious
- Delete "In today's..." openerssynthetic_opener
- Delete or neutralize praisesycophantic_tone
- Delete unattributed claimsvague_authority
- Remove qualifiersexcessive_hedging
- Delete summary paddinggeneric_conclusion
- Use "is/are" naturallycopula_avoidance
- Delete rhetorical questionsrhetorical_device
- Replace formulaic em dashes with commas, parentheses, or colonsem_dash_overuse
- Remove horizontal rules before headingsthematic_break
- Convert AI title-case headings to sentence casetitle_case_heading
- Normalize curly quotes/apostrophes to straightcurly_quotes
- Delete "Not just X, but also Y" filler constructionsnegative_parallelism
- Delete "Despite its... faces challenges..." formulaic wrapperschallenges_and_prospects
Needs Review Fixes (require confirmation):
- Rewrite with specificspromotional_language
- Restructure sectionsformulaic_structure
- Pick consistent termsynonym_cycling
- Rewrite commit scopecommit_inflation
- Rewrite or delete docstringtautological_docstring
- Trim parameter docsexhaustive_enumeration
- Rewrite docstring voicethis_noun_verbs
- Reduce cluster densityai_vocabulary_low
- Rewrite error messageapologetic_error
- Simplify three-item lists used as filler comprehensivenessrule_of_three
- Restructure boldfaced inline-header vertical listsinline_header_list
- Convert small tables to proseunnecessary_table
- Restore specific facts replaced by vague praiseregression_to_mean
6. Apply Safe Fixes
If
--dry-run:
## Safe Fixes (would apply automatically) | # | File | Line | Type | Action | |---|------|------|------|--------| | 1 | README.md | 3 | synthetic_opener | Delete "In today's rapidly evolving..." | | 2 | src/auth.py | 15 | narrating_obvious | Delete "# Check if user exists" | | 3 | README.md | 42 | ai_vocabulary_high | Replace "utilize" with "use" | ...
Otherwise, apply fixes grouped by file to minimize file I/O:
- Sort findings by file, then by line number (descending, to avoid offset drift)
- For each file, apply all safe fixes in reverse line order
- For git artifacts (
,git:commit:*
), skip — these can't be auto-fixed. Report them for manual attention.git:pr:*
7. Handle Needs Review Fixes
If
--dry-run, list them:
## Needs Review Fixes (would prompt interactively) | # | File | Line | Type | Original | Suggested | |---|------|------|------|----------|-----------| | 4 | README.md | 8 | promotional_language | "powerful, enterprise-grade solution" | "authentication library" | ...
Otherwise, for each fix, prompt interactively:
[README.md:8] Promotional language: "powerful, enterprise-grade solution" Suggested: "authentication library" (y)es / (n)o / (e)dit / (s)kip all:
Track user choices:
- Apply this fix as suggestedy
- Skip this fixn
- User provides custom replacemente
- Skip all remaining interactive fixess
8. Validate Results
For each modified markdown file, verify basic validity:
# Check for broken markdown (unclosed code blocks, broken links) # Simple check: matching ``` pairs grep -c '```' "$file" | awk '{print ($1 % 2 == 0) ? "OK" : "WARNING: odd number of code fences"}'
For modified source files, check syntax is still valid:
Python:
python3 -c "import ast; ast.parse(open('$file').read())"
TypeScript/JavaScript:
npx -y acorn --ecma2020 "$file" > /dev/null 2>&1
If validation fails for any file, revert that file:
git checkout -- "$file" echo "Reverted $file due to validation failure"
9. Report Results
## Humanize Summary ### Applied Fixes - [x] README.md:3 - Deleted synthetic opener - [x] README.md:42 - Replaced "utilize" with "use" - [x] src/auth.py:15 - Deleted obvious comment ### Interactive Fixes - [x] README.md:8 - Rewrote promotional language (user approved) - [ ] docs/guide.md:22 - Skipped by user ### Skipped (Git Artifacts) - [ ] git:commit:abc1234 - Chat leak in commit message (amend manually) ### Validation - README.md: OK - src/auth.py: OK ### Diff Summary
git diff --stat
10. Cleanup
On successful completion (all validations pass):
rm .beagle/ai-writing-review.json
If any validation fails, keep the file and report:
Review file preserved at .beagle/ai-writing-review.json Fix issues and re-run, or restore with: git stash pop
Core Principles
- Delete first, rewrite second. Most AI patterns are padding. Removing them improves the text.
- Use simple words. Replace "utilize" with "use", "facilitate" with "help", "implement" with "add".
- Keep sentences short. Break compound sentences. One idea per sentence.
- Preserve meaning. Never change what the text says, only how it says it.
- Match the register. Commit messages are terse. READMEs are conversational. API docs are precise. Read
for the full register guide.references/developer-voice.md - Don't overcorrect. A slightly formal sentence is fine. Only fix patterns that read as obviously AI-generated.
- Understand regression to the mean. LLMs produce the most statistically likely output. Specific, unusual facts get replaced with generic, positive descriptions. When humanizing, restore specificity — replace vague praise with concrete details.
- Score density, not individual words. AI vocabulary words co-occur. One or two may be coincidental; a cluster of 3+ is a strong AI tell.
Example
# Preview all fixes without applying /beagle-docs:humanize-beagle --dry-run # Fix only vocabulary issues /beagle-docs:humanize-beagle --category vocabulary # Full codebase scan and fix /beagle-docs:humanize-beagle --all # Preview filler fixes only /beagle-docs:humanize-beagle --category filler --dry-run
Rules
- Always load reference material before applying fixes (step 4)
- Never modify files without a stash or clean working directory
- Apply safe fixes in reverse line order to avoid offset drift
- Never auto-fix git artifacts (commits, PRs) — report them for manual action
- Validate every modified file before considering it done
- Revert files that fail validation
- Write JSON report before displaying summary
- Clean up JSON report only on full success