# How the Two-Pass Rewrite Process Works in Humanizer

> Discover how Humanizer's two-pass rewrite process transforms AI text. It removes AI language and ensures factual accuracy, preserving your document's integrity.

- Repository: [Siqi Chen/humanizer](https://github.com/blader/humanizer)
- Tags: internals
- Published: 2026-09-06

---

**Humanizer employs a two-pass rewrite process that first generates a draft using 35 Wikipedia-derived patterns to strip obvious AI-sounding language, then verifies that draft against the original claims to produce a final version that preserves factual accuracy and document structure.**

The **two-pass rewrite process** is the core architecture behind Humanizer, an open-source tool by `blader/humanizer` designed to transform AI-generated prose into natural-sounding text. Unlike single-pass rewriters that risk hallucinating facts or destroying document structure, this methodology separates aggressive style removal from careful factual verification. According to the source code in [`README.md`](https://github.com/blader/humanizer/blob/main/README.md), the workflow "makes a first pass … then it checks the draft against those patterns and the original claims before rewriting whatever still needs work" (lines 7-10), with the critical second verification stage introduced in version 2.2.0 (line 176).

## First Pass: Generating the Initial Draft

The initial phase focuses on bulk removal of AI artifacts without constraints.

**Pattern Application Without Structural Constraints**

In the first pass, Humanizer applies its **35 Wikipedia-derived patterns** without treating the original document structure as immutable. This produces a full draft that eliminates surface-level AI-style constructions, including over-used buzzwords, filler phrases, and generic marketing tone. The goal is establishing a clean baseline that removes the most obvious mechanical wording before deeper analysis begins.

The actual pattern definitions and rewrite logic reside in [`SKILL.md`](https://github.com/blader/humanizer/blob/main/SKILL.md), which drives the transformation engine for this stage.

## Second Pass: Verification and Final Polish

The second phase ensures accuracy and completes the transformation through careful review.

**Checking Against Original Claims**

The draft from the first pass is **checked against the original claims and the full pattern list**. Humanizer rewrites any remaining sections that still sound artificial, operating under strict constraints to preserve code blocks, front-matter, link targets, and factual details. This stage captures longer-run patterns that survived the initial transformation.

**Factual Fidelity Guarantees**

The second pass enforces **factual fidelity**—preventing invented facts—while respecting the original document's structure. According to the `blader/humanizer` source, this verification step was added specifically to ensure that the final output does not alter metadata or hallucinate information during the stylistic rewrite.

## Technical Implementation and Source Files

The two-pass logic is distributed across three critical files in the repository:

- **[`README.md`](https://github.com/blader/humanizer/blob/main/README.md)** — Contains the high-level description of the two-pass workflow, version history documenting the 2.2.0 addition, and usage examples.
- **[`SKILL.md`](https://github.com/blader/humanizer/blob/main/SKILL.md)** — Houses the actual skill prompt containing the **35 patterns** and the rewrite logic that orchestrates both passes.
- **[`AGENTS.md`](https://github.com/blader/humanizer/blob/main/AGENTS.md)** — Provides guidelines for maintaining the skill across different agents, referencing the two-pass process indirectly to ensure consistent behavior.

These files collectively define how Humanizer generates an initial draft, verifies it against source material, and produces a polished final rewrite.

## Practical Example: Invoking the Two-Pass Workflow

When interacting with a Claude-compatible agent, both passes execute automatically after a single invocation.

**Step 1: Invoke the Skill**

Trigger the rewrite by calling the Humanizer skill with your AI-generated text:

```markdown
/humanizer

Please humanize this text:
[Paste AI-generated paragraph here]

```

**Step 2: Review the First-Pass Output**

The agent returns an initial draft labeled as the first rewrite. At this stage, obvious AI-style phrases are removed, though some longer-run patterns may persist in the text.

**Step 3: Receive the Final Second-Pass Output**

Humanizer then automatically performs the second pass, adding a short critique and presenting the final version. This output removes remaining artificial wording while ensuring that facts, code blocks, and metadata remain unchanged.

The agent handles both passes sequentially within the same response; you do not need to send multiple requests.

## Summary

- **Two distinct passes** separate bulk style removal from careful fact-checking, minimizing the risk of hallucinations or structural damage.
- **First pass** applies 35 Wikipedia-derived patterns without structural constraints to eliminate surface-level AI artifacts.
- **Second pass** verifies the draft against original claims and rewrites remaining artificial sections while preserving code, links, and front-matter.
- **Version 2.2.0** introduced the critical "draft check and second rewrite" functionality to the `blader/humanizer` codebase.
- **Implementation** spans [`README.md`](https://github.com/blader/humanizer/blob/main/README.md), [`SKILL.md`](https://github.com/blader/humanizer/blob/main/SKILL.md), and [`AGENTS.md`](https://github.com/blader/humanizer/blob/main/AGENTS.md), with the core pattern logic residing in the skill prompt.

## Frequently Asked Questions

### How does the two-pass rewrite process prevent factual inaccuracies?

The second pass explicitly compares the generated draft against the original claims before finalizing the output. This verification step ensures that no invented facts are introduced during the style transformation, and that code blocks, link targets, and metadata remain unchanged from the source material.

### What are the 35 Wikipedia-derived patterns used in the first pass?

The patterns are lexical and structural rules derived from analyzing natural Wikipedia prose, designed to identify AI-sounding constructions like buzzwords, filler phrases, and generic marketing tone. The complete list is defined in [`SKILL.md`](https://github.com/blader/humanizer/blob/main/SKILL.md) and applied aggressively during the initial draft generation to establish a clean baseline.

### Why was the second pass introduced in version 2.2.0?

Version 2.2.0 added the "draft check and second rewrite" to address limitations of single-pass rewriting, which often missed subtle AI patterns or accidentally altered factual content. The second pass ensures deeper pattern matching while enforcing structural and factual fidelity to the original document, as documented in [`README.md`](https://github.com/blader/humanizer/blob/main/README.md) line 176.

### Can I run only the first pass to get faster results?

No, the Humanizer skill is designed to execute both passes automatically in a single invocation. The two-pass architecture is integral to the tool's safety guarantees; skipping the verification stage would risk publishing text with remaining AI artifacts or factual errors that the second pass is designed to catch.