mechanical-preprocess

mechanical-preprocess is a skill for Claude Code, Codex from felipelobomotta-blip/book-genesis-v4. It costs 41 tokens per session (3,211 once invoked), scanned A, original, MIT.

A command-line cleanup process for applying mechanical text fixes across a long manuscript before AI-based editing.

In plain words
What is it for?
Use it to remove em dashes, replace forbidden words, count patterns, and apply other rule-based cleanup to chapter files.
Why use it?
It handles repeated patterns consistently and reduces the chance that an AI editor misses rules across many chapters.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument.

Good fit Use it to remove em dashes, replace forbidden words, count patterns, and apply other rule-based cleanup to chapter files.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/felipelobomotta-blip/book-genesis-v4/mechanical-preprocess
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add felipelobomotta-blip/book-genesis-v4 --skill mechanical-preprocess
Clone the repo
git clone --depth 1 https://github.com/felipelobomotta-blip/book-genesis-v4

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for mechanical-preprocess

README.md
[![agentmods](https://agentmods.dev/badge/skills/felipelobomotta-blip/book-genesis-v4/mechanical-preprocess/github.svg)](https://agentmods.dev/skills/felipelobomotta-blip/book-genesis-v4/mechanical-preprocess)
Your own site
<a href="https://agentmods.dev/skills/felipelobomotta-blip/book-genesis-v4/mechanical-preprocess"><img src="https://agentmods.dev/badge/skills/felipelobomotta-blip/book-genesis-v4/mechanical-preprocess/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for mechanical-preprocess

Your own site · 80×15
<a href="https://agentmods.dev/skills/felipelobomotta-blip/book-genesis-v4/mechanical-preprocess"><img src="https://agentmods.dev/badge/skills/felipelobomotta-blip/book-genesis-v4/mechanical-preprocess.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 41 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,211 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00041 $0.03211
Opus 5 $0.00020 $0.01605
Sonnet 5 $0.00008 $0.00642
Haiku 4.5 $0.00004 $0.00321

Measured 11d ago against content hash 8efc08efb5c1, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

mechanical-preprocess scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

legacy/skills/deprecated/mechanical-preprocess/SKILL.md · 307 lines

How it starts

The opening of the file, as written. The whole thing — 307 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Mechanical Preprocess

PURPOSE

AI agents are bad at processing entire manuscripts for mechanical fixes. Context windows overflow, attention drifts, and the agent "forgets" the rules by chapter 15. This skill solves that by splitting the work:

  • Bash handles the 80% — pattern matching, counting, safe replacements
  • AI handles the 20% — judgment calls on ambiguous cases, reviewing diffs

This is the ONLY skill in the pipeline that uses bash scripting as its primary tool. It exists because some problems are engineering problems, not language problems.

WHEN TO RUN

  • After: All chapters have been through prose-craft (complete draft exists)
  • Before: dialogue-polish, chaos-engine, or any AI-based editing pass
  • Trigger: Orchestrator calls this once when the full manuscript draft is ready
  • Re-run: After any major rewrite pass that may reintroduce mechanical patterns

REQUIRED INPUTS

  1. Chapter files — all chapter drafts in chapters/ directory (e.g., chapters/chapter-01.md through chapters/chapter-[N].md)
  2. voice-dna.md — for:
    • Forbidden word list
    • Em-dash policy (max per chapter, allowed contexts)
    • Any other mechanical rules (e.g., max semicolons per chapter, banned constructions)
  3. foundation.md — for genre context (affects which patterns are acceptable)

PROCESS

PHASE 1: SCAN (Pure bash -- no AI)

Run these scans against every chapter file. All commands use standard Unix tools (grep, wc, awk, sed).

1.1 Em-Dash Census

# Count em-dashes per chapter (both spaced and unspaced variants)
for f in chapters/chapter-*.md; do
  echo "$(basename $f): $(grep -oP '(\x{2014}| — )' "$f" | wc -l) em-dashes"
done

Categorize each em-dash by context:

  • Independent clause separator[complete sentence] — [complete sentence] (TARGET FOR REMOVAL)
  • Parenthetical asideword — aside — continuation (TARGET: convert to commas or restructure)
  • Dialogue interruption"I was going to—" (KEEP — this is correct usage)
  • List/appositivethree things — money, power, fame — were gone (EVALUATE case by case)

Read the full file on GitHub · 307 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 307 lines · 41 tokens per session scan A 8efc08efb5c1

Subscribe to this mod's changes

mechanical-preprocess is a skill published in the GitHub repository felipelobomotta-blip/book-genesis-v4 (114 stars, last pushed 5d ago), licensed MIT. It adds 41 tokens to every session and 3,211 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

humanizer

Detects 55 AI writing patterns and rewrites text in five voice profiles so it reads like a specific human wrote it, with an optional 0-100 AI-tell score. Use when text sounds AI-generated or like a chatbot, when preparing a blog post, README, or LinkedIn post for publication, when auditing prose for AI tells, or when…

Aboudjem/humanizer-skill · 139 tokens

clarity

Draft, rewrite, or review reader-facing prose so it is specific, useful, and recognizably the author's without inventing facts or performing humanness. Use for essays, articles, newsletters, documentation, talks, launch copy, and other important prose that feels generic, hollow, or AI-shaped. Supports co-write…

addyosmani/clarity · 76 tokens

voiceprint

Use when writing an article, newsletter, blog post or long social post that must genuinely be the user's own writing. Triggers on "voiceprint", "write this in my voice", "turn my recording into an article", "cut my transcript down", "make this actually mine", "write from my video". Turns the user's own spoken words…

charlie947/voiceprint · 83 tokens

monograph-writing

A workflow for managing the writing of long books, textbooks, academic monographs, technical books, or dissertations in small, checkable batches.

newdeme/monograph-writing · 489 tokens

red-pen

A strict editorial reviewer that checks writing principles inspired by George Orwell's "Politics and the English Language" rules and Matthew Butterick's Practical Typography. Use this skill whenever the user says "red pen", "check my prose", "edit this for clarity", "typography check", "tighten this up", "review this…

wpgaurav/claude-code-skills · 147 tokens

slop-detector

Score a draft, page, or caption set for AI slop with a four-tier severity model instead of a flat banned-words list. Exact production narration fails outright, rhetorical scaffolds warn only when repeated, lexical tells become review prompts, and document-level patterns are diagnosed. Use when the user asks to score…

wpgaurav/claude-code-skills · 96 tokens