coroboros/agent-skills / skills/humanize-en
humanize-en
VerifiedRemove AI writing tells from English prose while preserving meaning, structure, code, links and quotations. Use for humanize this, remove AI slop and polish the English on inline text or prose files. Optional -f BRAND-VOICE.md applies brand rules with explicit mechanical and semantic coverage. Inherit authorized rewrite scope; audit/propose remains read-only. Structural README work belongs to write-clear-readme.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 18.1 KB |
| eval-corpus/brand-voice/brand-allcaps-01.json | config | 1.2 KB |
| eval-corpus/brand-voice/brand-clean-01.json | config | 1.3 KB |
| eval-corpus/brand-voice/brand-lexicon-01.json | config | 911 B |
| eval-corpus/brand-voice/brand-pronouns-01.json | config | 978 B |
| eval-corpus/brand-voice/brand-rewrite-rules-01.json | config | 946 B |
| eval-corpus/brand-voice/brand-rhetoric-01.json | config | 1.1 KB |
| eval-corpus/samples/clean-prose-01.json | config | 417 B |
| eval-corpus/samples/docs-intro-01.json | config | 631 B |
| eval-corpus/samples/hero-landing-01.json | config | 637 B |
| eval-corpus/samples/release-notes-01.json | config | 571 B |
| evals/evals.json | config | 2.8 KB |
| references/output-formats.md | markdown | 1.7 KB |
| references/patterns.md | markdown | 18.3 KB |
| references/schemas.md | markdown | 10.7 KB |
| references/voice.md | markdown | 2.8 KB |
| scripts/__init__.py | script | 0 B |
| scripts/brand_prescan.py | script | 28.0 KB |
| scripts/eval_patterns.pyexecutable | script | 5.3 KB |
| scripts/prescan.pyexecutable | script | 11.0 KB |
| scripts/utils.py | script | 1.6 KB |
| scripts/validate.py | script | 7.0 KB |
scripts/utils.py
View on GitHub#!/usr/bin/env python3
"""
utils.py — shared I/O and helpers for humanize-en scripts.
Requires Python 3.7+. No third-party dependencies.
"""
from __future__ import annotations
import json
import random
import sys
from pathlib import Path
# Mirrors the skill-creator seed for reproducible sampling.
SEED = 42
def read_text(path_or_dash):
"""Read UTF-8 text from a path, or stdin if path is '-'.
Raises FileNotFoundError if the path does not resolve.
"""
if path_or_dash == "-":
return sys.stdin.read()
path = Path(path_or_dash)
if not path.is_file():
raise FileNotFoundError(f"file not found: {path_or_dash}")
return path.read_text(encoding="utf-8")
def read_json(path_or_dash):
"""Read JSON from a path, or stdin if path is '-'."""
return json.loads(read_text(path_or_dash))
def write_json(obj, path=None, indent=2):
"""Write JSON to a path, or stdout if path is None."""
output = json.dumps(obj, ensure_ascii=False, indent=indent)
if path is None:
print(output)
else:
Path(path).write_text(output + "\n", encoding="utf-8")
def mask_protected_regions(text, strict_code_only=False):
"""Replace protected regions with whitespace so eval scoring stays consistent
with prescan.py. Mirrors prescan.py:mask_protected_regions exactly — when
one changes, both must change."""
from prescan import mask_protected_regions as _mask # local import avoids cycle
return _mask(text, strict_code_only=strict_code_only)
def seeded_rng():
"""Return a Random instance seeded with the canonical seed."""
return random.Random(SEED)
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |