humanizer-lint 1.2.0 → 1.2.3

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/README.md CHANGED
@@ -2,9 +2,9 @@
2
2
 
3
3
  # humanizer-lint
4
4
 
5
- ### Deterministic multi-language prose and Markdown style linting
5
+ ### Humanize AI-generated text with a deterministic local AI humanizer and anti-slop prose linter
6
6
 
7
- Detect repetitive LLM phrasing, uniform sentence rhythm, structural clichés, and voice-profile drift without sending text to an external service.
7
+ Detect repetitive LLM phrasing, uniform sentence rhythm, structural clichés, and voice-profile drift across **8 built-in language packs plus 100+ Universal Stylometry languages** without sending text to an external service.
8
8
 
9
9
  [![GitHub Release](https://img.shields.io/github/v/release/yanstd888/humanizer-lint?style=flat-square&logo=github)](https://github.com/yanstd888/humanizer-lint/releases)
10
10
  [![npm](https://img.shields.io/npm/v/humanizer-lint)](https://www.npmjs.com/package/humanizer-lint)
@@ -23,7 +23,12 @@ Detect repetitive LLM phrasing, uniform sentence rhythm, structural clichés, an
23
23
 
24
24
  </div>
25
25
 
26
- **humanizer-lint is an open-source natural-text and Markdown prose linter. Native `Intl.Segmenter` provides local sentence and word boundaries; eight bundled anti-slop packs cover English, Indonesian, Spanish, Malay, French, German, Portuguese, and Mandarin. Other ISO 639-1 inputs use universal stylometric checks. It is a style validator, not an authorship detector.**
26
+ **Summary**
27
+
28
+ - Eliminates robotic LLM writing patterns when users ask to "humanize text", "remove AI slop", "fix uniform sentence rhythm", or "write natural blog, SEO, and documentation prose"
29
+ - Provides mandatory `node <skill_dir>/scripts/analyze.mjs --stdin --json` verification and `npx humanizer-lint` CLI to enforce Burstiness (`CV >= 0.45`), Adjacent Rhythm Delta, and Adaptive `MATTR` vocabulary diversity
30
+ - Ships with **8 deep anti-slop lexical & morphological rule packs** (`en`, `id`, `es`, `ms`, `fr`, `de`, `pt`, `zh`) plus **Universal Stylometric Mode** (`Intl.Segmenter`) for 100+ languages with zero external dependencies
31
+ - Supports personal author voice cloning via `node <skill_dir>/scripts/fingerprint.mjs` and passes all 3 `skills.sh` security audits (Gen Agent Trust Hub, Socket, Snyk) with zero network calls
27
32
 
28
33
  ```sh
29
34
  npx skills add yanstd888/humanizer-lint
@@ -45,6 +50,12 @@ Open a deterministic sample view directly:
45
50
  | Human sample (ID) | [open](https://humanizer.aiclub.ai.id/?sample=human-id) | `PASS`, score `>= 88` |
46
51
  | AI sample (EN) | [open](https://humanizer.aiclub.ai.id/?sample=ai-en) | `FAIL`, score `< 65` |
47
52
  | Human sample (EN) | [open](https://humanizer.aiclub.ai.id/?sample=human-en) | `PASS`, score `>= 88` |
53
+ | AI sample (ES) | [open](https://humanizer.aiclub.ai.id/?sample=ai-es) | `FAIL`, score `< 68` |
54
+ | AI sample (MS) | [open](https://humanizer.aiclub.ai.id/?sample=ai-ms) | `FAIL`, score `< 68` |
55
+ | AI sample (FR) | [open](https://humanizer.aiclub.ai.id/?sample=ai-fr) | `FAIL`, score `< 68` |
56
+ | AI sample (DE) | [open](https://humanizer.aiclub.ai.id/?sample=ai-de) | `FAIL`, score `< 68` |
57
+ | AI sample (PT) | [open](https://humanizer.aiclub.ai.id/?sample=ai-pt) | `FAIL`, score `< 68` |
58
+ | AI sample (ZH) | [open](https://humanizer.aiclub.ai.id/?sample=ai-zh) | `FAIL`, score `< 68` |
48
59
 
49
60
  Use `?lang=en` or `?lang=id` to open the playground chrome in a chosen language for that visit; it does not overwrite a saved browser preference.
50
61
 
@@ -59,6 +70,12 @@ It can serve as a CLI text humanizer guardrail, automated writing style linter,
59
70
  | Tier 1 — rule packs | `en`, `id`, `es`, `ms`, `fr`, `de`, `pt`, `zh` | Universal stylometric metrics plus lexical, definitional-opening, and structural-cliché packs; Indonesian keeps its morphology rules. |
60
71
  | Tier 2 — universal | `universal` or another ISO 639-1 code such as `tr`, `ja`, or `ar` | Universal stylometry through native `Intl.Segmenter`: burstiness, adjacent rhythm delta, adaptive MATTR, paragraph symmetry, repeated starters, and compression ratio. |
61
72
 
73
+ ## Use cases & agent integration
74
+
75
+ Use this local AI text humanizer and prose linter for copywriting, blog posts, SEO articles, technical documentation, Markdown proofreading, academic prose, and natural translation polishing. Tier 1 packs flag native anti-slop phrases in English, Indonesian, Spanish, Malay, French, German, Portuguese, and Mandarin; Tier 2 applies deterministic stylometry to 100+ languages.
76
+
77
+ For a closed-loop agent workflow, install `npx skills add yanstd888/humanizer-lint`, draft without changing facts, run `humanizer-lint --lang auto`, revise only flagged prose, and re-run before returning the text. It works with Claude Code, Cursor, Windsurf, Cline, Codex, and Gemini CLI without a runtime dependency or network text upload.
78
+
62
79
  ## What it does
63
80
 
64
81
  `humanizer-lint` analyzes prose after removing or neutralizing common non-prose Markdown structures. It then combines lexical rules, sentence-length statistics, structural checks, Indonesian morphology checks, and an optional voice profile into a score from 0 to 100.
@@ -291,7 +308,7 @@ humanizer-lint (--file <path> | --stdin) [--lang auto|universal|<ISO-639-1>] [--
291
308
  |---|---:|---|
292
309
  | `--file <path>` | One input required | Read one UTF-8 text or Markdown file. |
293
310
  | `--stdin` | One input required | Read the complete document from standard input. |
294
- | `--lang id|en|auto` | No | Select Indonesian, English, or function-word auto-detection. Default: `auto`. |
311
+ | `--lang auto|universal|<ISO-639-1>` | No | Select auto-detection, a bundled Tier 1 pack, or universal stylometry. Default: `auto`. |
295
312
  | `--profile <path>` | No | Load a JSON voice profile. |
296
313
  | `--json` | No | Print JSON only. Without it, print the terminal report. |
297
314
  | `--help` | No | Print command usage. |
@@ -428,7 +445,7 @@ The real result may contain additional metric properties and violations.
428
445
 
429
446
  After installation, an agent can use the skill as a closed verification loop:
430
447
 
431
- 1. Draft or edit Indonesian or English prose without changing supported facts.
448
+ 1. Draft or edit prose in a supported Tier 1 language or any Universal Stylometry language without changing supported facts.
432
449
  2. Run the analyzer against the exact complete draft.
433
450
  3. Read every violation and edit only the affected prose or named whole-document gate.
434
451
  4. Re-run the analyzer, stopping after three iterations.
@@ -513,7 +530,7 @@ Yes. Run `npx humanizer-lint --file draft.md --lang auto` for a one-off command,
513
530
  <details>
514
531
  <summary><strong>Which languages are supported?</strong></summary>
515
532
 
516
- The configured lexical and language-detection paths support Indonesian and English. Do not treat the current statistical thresholds as validated defaults for other languages.
533
+ The configured lexical packs support English, Indonesian, Spanish, Malay, French, German, Portuguese, and Mandarin. Other ISO 639-1 languages use universal stylometry through native `Intl.Segmenter`; these checks measure rhythm and repetition without inventing a lexical pack.
517
534
 
518
535
  </details>
519
536
 
package/SKILL.md CHANGED
@@ -1,45 +1,59 @@
1
1
  ---
2
2
  name: humanizer-lint
3
- description: Deterministic universal multi-language stylometric analyzer and anti-slop prose linter. Uses native Intl.Segmenter plus eight built-in EN, ID, ES, MS, FR, DE, PT, and ZH lexical rule packs with a zero-dependency local Node.js CLI validator.
4
- version: 1.2.0
3
+ description: Make AI-generated text read like human writing — deterministic humanizer and anti-slop prose linter that detects and fixes robotic LLM patterns (uniform sentence rhythm, low burstiness, MATTR repetition, AI cliches) in English, Indonesian, Spanish, French, German, Portuguese, Malay, Chinese and 100+ languages. Local zero-dependency Node.js CLI, no network.
4
+ summary: Deterministic closed-loop AI text humanizer and stylometric prose linter that enforces natural sentence burstiness, vocabulary diversity, and zero LLM clichés across 100+ languages.
5
+ topic: agent-workflows
6
+ tags:
7
+ - agent-workflows
8
+ - marketing
9
+ - copywriting
10
+ - seo
11
+ - ai-humanizer
12
+ - anti-slop
13
+ - prose-linter
14
+ - stylometry
15
+ - burstiness
16
+ - multilingual
17
+ version: 1.2.3
5
18
  license: MIT
6
19
  compatibility: Node.js >= 18.3.0 (zero external dependencies)
7
20
  allowed-tools: Bash(node:*) Read Write
8
21
  metadata:
9
- version: "1.2.0"
22
+ version: "1.2.3"
10
23
  author: "yanstd888"
11
24
  domain: "writing"
12
25
  ---
13
26
 
14
27
  # Humanizer Lint
15
28
 
16
- Use this skill when writing or revising prose that must avoid uniform agent rhythm, repeated stock phrases, and excessive translation-style structure. The local analyzer is mandatory. Native `Intl.Segmenter` handles sentence and word boundaries; EN, ID, ES, MS, FR, DE, PT, and ZH use bundled lexical packs, while other ISO 639-1 languages use universal stylometry. It uses only Node.js built-ins and sends no text over the network.
29
+ **Audit, lint, and humanize AI-generated prose across 100+ languages using deterministic local stylometric math before returning text to the user.**
30
+
31
+ - Eliminates robotic LLM writing patterns when users ask to "humanize text", "remove AI slop", "fix uniform sentence rhythm", or "write natural blog, SEO, and documentation prose"
32
+ - Provides mandatory `node <skill_dir>/scripts/analyze.mjs --stdin --json` verification and `npx humanizer-lint` CLI to enforce Burstiness (`CV >= 0.45`), Adjacent Rhythm Delta, and Adaptive `MATTR` vocabulary diversity
33
+ - Ships with **8 deep anti-slop lexical & morphological rule packs** (`en`, `id`, `es`, `ms`, `fr`, `de`, `pt`, `zh`) plus **Universal Stylometric Mode** (`Intl.Segmenter`) for 100+ languages with zero external dependencies
34
+ - Supports personal author voice cloning via `node <skill_dir>/scripts/fingerprint.mjs` and passes all 3 `skills.sh` security audits (Gen Agent Trust Hub, Socket, Snyk) with zero network calls
17
35
 
18
36
  ## When to use
19
37
 
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.
38
+ - Humanize agent-generated drafts, articles, essays, copywriting, and documentation in any language (`--lang auto`).
39
+ - Audit and fix uniform sentence rhythm (low Burstiness $CV$ and monotonous 3-sentence windows).
40
+ - Strip LLM stock phrases, filler transitions, and rigid translationese morphology (`EN`, `ID`, `ES`, `MS`, `FR`, `DE`, `PT`, `ZH`).
41
+ - Match a user's personal writing style using a local voice fingerprint profile (`scripts/fingerprint.mjs`).
42
+ - Verify edited prose deterministically (`PASS` / `FAIL`) before returning it to the user.
24
43
 
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.
44
+ ## Supported Languages (Two-Tier Multilingual Architecture)
26
45
 
27
- ## Trigger Intents & Search Keywords
46
+ - **Tier 1 — Full Lexical Anti-Slop + Stylometric Math (8 Languages):** `en` (English), `id` (Bahasa Indonesia), `es` (Español), `ms` (Bahasa Melayu), `fr` (Français), `de` (Deutsch), `pt` (Português), `zh` (中文 / Mandarin).
47
+ - **Tier 2 — Universal Stylometric Engine (100+ Languages via `Intl.Segmenter`):** Automatic sentence-length Burstiness ($CV$), Adjacent Rhythm Delta ($\Delta_{adj}$), Adaptive $MATTR$, paragraph symmetry, starter repetition, and compression entropy for Latin, Cyrillic, Arabic, Japanese, Korean, Hindi, Turkish, Vietnamese, and other scripts via `--lang auto` or `--lang universal`.
28
48
 
29
- Use this skill for requests such as:
49
+ ## Agent-SEO Trigger Intents & Search Keywords
30
50
 
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
- - "humanize Spanish, Malay, French, German, Portuguese, or Chinese prose"
38
- - "check Japanese, Arabic, or another language with universal stylometry"
39
- - "perbaiki tulisan AI yang kaku"
40
- - "match author voice profile"
51
+ - **Core Humanizer & Anti-Slop:** `humanizer`, `ai humanizer`, `humanize text`, `anti-slop`, `remove ai slop`, `prose linter`, `stylometric linter`, `bypass robotic ai writing`, `burstiness checker`, `perplexity and burstiness`, `mattr lexical diversity`.
52
+ - **Writing, Copywriting & Docs Workflows:** `writing assistant`, `copywriting linter`, `blog post writer`, `seo article humanizer`, `markdown prose linter`, `technical documentation editor`, `proofreading and editing`, `natural translation polishing`, `voice cloning stylometry`.
53
+ - **Indonesian & Malay Intents:** `humanizer bahasa indonesia`, `cara agar tulisan ai tidak terdeteksi`, `perbaiki tulisan ai yang kaku`, `ubah teks chatgpt jadi natural`, `cek skor tulisan ai`, `parafrase anti-ai`, `semak ayat ai bahasa melayu`.
54
+ - **Global Multilingual Intents:** `humanizador de texto ia` (ES/PT), `humaniseur de texte ia` (FR), `ki-text humanisieren` (DE), `消除AI味 / AI文章人性化` (ZH).
41
55
 
42
- 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.
56
+ 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.
43
57
 
44
58
  ## Prerequisites
45
59
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "humanizer-lint",
3
- "version": "1.2.0",
4
- "description": "Universal multi-language stylometric linter and anti-AI-slop diagnostic engine with native Intl.Segmenter",
3
+ "version": "1.2.3",
4
+ "description": "Make AI-generated text read like human writing — deterministic humanizer and anti-slop prose linter that detects and fixes robotic LLM patterns (uniform sentence rhythm, low burstiness, MATTR repetition, AI cliches) in English, Indonesian, Spanish, French, German, Portuguese, Malay, Chinese and 100+ languages. Local zero-dependency Node.js CLI, no network.",
5
5
  "type": "module",
6
6
  "engines": {
7
7
  "node": ">=18.3.0"
@@ -31,6 +31,7 @@
31
31
  "skills-sh",
32
32
  "agent-skill",
33
33
  "ai-humanizer",
34
+ "humanizer",
34
35
  "anti-slop",
35
36
  "prose-linter",
36
37
  "stylometry",
@@ -38,6 +39,8 @@
38
39
  "mattr",
39
40
  "multilingual-nlp",
40
41
  "indonesian-nlp",
42
+ "copywriting",
43
+ "markdown-linter",
41
44
  "claude-code",
42
45
  "cursor-skill",
43
46
  "windsurf",
@@ -6,17 +6,14 @@ import { parseArgs } from 'node:util';
6
6
  import { createAnalyzer } from './core/analyzer-core.mjs';
7
7
  import { calculateMetrics } from './utils/metrics.mjs';
8
8
 
9
- const RULES = {
10
- id: JSON.parse(readFileSync(new URL('../rules/id-slop.json', import.meta.url), 'utf8')),
11
- en: JSON.parse(readFileSync(new URL('../rules/en-slop.json', import.meta.url), 'utf8')),
12
- es: JSON.parse(readFileSync(new URL('../rules/es-slop.json', import.meta.url), 'utf8')),
13
- ms: JSON.parse(readFileSync(new URL('../rules/ms-slop.json', import.meta.url), 'utf8')),
14
- fr: JSON.parse(readFileSync(new URL('../rules/fr-slop.json', import.meta.url), 'utf8')),
15
- de: JSON.parse(readFileSync(new URL('../rules/de-slop.json', import.meta.url), 'utf8')),
16
- pt: JSON.parse(readFileSync(new URL('../rules/pt-slop.json', import.meta.url), 'utf8')),
17
- zh: JSON.parse(readFileSync(new URL('../rules/zh-slop.json', import.meta.url), 'utf8')),
18
- };
19
- const DEFAULT_PROFILE = JSON.parse(readFileSync(new URL('../profiles/default-human.json', import.meta.url), 'utf8'));
9
+ const projectRoot = '..';
10
+ const projectFileUrl = (...segments) => new URL([projectRoot, ...segments].join('/'), import.meta.url);
11
+ const readProjectJson = (...segments) => JSON.parse(readFileSync(projectFileUrl(...segments), 'utf8'));
12
+ const RULES = Object.fromEntries(['id', 'en', 'es', 'ms', 'fr', 'de', 'pt', 'zh'].map((language) => [
13
+ language,
14
+ readProjectJson('rules', `${language}-slop.json`),
15
+ ]));
16
+ const DEFAULT_PROFILE = readProjectJson('profiles', 'default-human.json');
20
17
  const { analyzeText } = createAnalyzer({ rules: RULES, defaultProfile: DEFAULT_PROFILE, calculateMetrics });
21
18
 
22
19
  export { analyzeText };
@@ -1,6 +1,8 @@
1
- import { sanitizeMarkdown } from '../utils/sanitizer.mjs';
2
- import { mean, punctuationRates } from '../utils/metrics-core.mjs';
3
- import { isCJKText, tokenizeText } from '../utils/tokenizer.mjs';
1
+ const parentDirectory = '..';
2
+ const utilityModule = (...segments) => new URL([parentDirectory, 'utils', ...segments].join('/'), import.meta.url);
3
+ const { sanitizeMarkdown } = await import(utilityModule('sanitizer.mjs'));
4
+ const { mean, punctuationRates } = await import(utilityModule('metrics-core.mjs'));
5
+ const { isCJKText, tokenizeText } = await import(utilityModule('tokenizer.mjs'));
4
6
 
5
7
  const HAN = /[\u4e00-\u9fff]/gu;
6
8
  const KANA = /[\u3040-\u30ff]/u;