humanizer-lint 0.2.3 → 1.1.0

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/SKILL.md CHANGED
@@ -1,116 +1,132 @@
1
- ---
2
- name: humanizer-lint
3
- description: Closed-loop stylometric linter and anti-AI-slop validator for Indonesian and English prose. Use when writing, editing, humanizing, or auditing articles, essays, documentation, and copy.
4
- license: MIT
5
- compatibility: Node.js >= 18.3.0 (zero external dependencies)
6
- allowed-tools: Bash(node:*) Read Write
7
- metadata:
8
- version: "0.2.3"
9
- author: "yanstd888"
10
- domain: "writing"
11
- ---
12
-
13
- # Humanizer Lint
14
-
15
- Use this skill when writing or revising Indonesian or English prose that must avoid uniform agent rhythm, repeated stock phrases, and excessive translation-style structure. The local analyzer is mandatory. It uses only Node.js built-ins and sends no text over the network.
16
-
17
- ## When to use
18
-
19
- - Humanize an agent-generated draft in Indonesian or English.
20
- - Check prose for uniform sentence rhythm and repeated lexical templates.
21
- - Match a user voice profile generated from writing samples.
22
- - Verify edited prose before returning it.
23
-
24
- Do not use it to alter code, commands, structured data, quotations, legal language, or factual identifiers. The sanitizer excludes common Markdown structures, but the agent must still preserve meaning and supported facts.
25
-
26
- ## Prerequisites
27
-
28
- - Node.js 18.3 or newer.
29
- - Resolve this skill's installed directory as `<skill_dir>` at runtime.
30
- - Optional custom profile: `<skill_dir>/profiles/custom-voice.json`.
31
-
32
- ## Closed-loop protocol
33
-
34
- ### 1. Resolve context
35
-
36
- 1. Resolve `<skill_dir>` from this `SKILL.md`; never assume the current working directory.
37
- 2. Determine `id`, `en`, or `auto` from the requested output.
38
- 3. If `<skill_dir>/profiles/custom-voice.json` exists, pass it with `--profile`. Otherwise use the bundled default profile.
39
- 4. Keep source facts, names, numbers, dates, quotations, citations, and technical terms unchanged unless the user explicitly requests a factual edit.
40
-
41
- Completion criterion: language, analyzer path, and optional profile path are known before drafting.
42
-
43
- ### 2. Draft with asymmetric rhythm
44
-
45
- Write the first draft with concrete subjects and verbs. Mix short 2 to 6 word sentences with longer 26 to 38 word sentences where the meaning supports them. Avoid generic introductions and summary paragraphs that merely repeat earlier content.
46
-
47
- Do not distort meaning to hit a metric. Sentence-length variation must come from legitimate splitting, merging, or reordering of supported material.
48
-
49
- Completion criterion: the draft preserves every source claim and contains no invented detail.
50
-
51
- ### 3. Run deterministic verification
52
-
53
- Prefer stdin so the target repository remains clean:
54
-
55
- ```sh
56
- node <skill_dir>/scripts/analyze.mjs --stdin --lang auto --json
57
- ```
58
-
59
- Pipe the complete draft to stdin. With a custom profile:
60
-
61
- ```sh
62
- node <skill_dir>/scripts/analyze.mjs --stdin --lang auto --profile <skill_dir>/profiles/custom-voice.json --json
63
- ```
64
-
65
- Never skip this command. Read `status`, `score`, `metrics`, and every item in `violations`.
66
-
67
- Completion criterion: a parseable JSON report exists for the exact draft being considered.
68
-
69
- ### 4. Correct only flagged prose
70
-
71
- If `status` is `FAIL`:
72
-
73
- 1. Group overlapping violations by paragraph. Whole-text statistical diagnostics (`LOW_BURSTINESS`, `MISSING_SENTENCE_RANGE`, `LOW_ADJACENT_DELTA`, and `LOW_LEXICAL_DIVERSITY`) identify the global gate when no single sentence is solely responsible.
74
- 2. Edit only the cited sentences or paragraphs, or make the smallest whole-text rhythm correction named by a statistical diagnostic.
75
- 3. Follow each `fixInstruction` without adding or dropping facts.
76
- 4. Run the analyzer again on the complete revised draft.
77
- 5. Stop after three analyzer iterations.
78
-
79
- If `status` is `SKIP`, statistical stylometry is unavailable. Fix any lexical violations that are still reported, preserve the short form, and state that the statistical gate was skipped because the text is too short.
80
-
81
- If the third iteration still returns `FAIL`, do not present the draft as verified. Return the remaining diagnostics and ask whether the user wants a broader rewrite.
82
-
83
- Completion criterion: return prose only after `PASS`, or an explicitly labeled short-text `SKIP` with no unresolved lexical violations.
84
-
85
- ## Analyzer commands
86
-
87
- ```sh
88
- node <skill_dir>/scripts/analyze.mjs --file draft.md --lang id --json
89
- node <skill_dir>/scripts/analyze.mjs --file draft.md --lang en
90
- node <skill_dir>/scripts/analyze.mjs --stdin --lang auto --json
91
- node <skill_dir>/scripts/fingerprint.mjs --input samples --output <skill_dir>/profiles/custom-voice.json
92
- ```
93
-
94
- Exit codes:
95
-
96
- - `0`: `PASS` or `SKIP`.
97
- - `1`: analyzed successfully and returned `FAIL`.
98
- - `2`: invalid arguments, unreadable input, or malformed profile.
99
-
100
- ## Pitfalls
101
-
102
- - A high score does not prove human authorship. It proves only that the configured checks passed.
103
- - Very short text cannot support statistical stylometry.
104
- - Technical, legal, and intentionally repetitive prose may require a custom profile.
105
- - Do not rewrite unflagged paragraphs merely to increase the score.
106
- - Do not treat `voiceProfileDeviation` as an authorship probability; it is a relative distance from the selected profile.
107
-
108
- ## Verification
109
-
110
- Before returning revised prose:
111
-
112
- - [ ] Analyzer ran against the final exact text.
113
- - [ ] Final status is `PASS`, or an honest lexical-clean `SKIP` for short text.
114
- - [ ] No source fact, identifier, number, quotation, or citation changed unintentionally.
115
- - [ ] Only flagged prose was revised after the first analyzer pass.
116
- - [ ] No network service or external package was used.
1
+ ---
2
+ name: humanizer-lint
3
+ description: Deterministic AI text humanizer, anti-slop prose linter, and stylometric analyzer (EN/ID). Fixes uniform sentence rhythm, low burstiness (CV), MATTR vocabulary repetition, and LLM clichés using a local zero-dependency Node.js CLI validator.
4
+ version: 1.1.0
5
+ license: MIT
6
+ compatibility: Node.js >= 18.3.0 (zero external dependencies)
7
+ allowed-tools: Bash(node:*) Read Write
8
+ metadata:
9
+ version: "1.1.0"
10
+ author: "yanstd888"
11
+ domain: "writing"
12
+ ---
13
+
14
+ # Humanizer Lint
15
+
16
+ Use this skill when writing or revising Indonesian or English prose that must avoid uniform agent rhythm, repeated stock phrases, and excessive translation-style structure. The local analyzer is mandatory. It uses only Node.js built-ins and sends no text over the network.
17
+
18
+ ## When to use
19
+
20
+ - Humanize an agent-generated draft in Indonesian or English.
21
+ - Check prose for uniform sentence rhythm and repeated lexical templates.
22
+ - Match a user voice profile generated from writing samples.
23
+ - Verify edited prose before returning it.
24
+
25
+ Do not use it to alter code, commands, structured data, quotations, legal language, or factual identifiers. The sanitizer excludes common Markdown structures, but the agent must still preserve meaning and supported facts.
26
+
27
+ ## Trigger Intents & Search Keywords
28
+
29
+ Use this skill for requests such as:
30
+
31
+ - "humanize AI text"
32
+ - "remove AI slop and clichés"
33
+ - "bypass robotic writing patterns"
34
+ - "increase sentence burstiness and perplexity"
35
+ - "lint markdown documentation prose"
36
+ - "humanizer bahasa Indonesia"
37
+ - "perbaiki tulisan AI yang kaku"
38
+ - "match author voice profile"
39
+
40
+ These intents apply across Claude Code, Cursor, Windsurf, Cline, Codex, and Gemini CLI when the request needs deterministic EN/ID prose validation rather than an unmeasured rewrite.
41
+
42
+ ## Prerequisites
43
+
44
+ - Node.js 18.3 or newer.
45
+ - Resolve this skill's installed directory as `<skill_dir>` at runtime.
46
+ - Optional custom profile: `<skill_dir>/profiles/custom-voice.json`.
47
+
48
+ ## Closed-loop protocol
49
+
50
+ ### 1. Resolve context
51
+
52
+ 1. Resolve `<skill_dir>` from this `SKILL.md`; never assume the current working directory.
53
+ 2. Determine `id`, `en`, or `auto` from the requested output.
54
+ 3. If `<skill_dir>/profiles/custom-voice.json` exists, pass it with `--profile`. Otherwise use the bundled default profile.
55
+ 4. Keep source facts, names, numbers, dates, quotations, citations, and technical terms unchanged unless the user explicitly requests a factual edit.
56
+
57
+ Completion criterion: language, analyzer path, and optional profile path are known before drafting.
58
+
59
+ ### 2. Draft with asymmetric rhythm
60
+
61
+ Write the first draft with concrete subjects and verbs. Mix short 2 to 6 word sentences with longer 26 to 38 word sentences where the meaning supports them. Avoid generic introductions and summary paragraphs that merely repeat earlier content.
62
+
63
+ Do not distort meaning to hit a metric. Sentence-length variation must come from legitimate splitting, merging, or reordering of supported material.
64
+
65
+ Completion criterion: the draft preserves every source claim and contains no invented detail.
66
+
67
+ ### 3. Run deterministic verification
68
+
69
+ Prefer stdin so the target repository remains clean:
70
+
71
+ ```sh
72
+ node <skill_dir>/scripts/analyze.mjs --stdin --lang auto --json
73
+ ```
74
+
75
+ Pipe the complete draft to stdin. With a custom profile:
76
+
77
+ ```sh
78
+ node <skill_dir>/scripts/analyze.mjs --stdin --lang auto --profile <skill_dir>/profiles/custom-voice.json --json
79
+ ```
80
+
81
+ Never skip this command. Read `status`, `score`, `metrics`, and every item in `violations`.
82
+
83
+ Completion criterion: a parseable JSON report exists for the exact draft being considered.
84
+
85
+ ### 4. Correct only flagged prose
86
+
87
+ If `status` is `FAIL`:
88
+
89
+ 1. Group overlapping violations by paragraph. Whole-text statistical diagnostics (`LOW_BURSTINESS`, `MISSING_SENTENCE_RANGE`, `LOW_ADJACENT_DELTA`, and `LOW_LEXICAL_DIVERSITY`) identify the global gate when no single sentence is solely responsible.
90
+ 2. Edit only the cited sentences or paragraphs, or make the smallest whole-text rhythm correction named by a statistical diagnostic.
91
+ 3. Follow each `fixInstruction` without adding or dropping facts.
92
+ 4. Run the analyzer again on the complete revised draft.
93
+ 5. Stop after three analyzer iterations.
94
+
95
+ If `status` is `SKIP`, statistical stylometry is unavailable. Fix any lexical violations that are still reported, preserve the short form, and state that the statistical gate was skipped because the text is too short.
96
+
97
+ If the third iteration still returns `FAIL`, do not present the draft as verified. Return the remaining diagnostics and ask whether the user wants a broader rewrite.
98
+
99
+ Completion criterion: return prose only after `PASS`, or an explicitly labeled short-text `SKIP` with no unresolved lexical violations.
100
+
101
+ ## Analyzer commands
102
+
103
+ ```sh
104
+ node <skill_dir>/scripts/analyze.mjs --file draft.md --lang id --json
105
+ node <skill_dir>/scripts/analyze.mjs --file draft.md --lang en
106
+ node <skill_dir>/scripts/analyze.mjs --stdin --lang auto --json
107
+ node <skill_dir>/scripts/fingerprint.mjs --input samples --output <skill_dir>/profiles/custom-voice.json
108
+ ```
109
+
110
+ Exit codes:
111
+
112
+ - `0`: `PASS` or `SKIP`.
113
+ - `1`: analyzed successfully and returned `FAIL`.
114
+ - `2`: invalid arguments, unreadable input, or malformed profile.
115
+
116
+ ## Pitfalls
117
+
118
+ - A high score does not prove human authorship. It proves only that the configured checks passed.
119
+ - Very short text cannot support statistical stylometry.
120
+ - Technical, legal, and intentionally repetitive prose may require a custom profile.
121
+ - Do not rewrite unflagged paragraphs merely to increase the score.
122
+ - Do not treat `voiceProfileDeviation` as an authorship probability; it is a relative distance from the selected profile.
123
+
124
+ ## Verification
125
+
126
+ Before returning revised prose:
127
+
128
+ - [ ] Analyzer ran against the final exact text.
129
+ - [ ] Final status is `PASS`, or an honest lexical-clean `SKIP` for short text.
130
+ - [ ] No source fact, identifier, number, quotation, or citation changed unintentionally.
131
+ - [ ] Only flagged prose was revised after the first analyzer pass.
132
+ - [ ] No network service or external package was used.
package/package.json CHANGED
@@ -1,25 +1,47 @@
1
- {
2
- "name": "humanizer-lint",
3
- "version": "0.2.3",
4
- "description": "Closed-loop stylometric linter and anti-AI-slop diagnostic engine for Indonesian and English prose",
5
- "type": "module",
6
- "engines": {
7
- "node": ">=18.3.0"
8
- },
9
- "bin": {
10
- "humanizer-lint": "./scripts/analyze.mjs",
11
- "humanizer-fingerprint": "./scripts/fingerprint.mjs"
12
- },
13
- "files": [
14
- "SKILL.md",
15
- "README.md",
16
- "LICENSE",
17
- "scripts/",
18
- "rules/",
19
- "profiles/"
20
- ],
21
- "scripts": {
22
- "test": "node --test tests/test-runner.mjs"
23
- },
24
- "license": "MIT"
25
- }
1
+ {
2
+ "name": "humanizer-lint",
3
+ "version": "1.1.0",
4
+ "description": "Closed-loop stylometric linter and anti-AI-slop diagnostic engine for Indonesian and English prose",
5
+ "type": "module",
6
+ "engines": {
7
+ "node": ">=18.3.0"
8
+ },
9
+ "bin": {
10
+ "humanizer-lint": "scripts/analyze.mjs",
11
+ "humanizer-fingerprint": "scripts/fingerprint.mjs"
12
+ },
13
+ "files": [
14
+ "SKILL.md",
15
+ "README.md",
16
+ "LICENSE",
17
+ "scripts/",
18
+ "rules/",
19
+ "profiles/"
20
+ ],
21
+ "scripts": {
22
+ "test": "node --test tests/test-runner.mjs",
23
+ "build:demo": "node demo/build.mjs"
24
+ },
25
+ "homepage": "https://humanizer.aiclub.ai.id",
26
+ "repository": {
27
+ "type": "git",
28
+ "url": "git+https://github.com/yanstd888/humanizer-lint.git"
29
+ },
30
+ "keywords": [
31
+ "skills-sh",
32
+ "agent-skill",
33
+ "ai-humanizer",
34
+ "anti-slop",
35
+ "prose-linter",
36
+ "stylometry",
37
+ "burstiness",
38
+ "mattr",
39
+ "indonesian-nlp",
40
+ "claude-code",
41
+ "cursor-skill",
42
+ "windsurf",
43
+ "codex",
44
+ "gemini-cli"
45
+ ],
46
+ "license": "MIT"
47
+ }