Skip to content

Commit a41beec

Browse files
pianweifenclaude
andcommitted
feat: add humanization layer to remove AI writing patterns
Integrate de-AI writing system based on blader/humanizer (29 AI patterns) and Chinese-specific rules (去AI味). Voice calibration via writing samples lets the system match the user's personal style. - lib/humanize.md: shared de-AI rule library (29 patterns + 中文专项) - content/config/voice.yaml: voice calibration template - skills/media-write: add humanization audit pass (Step 5) before variants - skills/media-setup: add voice configuration wizard (Step 5) - CLAUDE.md: document humanization feature Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent a3620c5 commit a41beec

5 files changed

Lines changed: 275 additions & 6 deletions

File tree

CLAUDE.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,14 @@ A set of Claude Code skills that let developers write content once and publish t
4242

4343
**v2 (planned):** 小红书, 知乎, Medium
4444

45+
## Humanization (de-AI writing)
46+
47+
All content passes through a humanization layer defined in `lib/humanize.md`:
48+
- **29 AI writing patterns** detected and rewritten (based on Wikipedia's WikiProject AI Cleanup)
49+
- **Chinese-specific de-AI rules** (去AI味): anti-成语堆砌, 口语化, structural de-rigidification
50+
- **Voice calibration** via `content/config/voice.yaml` — provide writing samples to match personal style
51+
- Applied during drafting (rules active while writing) and as a dedicated audit pass before variant generation
52+
4553
## Image generation
4654

4755
Configurable backend via `IMAGE_PROVIDER` in `.env`:

content/config/voice.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Voice Calibration Config
2+
# Provide writing samples so the system matches your personal style.
3+
# This takes priority over generic de-AI rules in lib/humanize.md.
4+
5+
# Paste 2-3 paragraphs of your own writing here.
6+
# The system will extract voice traits automatically.
7+
samples:
8+
- |
9+
# Paste your first writing sample here.
10+
# Blog post, README, tweet thread — anything in your natural voice.
11+
- |
12+
# (Optional) A second sample for better calibration.
13+
14+
# Or manually specify traits (auto-extracted if samples are provided):
15+
traits:
16+
sentence_length: medium # short | medium | long
17+
vocabulary: conversational # academic | technical | conversational | casual
18+
humor: occasional # none | dry | occasional | frequent
19+
perspective: first_person # first_person | second_person | third_person
20+
formality: informal # formal | neutral | informal
21+
22+
# Per-platform tone overrides (optional):
23+
# platform_overrides:
24+
# devto:
25+
# formality: informal
26+
# humor: frequent
27+
# wechat:
28+
# vocabulary: conversational
29+
# perspective: first_person

lib/humanize.md

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
# Humanize — De-AI Writing Guide
2+
3+
Shared library for removing AI-generated writing patterns. Read this file
4+
before writing or revising any content.
5+
6+
Based on Wikipedia's WikiProject AI Cleanup patterns and Chinese content
7+
de-AI techniques.
8+
9+
## Core Principle
10+
11+
LLMs produce text that trends toward the most statistically likely phrasing.
12+
Human writing is specific, uneven, opinionated, and occasionally messy.
13+
The goal is not to trick detectors — it is to write things a real person
14+
would actually say.
15+
16+
## The 29 AI Writing Patterns to Avoid
17+
18+
### Content Patterns
19+
20+
| # | Pattern | Example | Fix |
21+
|---|---------|---------|-----|
22+
| 1 | Significance inflation | "marking a pivotal moment" | State the fact plainly |
23+
| 2 | Notability name-dropping | "featured in Forbes, TechCrunch..." | Only cite if directly relevant |
24+
| 3 | Superficial -ing analyses | "symbolizing, reflecting, showcasing" | Say what it actually does |
25+
| 4 | Promotional language | "breathtaking", "game-changing" | Remove or replace with specifics |
26+
| 5 | Vague attributions | "Experts believe", "Many developers say" | Name the source or drop it |
27+
| 6 | Formulaic challenges | "Despite challenges... continues to" | Be specific about what went wrong |
28+
29+
### Language Patterns
30+
31+
| # | Pattern | Example | Fix |
32+
|---|---------|---------|-----|
33+
| 7 | AI vocabulary | "delve, leverage, landscape, utilize, foster, tapestry, multifaceted, nuanced, comprehensive, robust" | Use plain words: dig into, use, field, area |
34+
| 8 | Copula avoidance | "serves as", "stands as", "features", "boasts" | Just say "is" or "has" |
35+
| 9 | Negative parallelisms | "It's not just X, it's Y" | Pick one point and make it |
36+
| 10 | Rule of three | Always listing exactly 3 items | Vary list lengths: 2, 4, 5 |
37+
| 11 | Synonym cycling | Repeating ideas with different words | Say it once, move on |
38+
| 12 | False ranges | "from architecture to deployment" | Be specific about what you cover |
39+
| 13 | Passive voice / subjectless fragments | "No configuration needed" | Name the actor: "You don't need to configure anything" |
40+
41+
### Style Patterns
42+
43+
| # | Pattern | Example | Fix |
44+
|---|---------|---------|-----|
45+
| 14 | Em dash overuse | "the tool — which is free — works" | Use commas or split into two sentences |
46+
| 15 | Boldface overuse | Random **emphasis** everywhere | Bold only for genuinely key terms |
47+
| 16 | Inline-header lists | "**Label:** content" format | Use normal prose or plain lists |
48+
| 17 | Title Case Headings | "How To Build A Great API" | Sentence case: "How to build a great API" |
49+
| 18 | Decorative emojis | "Let's get started! :rocket:" | Remove unless platform convention |
50+
| 19 | Curly quotes | Typographic quotes in code contexts | Use straight quotes |
51+
| 20 | Hyphenated buzzwords | "cross-functional, data-driven, future-proof" | Unpack: say what you mean |
52+
| 21 | Persuasive authority tropes | "At its core", "What truly matters" | Drop it; start with the point |
53+
| 22 | Signposting announcements | "Let's dive in", "Here's what you need to know" | Just start |
54+
| 23 | Fragmented headers | Headers that need body text to make sense | Headers should stand alone |
55+
56+
### Communication Patterns
57+
58+
| # | Pattern | Example | Fix |
59+
|---|---------|---------|-----|
60+
| 24 | Chatbot artifacts | "I hope this helps! Let me know if..." | Remove entirely |
61+
| 25 | Cutoff disclaimers | "While details are limited..." | Remove or be specific about what's unknown |
62+
| 26 | Sycophantic tone | "Great question!", "Absolutely!" | Don't grade the reader |
63+
64+
### Filler & Hedging
65+
66+
| # | Pattern | Example | Fix |
67+
|---|---------|---------|-----|
68+
| 27 | Filler phrases | "In order to", "It's worth noting that" | "To", or just state it |
69+
| 28 | Excessive hedging | "could potentially possibly help" | One qualifier max |
70+
| 29 | Generic conclusions | "The future looks bright", "Only time will tell" | End with a concrete point or don't conclude |
71+
72+
## Chinese Content (中文去AI味)
73+
74+
When writing in Chinese, also watch for these patterns:
75+
76+
### 结构问题
77+
- **过度结构化**: 不要用"首先、其次、最后"、"第一、第二、第三"等机械排列。真人写作结构更松散,偶尔跳跃。
78+
- **小标题 + emoji 排列**: 每段都带 emoji 小标题是典型 AI 格式,减少使用。
79+
- **万能总结句**: "综上所述"、"总而言之"、"总的来说" — 删掉或换成具体观点。
80+
81+
### 词汇问题
82+
- **成语堆砌**: AI 爱用四字成语显得"有文化",真人日常写作成语密度低得多。
83+
- **高频 AI 词**: "赋能、驱动、生态、闭环、底层逻辑、颗粒度、抓手" — 用大白话替代。
84+
- **过度修饰**: "深入浅出地探讨"、"全方位多角度" — 删掉修饰,直说。
85+
- **重复连接词**: "不仅……而且"、"无论……都" — 减少使用,换成口语转折。
86+
87+
### 语气问题
88+
- **过于客观**: AI 写作缺少主观判断。加入"我觉得"、"说实话"、"有点意外的是"等个人视角。
89+
- **过于流畅**: 真人写作有停顿、口语化表达、偶尔的不完整句。适当加入语气词。
90+
- **缺少具体例子**: AI 喜欢泛泛而谈。用具体的数字、日期、项目名、个人经历替代概括性描述。
91+
92+
### 修复策略
93+
1. 用第一人称,加入主观感受
94+
2. 打破工整结构,允许段落长短不一
95+
3. 用口语替代书面语("搞定"代替"完成","踩坑"代替"遇到问题")
96+
4. 举具体例子,带时间和细节
97+
5. 偶尔用反问、自嘲、吐槽增加真实感
98+
99+
## Voice Calibration
100+
101+
If `content/config/voice.yaml` exists, read it before writing. It contains:
102+
- Writing samples from the user
103+
- Extracted voice traits (sentence length, vocabulary level, humor style, etc.)
104+
- Per-platform tone adjustments
105+
106+
When voice.yaml is present, match the user's natural style rather than
107+
applying generic humanization. The user's own patterns take priority
108+
over the rules above.
109+
110+
## How to Apply
111+
112+
This guide is used in two places:
113+
114+
### During drafting (per-section)
115+
Apply these rules as you write each section. Don't draft in AI-speak
116+
and fix later — write naturally from the start.
117+
118+
### Audit pass (after full draft)
119+
After the complete source.md is written, do a dedicated scan:
120+
1. Read the full text looking for each of the 29 patterns
121+
2. Flag any instances found
122+
3. Rewrite flagged passages
123+
4. If the content is in Chinese, also apply the Chinese-specific checks
124+
5. Show the user what changed and why

skills/media-setup/SKILL.md

Lines changed: 76 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,77 @@ RESPONSE=$(curl -s -o /dev/null -w "%{http_code}" \
124124
[ "$RESPONSE" = "200" ] && echo "OK: OpenAI connected" || echo "ERROR: Auth failed"
125125
```
126126

127-
## Step 5: Write Config Files
127+
## Step 5: Configure Writing Voice (Optional)
128+
129+
Ask the user if they want to set up their personal writing style.
130+
131+
Use AskUserQuestion:
132+
"Want to set up your writing voice? This helps the system match your personal style instead of sounding like AI."
133+
- A) Yes, paste writing samples
134+
- B) Yes, describe my style manually
135+
- C) Skip for now
136+
137+
### Option A: Writing samples
138+
139+
Ask the user to paste 2-3 paragraphs of their own writing (blog posts, READMEs, tweets, etc.).
140+
141+
Use AskUserQuestion:
142+
"Paste a writing sample — anything you've written that sounds like *you*. Blog post, README, email, tweet thread, 公众号文章 — all work. (Paste one now, I'll ask for more after.)"
143+
144+
Collect 1-3 samples. For each, extract voice traits:
145+
- Average sentence length (short/medium/long)
146+
- Vocabulary level (academic/technical/conversational/casual)
147+
- Humor presence (none/dry/occasional/frequent)
148+
- Default perspective (first_person/second_person/third_person)
149+
- Formality (formal/neutral/informal)
150+
- Language patterns (e.g., uses rhetorical questions, starts with anecdotes, uses 口语化 Chinese)
151+
152+
Show the extracted traits to the user for confirmation:
153+
```
154+
Based on your samples, here's your voice profile:
155+
sentence_length: short
156+
vocabulary: conversational
157+
humor: dry
158+
perspective: first_person
159+
formality: informal
160+
161+
Does this look right? I can adjust any of these.
162+
```
163+
164+
### Option B: Manual style description
165+
166+
Use AskUserQuestion to walk through each trait:
167+
168+
1. "How long are your typical sentences?" (short and punchy / medium / long and flowing)
169+
2. "What's your vocabulary like?" (academic / technical jargon / conversational / casual slang)
170+
3. "Do you use humor in your writing?" (never / dry/subtle / sometimes / a lot)
171+
4. "What perspective do you write from?" (I/我 first person / you/你 second person / third person)
172+
5. "How formal is your tone?" (formal / neutral / informal/casual)
173+
174+
### Write voice.yaml
175+
176+
Write the voice config to `content/config/voice.yaml`:
177+
178+
```yaml
179+
# Generated by /media-setup
180+
samples:
181+
- |
182+
<pasted sample 1>
183+
- |
184+
<pasted sample 2>
185+
186+
traits:
187+
sentence_length: <extracted or chosen>
188+
vocabulary: <extracted or chosen>
189+
humor: <extracted or chosen>
190+
perspective: <extracted or chosen>
191+
formality: <extracted or chosen>
192+
```
193+
194+
Tell the user:
195+
"Voice profile saved. The writing skills will match this style automatically. You can update it anytime by editing `content/config/voice.yaml` or running `/media-setup` again."
196+
197+
## Step 6: Write Config Files
128198

129199
Write credentials to `.env` (gitignored):
130200
```bash
@@ -153,7 +223,7 @@ platforms:
153223
- github-pages
154224
```
155225

156-
## Step 6: Configure git-lfs (Optional)
226+
## Step 7: Configure git-lfs (Optional)
157227

158228
If the user expects to publish many posts with images:
159229

@@ -169,7 +239,7 @@ git lfs track "content/**/assets/*.jpg"
169239
git add .gitattributes
170240
```
171241

172-
## Step 7: Summary
242+
## Step 8: Summary
173243

174244
Print a summary of what was configured:
175245

@@ -184,6 +254,9 @@ Platforms:
184254
Image generation:
185255
[OK] OpenAI DALL-E 3
186256
257+
Writing voice:
258+
[OK] Voice profile configured (informal, conversational, first person)
259+
187260
Next steps:
188261
- Run /media-idea to brainstorm your first post
189262
- Run /media to start the full guided workflow

skills/media-write/SKILL.md

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Write content collaboratively, then generate platform-specific variants.
2424
Before starting, read these shared library files:
2525
- Read `lib/adapter-discovery.md` for adapter format.md location
2626
- Read `lib/manifest-ops.md` for manifest creation
27+
- Read `lib/humanize.md` for de-AI writing rules (MUST read before any writing)
2728

2829
## Step 1: Get the Brief
2930

@@ -74,11 +75,14 @@ Work through the article section by section:
7475

7576
### Writing guidelines
7677

78+
- **Apply `lib/humanize.md` rules from the start.** Do not draft in AI-speak and fix later.
7779
- Write in the user's voice (if brand voice is configured in `content/config/voice.yaml`, read it first)
7880
- Include code examples where relevant for a developer audience
7981
- Use clear headers (## for sections, ### for subsections)
8082
- Keep paragraphs concise (3-5 sentences)
8183
- Add image placeholders where visuals would help: `![description](assets/placeholder.png)`
84+
- Avoid the 29 AI patterns listed in `lib/humanize.md` — no significance inflation, no AI vocabulary, no filler phrases
85+
- For Chinese content, follow the 中文去AI味 section: use 口语化 tone, avoid 成语堆砌, add personal perspective
8286

8387
## Step 4: Finalize Source
8488

@@ -89,7 +93,38 @@ Use AskUserQuestion:
8993
- A) Yes, generate variants
9094
- B) I want to edit more (specify which section)
9195

92-
## Step 5: Generate Platform Variants
96+
## Step 5: Humanization Audit
97+
98+
After the user approves the full draft, run a dedicated de-AI pass before generating variants.
99+
100+
### Process
101+
102+
1. Re-read `lib/humanize.md` to refresh the pattern list.
103+
2. Read the complete `source.md`.
104+
3. Scan for each of the 29 AI writing patterns. For Chinese content, also apply the 中文去AI味 checks.
105+
4. For each flagged passage, rewrite it following the "Fix" column in the pattern table.
106+
5. Show the user a summary of changes:
107+
```
108+
Humanization audit — <N> patterns found and fixed:
109+
- Section 2: removed significance inflation ("pivotal moment" → "useful")
110+
- Section 4: replaced AI vocabulary ("leverage" → "use")
111+
- Section 5: removed filler phrase ("It's worth noting that")
112+
```
113+
6. Use AskUserQuestion:
114+
"Here are the humanization edits. Accept all, or review individually?"
115+
- A) Accept all
116+
- B) Review each change
117+
- C) Skip humanization (keep original)
118+
7. Apply accepted changes to `source.md`.
119+
120+
### Voice calibration (optional)
121+
122+
If `content/config/voice.yaml` exists:
123+
- Compare the draft against the user's writing samples
124+
- Adjust sentence length, vocabulary level, and tone to match
125+
- Voice.yaml traits take priority over generic humanization rules
126+
127+
## Step 6: Generate Platform Variants
93128

94129
For each configured platform adapter:
95130

@@ -106,7 +141,7 @@ For each configured platform adapter:
106141

107142
3. Write the variant to `<post_dir>/variants/<name>.md`
108143

109-
## Step 6: Create Manifest
144+
## Step 7: Create Manifest
110145

111146
Create `manifest.yaml` following the format in `lib/manifest-ops.md`:
112147

@@ -131,7 +166,7 @@ variants:
131166
132167
Use the atomic write pattern from `lib/manifest-ops.md`.
133168

134-
## Step 7: Summary
169+
## Step 8: Summary
135170

136171
```
137172
Article written and variants generated:

0 commit comments

Comments
 (0)