@yottameta/yotta-humanize 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/README.md +97 -96
- package/README.zh-CN.md +147 -0
- package/SKILL.md +1 -1
- package/package.json +4 -3
- package/scripts/yotta_humanize.py +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# 更新日志
|
|
2
2
|
|
|
3
|
+
## v0.1.2 (2026-08-29)
|
|
4
|
+
|
|
5
|
+
- 安装方式统一为四方式(对齐发布规范 §3.3.1):方式一 `npx -y @yottameta/yotta-humanize --agent <name>` / `--dir <dir>`(推荐,走 npm 源);方式二 `git clone https://github.com/YottaMeta/yotta-humanize.git`;方式三 GitHub Download ZIP;方式四 `bash install.sh --agent/--dir/--list`。移除 `npx skills` 与 `-g` 推荐;中英双 README 安装节同步。
|
|
6
|
+
- 版本对齐:package.json / SKILL.md / CHANGELOG / 引擎 VERSION / 测试断言 / README 锚点 = 0.1.2。
|
|
7
|
+
- 无功能变更(仅文档与版本同步)。
|
|
8
|
+
|
|
9
|
+
## v0.1.1 (2026-08-28)
|
|
10
|
+
|
|
11
|
+
中英双语 README 对齐(老张拍板「英文门面 + 中文全档」):
|
|
12
|
+
|
|
13
|
+
- **README.md 改为英文**:作为 GitHub / npm / ClawHub 首页的英文门面(翻译 + 精简,覆盖定位 / 核心价值 / 命令 / 快速使用 / 安装 / 使用示例 / 边界 / 开发校验全流程)。
|
|
14
|
+
- **新增 README.zh-CN.md**:原中文完整主文档整体平移,顶部加语言切换链接。
|
|
15
|
+
- **package.json**:description 改英文;files 加 README.zh-CN.md;版本 0.1.0 → 0.1.1。
|
|
16
|
+
- 版本四处对齐:package.json / SKILL frontmatter / 引擎 VERSION / 文档。
|
|
17
|
+
- 边界(B 方案):references / CHANGELOG / 测试注释不翻译;SKILL 触发描述保持中文。
|
|
18
|
+
|
|
3
19
|
## v0.1.0 (2026-08-26)
|
|
4
20
|
|
|
5
21
|
YottaMeta 自有实现首版(去 AI 味方向参考开源社区 humanizer / ai-humanizer 类技能思路,已完全重写为中文语料实现,零依赖、无上游代码):
|
package/README.md
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
+
<p align="center"><b>Language</b>: English · <a href="./README.zh-CN.md">中文</a></p>
|
|
1
2
|
|
|
2
3
|
<p align="center">
|
|
3
4
|
<img src="assets/banner.png" alt="yotta-humanize banner" width="100%" />
|
|
4
5
|
</p>
|
|
5
6
|
|
|
6
|
-
<h1 align="center">yotta-humanize ·
|
|
7
|
+
<h1 align="center">yotta-humanize · 元真 (Yuanzhen)</h1>
|
|
7
8
|
|
|
8
|
-
<p align="center">YottaMeta
|
|
9
|
-
<p align="center"
|
|
10
|
-
<p align="center"
|
|
9
|
+
<p align="center">YottaMeta's AI-flavor remover for Chinese writing: a <b>detector engine (24 rule classes + wordlists + statistical burstiness)</b> that identifies AI-typical text and applies <b>deterministic rewrites</b> to make Chinese copy read more naturally, more like a human wrote it. Use it to edit / polish text or to detect and rewrite AI-generated Chinese drafts.</p>
|
|
10
|
+
<p align="center">Activates when it detects AI-flavor patterns — empty uplift, clichés, AI jargon (赋能 / 闭环 / 抓手), synonym stacking, triple parallel constructions, chat residue (希望对你有所帮助) — <b>deterministic verdicts by rules, not prompt-engineering luck</b>.</p>
|
|
11
|
+
<p align="center">Pure Python 3.8+ standard library, zero external dependencies; Windows + Linux + macOS; detection + rewriting in one flow, rewriting does not depend on any model.</p>
|
|
11
12
|
|
|
12
13
|
<p align="center">
|
|
13
14
|
<a href="LICENSE"><img alt="License: MIT" src="https://img.shields.io/badge/license-MIT-blue" /></a>
|
|
@@ -18,140 +19,140 @@
|
|
|
18
19
|
<a href="https://github.com/YottaMeta/yotta-humanize"><img alt="PRs welcome" src="https://img.shields.io/badge/PRs-welcome-brightgreen" /></a>
|
|
19
20
|
</p>
|
|
20
21
|
|
|
21
|
-
##
|
|
22
|
+
## What it is
|
|
22
23
|
|
|
23
|
-
AI
|
|
24
|
+
AI-generated Chinese text has a recognizable "AI flavor": empty uplift (标志着 / 彰显了), clichés (众所周知 / 综上所述 / 未来可期), jargon (赋能 / 闭环 / 抓手 / 颗粒度), mechanical enumeration (首先 / 其次 / 再次), chat residue (希望对你有所帮助)… Yuanzhen packages these signals into a **deterministic detector engine**: 24 rule classes (wordlists + sentence-pattern regexes) plus Chinese statistical burstiness (sentence-length uniformity / vocabulary diversity), outputting a 0-100 AI-flavor score and **deterministic rewrites** (wordlist substitution, cliché removal, chat-residue cleanup, punctuation throttling).
|
|
24
25
|
|
|
25
|
-
|
|
26
|
+
It is not tied to any single platform: an agent-agnostic toolkit that works in any agent supporting Agent Skills. Fully zero-dependency, no model calls; rewrites that need judgment are given as suggestions rather than forced automatically.
|
|
26
27
|
|
|
27
|
-
##
|
|
28
|
+
## Core value
|
|
28
29
|
|
|
29
|
-
- **24
|
|
30
|
-
-
|
|
31
|
-
-
|
|
32
|
-
-
|
|
33
|
-
-
|
|
30
|
+
- **24 detection rule classes** — content (empty uplift / cliché openers-closers / vague attribution / absolutism), language (AI jargon / synonym stacking / noun pile-ups / "we" overuse), sentence style (triple parallel / mechanical enumeration / rhetorical-question piles / punctuation abuse), communication (chat residue / flattery / disclaimer avoidance), filler (padding / transitions / repeated statements).
|
|
31
|
+
- **Statistical burstiness** — sentence-length uniformity (CV), burstiness, two-character vocabulary diversity (TTR), comma density — catches rhythm problems rules cannot see.
|
|
32
|
+
- **Deterministic rewriting** — unambiguous mechanical transforms are applied directly (赋能→支持, 抓手→切入点, 众所周知 / 综上所述 deleted, 希望对你有所帮助 cleaned, dash / exclamation throttled), outputting a fix list and before/after scores.
|
|
33
|
+
- **Machine readable** — --json outputs pure JSON; score --gate plugs into CI / pre-release checks.
|
|
34
|
+
- **Chinese-first** — wordlists, sentence patterns and rewrite mappings are all curated for Chinese text; no shared code with English humanizer-style skills.
|
|
34
35
|
|
|
35
|
-
##
|
|
36
|
+
## Why use it
|
|
36
37
|
|
|
37
|
-
|
|
|
38
|
+
| Advantage | Description |
|
|
38
39
|
|---|---|
|
|
39
|
-
|
|
|
40
|
-
|
|
|
41
|
-
|
|
|
42
|
-
|
|
|
43
|
-
|
|
|
44
|
-
|
|
|
40
|
+
| **Zero dependency** | Python 3.8+ standard library; no model / database / external service; Windows + Linux + macOS |
|
|
41
|
+
| **Deterministic** | Verdicts are reproducible and explainable; rewrites are deterministic transforms, not model probability |
|
|
42
|
+
| **Chinese-first** | Wordlists and patterns for Chinese AI-flavor (jargon / clichés / parallelism / chat residue) curated from scratch, not translated English rules |
|
|
43
|
+
| **Detect + rewrite in one** | score / analyze / report / suggest / rewrite — one command from detection to rewriting |
|
|
44
|
+
| **Reviewable** | Rewrites output a fix list and before/after scores so humans can verify item by item |
|
|
45
|
+
| **Ecosystem distribution** | GitHub + npm + ClawHub synced; four install methods (npx / git clone / Download ZIP / install.sh) |
|
|
45
46
|
|
|
46
|
-
##
|
|
47
|
+
## Commands
|
|
47
48
|
|
|
48
|
-
|
|
|
49
|
+
| Command | Description |
|
|
49
50
|
|---|---|
|
|
50
|
-
| score |
|
|
51
|
-
| analyze |
|
|
52
|
-
| report | Markdown
|
|
53
|
-
| suggest |
|
|
54
|
-
| rewrite |
|
|
55
|
-
| version |
|
|
51
|
+
| score | AI-flavor score (0-100); --gate makes a CI gate (exit code 1) |
|
|
52
|
+
| analyze | Detailed detection report (text / --json) with matched rules, context snippets, suggestions |
|
|
53
|
+
| report | Markdown detection report (statistics table + matched rules) |
|
|
54
|
+
| suggest | Rewrite suggestions grouped by priority |
|
|
55
|
+
| rewrite | Deterministic rewrite: replace / remove AI-flavor, output fix list + rewritten text + before/after scores |
|
|
56
|
+
| version | Print the version |
|
|
56
57
|
|
|
57
|
-
##
|
|
58
|
+
## Quick start
|
|
58
59
|
|
|
59
|
-
Windows
|
|
60
|
+
Windows uses python, Linux/macOS uses python3.
|
|
60
61
|
|
|
61
62
|
```bash
|
|
62
|
-
#
|
|
63
|
+
# Score (0-100, higher = more AI-like)
|
|
63
64
|
python3 scripts/yotta_humanize.py score -f article.md
|
|
64
65
|
|
|
65
|
-
#
|
|
66
|
+
# Detailed detection report
|
|
66
67
|
python3 scripts/yotta_humanize.py analyze -f article.md
|
|
67
68
|
|
|
68
|
-
# Markdown
|
|
69
|
+
# Markdown report
|
|
69
70
|
python3 scripts/yotta_humanize.py report -f article.md > report.md
|
|
70
71
|
|
|
71
|
-
#
|
|
72
|
+
# Rewrite suggestions grouped by priority
|
|
72
73
|
python3 scripts/yotta_humanize.py suggest -f article.md
|
|
73
74
|
|
|
74
|
-
#
|
|
75
|
+
# Deterministic rewrite (outputs rewritten text + fix list)
|
|
75
76
|
python3 scripts/yotta_humanize.py rewrite -f article.md
|
|
76
77
|
|
|
77
|
-
#
|
|
78
|
+
# Pipe input
|
|
78
79
|
cat article.md | python3 scripts/yotta_humanize.py score --stdin
|
|
79
80
|
|
|
80
|
-
# CI
|
|
81
|
+
# CI gate: exit code 1 when score >= threshold
|
|
81
82
|
python3 scripts/yotta_humanize.py score -f article.md --gate --threshold 45
|
|
82
83
|
```
|
|
83
84
|
|
|
84
|
-
|
|
85
|
+
Exit codes (same semantics as the YuanAn / YuanShen / Yuandun family): **0** = success; **1** = score --gate and threshold reached; **4** = usage error / fatal exception.
|
|
85
86
|
|
|
86
|
-
##
|
|
87
|
+
## Install
|
|
87
88
|
|
|
88
|
-
|
|
89
|
+
Pick any of the four methods below; the order is the recommended priority. Skill files always come from **npm** (GitHub can be slow without a proxy; npm supports mirrors).
|
|
89
90
|
|
|
90
|
-
###
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
npx -y @yottameta/yotta-humanize --
|
|
91
|
+
### Method 1: npm one-liner (recommended)
|
|
92
|
+
|
|
93
|
+
```text
|
|
94
|
+
# Optional China mirror: npm config set registry https://registry.npmmirror.com
|
|
95
|
+
npx -y @yottameta/yotta-humanize --agent <agent-name> # install to the agent's default user-level skills dir
|
|
96
|
+
npx -y @yottameta/yotta-humanize --dir <your-skills-dir> # point to the skills dir itself (e.g. ~/.codex/skills)
|
|
95
97
|
```
|
|
96
|
-
> 智能体不在预置列表里?用 --dir 指定它的 skills 目录,或手动复制(方式三)。--list 可查看各智能体对应的默认目录。想手动拿文件也可 npm pack @yottameta/yotta-humanize 解包后按方式二/三安装。
|
|
97
98
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
99
|
+
- `--agent <name>` installs to that agent's default user-level directory; `--list` shows each agent's default directory.
|
|
100
|
+
- `--dir <path>` installs to the given directory; for agents not in the preset list, point `--dir` at their skills directory.
|
|
101
|
+
- If the mirror has not synced the new package (404): add `--registry=https://registry.npmjs.org/` (a proxy may be needed in China), or wait for the mirror cache.
|
|
102
|
+
|
|
103
|
+
### Method 2: git clone (developers / git available)
|
|
104
|
+
|
|
105
|
+
```text
|
|
106
|
+
git clone https://github.com/YottaMeta/yotta-humanize.git <your-skills-dir>/yotta-humanize
|
|
105
107
|
```
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
| Trae IDE(国内) | %USERPROFILE%\.trae-cn\skills\yotta-humanize\ | .trae\skills\ |
|
|
125
|
-
| Qwen Code | %USERPROFILE%\.qwen\skills\yotta-humanize\ | .qwen\skills\ |
|
|
126
|
-
| Comate | %USERPROFILE%\.comate\skills\yotta-humanize\ | .comate\skills\ |
|
|
127
|
-
| CodeBuddy | %USERPROFILE%\.codebuddy\skills\yotta-humanize\ | .codebuddy\skills\ |
|
|
128
|
-
| Kimi | %USERPROFILE%\.kimi\skills\yotta-humanize\ | .kimi\skills\ |
|
|
129
|
-
| 通用 AGENTS.md | %USERPROFILE%\.agents\skills\yotta-humanize\ | .agents\skills\ |
|
|
130
|
-
|
|
131
|
-
> Codex 默认目录若设置了环境变量 CODEX_HOME,以该变量为准;opencode 若设置 XDG_CONFIG_HOME 同理。.agents\skills 并非通用目录,仅 OpenCode / Cursor / Cline / Amp / Kimi / Gemini CLI / GitHub Copilot 等会读取,Claude Code 与 Codex 默认不读。不确定时用 --dir 指定,或让该智能体自行安装。
|
|
132
|
-
|
|
133
|
-
## 使用示例(AI 智能体)
|
|
134
|
-
|
|
135
|
-
1. 将本仓库的 SKILL.md 接入任意 AI 智能体的技能/规则系统(见上方安装)。
|
|
136
|
-
2. 收到一段 AI 味很重的文稿时,先跑一次检测:
|
|
108
|
+
|
|
109
|
+
### Method 3: GitHub Download ZIP (manual / no git)
|
|
110
|
+
|
|
111
|
+
On the GitHub repository `YottaMeta/yotta-humanize`, click **Code → Download ZIP**, unzip it and put the `yotta-humanize` folder into the agent's skills directory.
|
|
112
|
+
|
|
113
|
+
### Method 4: install.sh (multi-agent one-liner script)
|
|
114
|
+
|
|
115
|
+
```text
|
|
116
|
+
bash install.sh --agent <name> # install to the agent's default user-level directory
|
|
117
|
+
bash install.sh --dir <path> # install to the given directory
|
|
118
|
+
bash install.sh --list # list agents -> default directories
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
> Method 1 uses the npm registry (npmmirror / npmjs) and does not depend on GitHub; Methods 2/3 use GitHub and may fail without a proxy in China.
|
|
122
|
+
## Usage examples (AI agent)
|
|
123
|
+
|
|
124
|
+
1. Hook this repo's SKILL.md into any AI agent's skill/rule system (see install above).
|
|
125
|
+
2. When you receive a heavily AI-flavored draft, run a detection first:
|
|
137
126
|
```bash
|
|
138
127
|
python3 scripts/yotta_humanize.py analyze -f draft.md
|
|
139
128
|
```
|
|
140
|
-
|
|
141
|
-
3.
|
|
129
|
+
Check the score and matched rules (empty uplift / jargon / clichés / chat residue, etc.).
|
|
130
|
+
3. Apply direct mechanical rewrites for the unambiguous parts:
|
|
142
131
|
```bash
|
|
143
132
|
python3 scripts/yotta_humanize.py rewrite -f draft.md
|
|
144
133
|
```
|
|
145
|
-
|
|
146
|
-
4.
|
|
147
|
-
5.
|
|
134
|
+
Review against the fix list and write the rewritten text back into the draft.
|
|
135
|
+
4. For parts that need judgment (splitting parallel constructions, adding sources for vague attribution, softening absolutism), polish by hand following the suggest output.
|
|
136
|
+
5. After rewriting, score once more to confirm the score dropped and the original meaning is intact.
|
|
137
|
+
|
|
138
|
+
## Boundaries
|
|
139
|
+
|
|
140
|
+
- **Text-only, no generation** — it edits existing text; it does not create new content, and it does not alter facts / data / proper nouns against the author's intent.
|
|
141
|
+
- **Rewrites are suggestions** — unambiguous transforms apply directly; judgment-heavy rewrites are listed as suggestions for the human to confirm.
|
|
142
|
+
- **No model dependency** — deterministic rules only; results are reproducible and explainable.
|
|
143
|
+
|
|
144
|
+
## Development & validation
|
|
145
|
+
|
|
146
|
+
- Tests: python scripts/test_yotta_humanize.py (155 tests; Windows: python)
|
|
147
|
+
- Base validation: python tools/validate-skill.py yotta-humanize (run at the repo root)
|
|
148
|
+
- Rule catalog: references/patterns.md; scoring formula: references/scoring.md; rewriting rules: references/rewriting.md
|
|
149
|
+
|
|
150
|
+
Keep tests green and bump the version before releasing changes.
|
|
148
151
|
|
|
149
|
-
##
|
|
152
|
+
## Changelog
|
|
150
153
|
|
|
151
|
-
|
|
152
|
-
- 基础校验:python tools/validate-skill.py yotta-humanize(在仓库根目录运行)
|
|
153
|
-
- 规则目录:references/patterns.md;评分公式:references/scoring.md;改写规则:references/rewriting.md
|
|
154
|
+
See [CHANGELOG.md](./CHANGELOG.md).
|
|
154
155
|
|
|
155
|
-
##
|
|
156
|
+
## License
|
|
156
157
|
|
|
157
|
-
MIT © YottaMeta
|
|
158
|
+
[MIT](./LICENSE) © YottaMeta. "Yuanzhen" / "yotta-humanize" and the YottaMeta family names (yotta-* prefix) are YottaMeta brand identifiers; derived works must not reuse them, see [NOTICE](./NOTICE). The de-AI-flavor direction references open-source humanizer-style skills; the implementation is YottaMeta's own Chinese-corpus code.
|
package/README.zh-CN.md
ADDED
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
<p align="center"><b>Language</b>: <a href="./README.md">English</a> · 中文</p>
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
<p align="center">
|
|
5
|
+
<img src="assets/banner.png" alt="yotta-humanize banner" width="100%" />
|
|
6
|
+
</p>
|
|
7
|
+
|
|
8
|
+
<h1 align="center">yotta-humanize · 元真</h1>
|
|
9
|
+
|
|
10
|
+
<p align="center">YottaMeta 自有的去 AI 味中文写作编辑技能:<b>检测器引擎(24 类规则 + 词表 + 统计突发性)</b>识别 AI 腔文本,并给出确定性改写,让中文写作更自然、更像人写的。适用于编辑 / 润色文本、给 AI 生成的中文稿件做检测与改写。</p>
|
|
11
|
+
<p align="center">检测到空泛升华、套话、AI 黑话(赋能 / 闭环 / 抓手)、同义堆叠、排比三连、聊天残渣(希望对你有所帮助)等 AI 腔特征时自动激活——<b>不靠提示词兜底,按规则确定性判定</b>。</p>
|
|
12
|
+
<p align="center">纯 Python 3.8+ 标准库实现,零外部依赖;Windows + Linux + macOS 通用;检测 + 改写全流程,改写不依赖模型。</p>
|
|
13
|
+
|
|
14
|
+
<p align="center">
|
|
15
|
+
<a href="LICENSE"><img alt="License: MIT" src="https://img.shields.io/badge/license-MIT-blue" /></a>
|
|
16
|
+
<a href="https://agentskills.io/"><img alt="Standard: agentskills.io" src="https://img.shields.io/badge/standard-agentskills.io-orange" /></a>
|
|
17
|
+
<a href="https://www.npmjs.com/package/@yottameta/yotta-humanize"><img alt="npm package" src="https://img.shields.io/npm/v/@yottameta/yotta-humanize" /></a>
|
|
18
|
+
<a href="https://github.com/YottaMeta/yotta-humanize"><img alt="GitHub stars" src="https://img.shields.io/github/stars/YottaMeta/yotta-humanize" /></a>
|
|
19
|
+
<a href="https://github.com/YottaMeta/yotta-humanize/commits/main"><img alt="last commit" src="https://img.shields.io/github/last-commit/YottaMeta/yotta-humanize" /></a>
|
|
20
|
+
<a href="https://github.com/YottaMeta/yotta-humanize"><img alt="PRs welcome" src="https://img.shields.io/badge/PRs-welcome-brightgreen" /></a>
|
|
21
|
+
</p>
|
|
22
|
+
|
|
23
|
+
## 这是什么
|
|
24
|
+
|
|
25
|
+
AI 生成的中文文本有一眼可辨的「AI 腔」:空泛升华(标志着 / 彰显了)、套话(众所周知 / 综上所述 / 未来可期)、黑话(赋能 / 闭环 / 抓手 / 颗粒度)、机械列举(首先 / 其次 / 再次)、聊天残渣(希望对你有所帮助)……元真把这些特征做成**确定性检测器引擎**:24 类规则(词表 + 句式正则)+ 中文统计突发性(句长均匀度 / 词汇多样性),输出 0-100 的 AI 腔评分,并给出**确定性改写**(词表替换、套话删除、聊天残渣清理、标点限流)。
|
|
26
|
+
|
|
27
|
+
它不是某个平台的专属功能,而是一份与智能体无关的工具包:装进任何支持 Agent Skills 的智能体即可按需调用。全程零依赖、不调模型;需要判断的改写以建议形式给出,不强行自动改。
|
|
28
|
+
|
|
29
|
+
## 核心价值
|
|
30
|
+
|
|
31
|
+
- **24 类检测规则**:内容(空泛升华 / 套话开头结尾 / 模糊归因 / 绝对化)/ 语言(AI 黑话 / 同义堆叠 / 名词化堆砌 / 「我们」滥用)/ 句式(排比三连 / 机械列举 / 反问堆叠 / 标点滥用)/ 沟通(聊天残渣 / 奉承讨好 / 免责回避)/ 废话(填充 / 转折 / 重复声明)。
|
|
32
|
+
- **统计突发性**:句长均匀度(CV)、突发性、双字词汇多样性(TTR)、逗号密度——补规则检测不到的节奏问题。
|
|
33
|
+
- **确定性改写**:无歧义机械变换直接改(赋能→支持、抓手→切入点、众所周知 / 综上所述 删除、希望对你有所帮助 清理、破折号 / 感叹号限流),输出修复清单与前后评分。
|
|
34
|
+
- **机器可读**:--json 输出纯净 JSON;score --gate 接入 CI / 发布前检查。
|
|
35
|
+
- **中文优先**:词表、句式、改写映射全部针对中文语料自研整理,与英文 humanizer 类技能无共享代码。
|
|
36
|
+
|
|
37
|
+
## 核心优势
|
|
38
|
+
|
|
39
|
+
| 优势 | 说明 |
|
|
40
|
+
|---|---|
|
|
41
|
+
| **零依赖** | Python 3.8+ 标准库,无模型、无数据库、无外部服务;Windows + Linux + macOS 通用 |
|
|
42
|
+
| **确定性** | 规则判定可复现、可解释;改写是确定性变换,不依赖模型概率 |
|
|
43
|
+
| **中文优先** | 针对中文 AI 腔(黑话 / 套话 / 排比 / 聊天残渣)自研词表与句式,非英文规则直译 |
|
|
44
|
+
| **检测 + 改写一体** | score / analyze / report / suggest / rewrite 全流程,一条命令从检测到改写 |
|
|
45
|
+
| **可复核** | 改写输出修复清单与前后评分,人工可逐条核对 |
|
|
46
|
+
| **生态分发** | GitHub + npm + ClawHub 三源同步发布;npx / git clone / Download ZIP / install.sh 四种安装方式 |
|
|
47
|
+
|
|
48
|
+
## 功能体系
|
|
49
|
+
|
|
50
|
+
| 能力 | 说明 |
|
|
51
|
+
|---|---|
|
|
52
|
+
| score | 输出 AI 腔评分(0-100),--gate 可做 CI 拦截(退出码 1) |
|
|
53
|
+
| analyze | 详细检测报告(文本 / --json),含命中规则、上下文片段、建议 |
|
|
54
|
+
| report | Markdown 检测报告(统计表 + 命中规则) |
|
|
55
|
+
| suggest | 按优先级分组的改写建议 |
|
|
56
|
+
| rewrite | 确定性改写:替换 / 删除 AI 腔,输出修复清单 + 改写后文本 + 前后评分 |
|
|
57
|
+
| version | 打印版本 |
|
|
58
|
+
|
|
59
|
+
## 快速使用
|
|
60
|
+
|
|
61
|
+
Windows 用 python,Linux/macOS 用 python3。
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
# 评分(0-100,越高越像 AI 写的)
|
|
65
|
+
python3 scripts/yotta_humanize.py score -f article.md
|
|
66
|
+
|
|
67
|
+
# 详细检测报告
|
|
68
|
+
python3 scripts/yotta_humanize.py analyze -f article.md
|
|
69
|
+
|
|
70
|
+
# Markdown 报告
|
|
71
|
+
python3 scripts/yotta_humanize.py report -f article.md > report.md
|
|
72
|
+
|
|
73
|
+
# 按优先级分组的改写建议
|
|
74
|
+
python3 scripts/yotta_humanize.py suggest -f article.md
|
|
75
|
+
|
|
76
|
+
# 确定性改写(输出改写后文本 + 修复清单)
|
|
77
|
+
python3 scripts/yotta_humanize.py rewrite -f article.md
|
|
78
|
+
|
|
79
|
+
# 管道输入
|
|
80
|
+
cat article.md | python3 scripts/yotta_humanize.py score --stdin
|
|
81
|
+
|
|
82
|
+
# CI 拦截:评分 >= 阈值时退出码 1
|
|
83
|
+
python3 scripts/yotta_humanize.py score -f article.md --gate --threshold 45
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
退出码语义(与元安 / 元审 / 元盾家族一致):0 = 成功;1 = score --gate 且评分达到阈值;4 = 用法错误 / 致命异常。
|
|
87
|
+
|
|
88
|
+
## 安装
|
|
89
|
+
|
|
90
|
+
以下四种方式任选,顺序即推荐优先级;技能文件一律从 **npm** 获取(GitHub 无代理较慢,npm 支持镜像)。
|
|
91
|
+
|
|
92
|
+
### 方式一:npm 一行装(推荐)
|
|
93
|
+
|
|
94
|
+
```text
|
|
95
|
+
# 可选国内加速:npm config set registry https://registry.npmmirror.com
|
|
96
|
+
npx -y @yottameta/yotta-humanize --agent <智能体名称> # 装到指定智能体默认用户级技能目录
|
|
97
|
+
npx -y @yottameta/yotta-humanize --dir <智能体的技能目录> # 指到技能目录本身(如 ~/.codex/skills)
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
- `--agent <name>` 自动装到该智能体默认用户级目录;`--list` 可查看各智能体默认目录。
|
|
101
|
+
- `--dir <路径>` 装到指定的技能目录;未收录的智能体用 `--dir` 指到它的技能目录。
|
|
102
|
+
- npmmirror 未同步新包(404):加 `--registry=https://registry.npmjs.org/`(国内需代理),或稍等镜像缓存。
|
|
103
|
+
|
|
104
|
+
### 方式二:git clone(开发者 / 有 git 环境)
|
|
105
|
+
|
|
106
|
+
```text
|
|
107
|
+
git clone https://github.com/YottaMeta/yotta-humanize.git <智能体的技能目录>/yotta-humanize
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### 方式三:GitHub 下载压缩包(手动 / 无 git 环境)
|
|
111
|
+
|
|
112
|
+
在 GitHub 仓库 `YottaMeta/yotta-humanize` 点 **Code → Download ZIP**,解压后把 `yotta-humanize` 文件夹放进智能体技能目录。
|
|
113
|
+
|
|
114
|
+
### 方式四:install.sh(多智能体一键脚本)
|
|
115
|
+
|
|
116
|
+
```text
|
|
117
|
+
bash install.sh --agent <name> # 装到指定智能体默认用户级目录
|
|
118
|
+
bash install.sh --dir <path> # 装到指定目录
|
|
119
|
+
bash install.sh --list # 列出智能体 -> 默认目录
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
> 方式一走 npm 源(npmmirror / npmjs),不依赖 GitHub;方式二 / 三走 GitHub,国内无代理可能失败。
|
|
123
|
+
## 使用示例(AI 智能体)
|
|
124
|
+
|
|
125
|
+
1. 将本仓库的 SKILL.md 接入任意 AI 智能体的技能/规则系统(见上方安装)。
|
|
126
|
+
2. 收到一段 AI 味很重的文稿时,先跑一次检测:
|
|
127
|
+
```bash
|
|
128
|
+
python3 scripts/yotta_humanize.py analyze -f draft.md
|
|
129
|
+
```
|
|
130
|
+
看评分与命中规则(空泛升华 / 黑话 / 套话 / 聊天残渣等)。
|
|
131
|
+
3. 无歧义的部分直接机械改写:
|
|
132
|
+
```bash
|
|
133
|
+
python3 scripts/yotta_humanize.py rewrite -f draft.md
|
|
134
|
+
```
|
|
135
|
+
对照修复清单确认,把改写后文本落回稿件。
|
|
136
|
+
4. 需要判断的部分(排比拆句、模糊归因补来源、绝对化软化)按 suggest 的建议手工润色。
|
|
137
|
+
5. 改写完再 score 一次,确认评分下降、原意未破坏。
|
|
138
|
+
|
|
139
|
+
## 开发与校验
|
|
140
|
+
|
|
141
|
+
- 测试:python scripts/test_yotta_humanize.py(155 项)
|
|
142
|
+
- 基础校验:python tools/validate-skill.py yotta-humanize(在仓库根目录运行)
|
|
143
|
+
- 规则目录:references/patterns.md;评分公式:references/scoring.md;改写规则:references/rewriting.md
|
|
144
|
+
|
|
145
|
+
## 许可证
|
|
146
|
+
|
|
147
|
+
MIT © YottaMeta —— 详见 [LICENSE](./LICENSE)。
|
package/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: yotta-humanize
|
|
3
|
-
version: 0.1.
|
|
3
|
+
version: 0.1.2
|
|
4
4
|
description: 元真 —— 去 AI 味的中文写作编辑技能:检测器引擎(24 类规则 + 词表 + 统计突发性)识别并改写 AI 腔文本,让中文写作更自然、更像人写的。触发:编辑 / 润色文本、去 AI 味、让文章 / 文案 / 回复更像人写、发现文本充斥着 AI 常用词与句式(赋能 / 闭环 / 值得注意的是 / 综上所述 / 希望对你有所帮助 等)、给 AI 生成的中文稿件做检测与改写。边界:只处理文本,不生成新内容;不改写事实 / 数据 / 专有名词;不破坏作者原意;改写为确定性规则,不依赖模型。
|
|
5
5
|
license: MIT
|
|
6
6
|
---
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yottameta/yotta-humanize",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "元真
|
|
3
|
+
"version": "0.1.2",
|
|
4
|
+
"description": "Yuanzhen (元真) — AI-flavor remover for Chinese writing: a detector engine (24 rule classes + wordlists + statistical burstiness) that identifies and rewrites AI-typical Chinese text to make it read more naturally. Triggers when editing/polishing text, removing AI flavor, or making copy read more human. Boundaries: text-only, deterministic rewrites, no model dependency.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"agent-skills",
|
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
"assets",
|
|
18
18
|
"bin",
|
|
19
19
|
"NOTICE",
|
|
20
|
-
"CHANGELOG.md"
|
|
20
|
+
"CHANGELOG.md",
|
|
21
|
+
"README.zh-CN.md"
|
|
21
22
|
],
|
|
22
23
|
"repository": {
|
|
23
24
|
"type": "git",
|