Bläddra i källkod

Simplify Humanizer packaging and README

Siqi Chen 3 veckor sedan
förälder
incheckning
e8d73e0d3f

+ 1 - 1
.claude-plugin/marketplace.json

@@ -10,7 +10,7 @@
     {
       "name": "humanizer",
       "source": "./",
-      "description": "Rewrite text that sounds AI-generated while keeping the writer's facts, meaning, and voice.",
+      "description": "Rewrite AI-sounding text so it reads naturally without changing what it says.",
       "license": "MIT",
       "keywords": ["writing", "editing", "ai-detection", "humanize", "prose", "style"]
     }

+ 4 - 3
.claude-plugin/plugin.json

@@ -1,8 +1,8 @@
 {
   "$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json",
   "name": "humanizer",
-  "description": "Rewrite text that sounds AI-generated while keeping the writer's facts, meaning, and voice.",
-  "version": "2.11.1",
+  "description": "Rewrite AI-sounding text so it reads naturally without changing what it says.",
+  "version": "2.11.2",
   "author": {
     "name": "blader",
     "url": "https://github.com/blader"
@@ -10,5 +10,6 @@
   "homepage": "https://github.com/blader/humanizer",
   "repository": "https://github.com/blader/humanizer",
   "license": "MIT",
-  "keywords": ["writing", "editing", "ai-detection", "humanize", "prose", "style"]
+  "keywords": ["writing", "editing", "ai-detection", "humanize", "prose", "style"],
+  "skills": ["./"]
 }

+ 0 - 26
.github/workflows/release.yml

@@ -1,26 +0,0 @@
-name: Publish Claude Desktop package
-
-on:
-  release:
-    types: [published]
-
-permissions:
-  contents: write
-
-jobs:
-  publish:
-    runs-on: ubuntu-latest
-    steps:
-      - uses: actions/checkout@v4
-        with:
-          ref: ${{ github.event.release.tag_name }}
-      - uses: actions/setup-python@v5
-        with:
-          python-version: "3.12"
-      - name: Build Claude Desktop archive
-        run: python3 scripts/build-skill-zip.py dist/humanizer-skill.zip
-      - name: Attach archive to release
-        env:
-          GH_TOKEN: ${{ github.token }}
-          RELEASE_TAG: ${{ github.event.release.tag_name }}
-        run: gh release upload "$RELEASE_TAG" dist/humanizer-skill.zip --clobber

+ 0 - 2
.github/workflows/validate.yml

@@ -21,8 +21,6 @@ jobs:
           python-version: "3.12"
       - name: Check package files
         run: python3 scripts/validate-package.py
-      - name: Check Claude Desktop archive
-        run: python3 scripts/build-skill-zip.py "${RUNNER_TEMP}/humanizer-skill.zip"
       - name: Check skill discovery
         run: npx --yes skills@1.5.20 add . --list
       - name: Check Claude marketplace

+ 3 - 5
AGENTS.md

@@ -10,12 +10,10 @@ Keep the skill portable. Do not write instructions that limit it to one or two a
 
 ## Key files
 
-- `SKILL.md` is the source of truth. It contains portable YAML metadata, 35 numbered patterns, and their examples.
-- `skills/humanizer/SKILL.md` links to the root skill for Claude Desktop and older plugin loaders. Do not replace the link with a copy or edit it as a separate file.
+- `SKILL.md` is the source of truth and the repo's only skill file. It contains portable YAML metadata, 35 numbered patterns, and their examples.
 - `README.md` explains installation, use, patterns, and version history.
-- `.claude-plugin/plugin.json` describes the Claude plugin.
+- `.claude-plugin/plugin.json` describes the Claude plugin and points its skill loader at the root `SKILL.md`.
 - `.claude-plugin/marketplace.json` lets users add this repo as a Claude marketplace.
-- `scripts/build-skill-zip.py` builds the symlink-free archive for Claude Desktop uploads.
 - `scripts/validate-package.py` checks package files and shared values.
 
 ## Rules for changes
@@ -26,7 +24,7 @@ Keep `SKILL.md` and `README.md` in sync.
 - **Version:** Keep the same version in `SKILL.md` under `metadata.version`, the first README version entry, and `.claude-plugin/plugin.json`. Do not add a top-level `version` field to the skill.
 - **Compatibility:** Keep install and use instructions neutral across agents. Names such as Claude Code, OpenCode, and Codex are examples, not limits.
 - **History:** Add a short README version note for any behavior change or non-obvious fix.
-- **Checks:** Before publishing, run `python3 scripts/validate-package.py`, `python3 scripts/build-skill-zip.py /tmp/humanizer-skill.zip`, `npx skills add . --list`, and `claude plugin validate .`.
+- **Checks:** Before publishing, run `python3 scripts/validate-package.py`, `npx skills add . --list`, and `claude plugin validate .`.
 
 ## Writing style
 

+ 41 - 72
README.md

@@ -2,73 +2,23 @@
 
 [![skills.sh installs](https://skills.sh/b/blader/humanizer)](https://skills.sh/blader/humanizer)
 
-Humanizer rewrites text that sounds AI-generated while keeping the writer's facts, meaning, and voice. The skill is plain Markdown and works in any agent that supports skills.
+Humanizer rewrites AI-sounding text so it reads like a person wrote it, without changing what it says. The skill is a Markdown file, so it works with any agent that supports skills.
 
-## Installation
-
-### Skills CLI
-
-Install Humanizer for all projects:
-
-```bash
-npx skills add blader/humanizer --global
-```
-
-Update an existing install:
-
-```bash
-npx skills update humanizer --global
-```
-
-Install it for every supported agent:
-
-```bash
-npx skills add blader/humanizer --global --agent '*'
-```
-
-Install it for one agent:
-
-```bash
-npx skills add blader/humanizer --global --agent <agent-name>
-```
-
-Omit `--global` to install it in the current project. Start a new agent session or reload skills after installation.
-
-### Claude Code plugin
-
-Claude Code users can also install Humanizer as a plugin:
-
-```
-/plugin marketplace add blader/humanizer
-/plugin install humanizer@humanizer
-```
-
-Run the installed skill with `/humanizer:humanizer`.
-
-The plugin links `skills/humanizer/SKILL.md` to the root `SKILL.md`. This lets Claude Desktop and older plugin loaders find the skill without creating a second prompt.
-
-### Claude Desktop upload
-
-Download [`humanizer-skill.zip`](https://github.com/blader/humanizer/releases/latest/download/humanizer-skill.zip) from the latest release when you install or replace Humanizer through the Claude Desktop GUI.
+## How it works
 
-Do not use GitHub's **Code > Download ZIP** archive for this. The source archive contains the plugin's internal symbolic link, which Claude Desktop rejects. The release package contains one regular file at `humanizer/SKILL.md`.
+Humanizer uses 35 patterns drawn from Wikipedia's ["Signs of AI writing"](https://en.wikipedia.org/wiki/Wikipedia:Signs_of_AI_writing), maintained by WikiProject AI Cleanup. It runs a three-step rewrite:
 
-### Manual
+1. Draft a more natural version without copying the source's shape.
+2. Check the draft for remaining AI patterns and any changed or invented claims.
+3. Revise again and return the final version.
 
-You can also place `SKILL.md` in any agent's skill folder.
+Humanizer does not add facts, names, numbers, dates, quotes, or citations. Any new detail must come from the source or the writer. For personal writing, it keeps the writer's personality. For technical or reference text, it stays neutral and plain. A writing sample can override the default style rules so the result sounds like the writer.
 
-For example:
+With pasted text, Humanizer returns a draft, a short audit, and the final rewrite. In file mode, it rewrites the prose in place and leaves code, data, frontmatter, and link targets alone.
 
-```bash
-git clone https://github.com/blader/humanizer.git /path/to/your/skills/humanizer
-```
-
-Or, if you already have this repo cloned:
+### Wikipedia's main point
 
-```bash
-mkdir -p /path/to/your/skills/humanizer
-cp SKILL.md /path/to/your/skills/humanizer/
-```
+> "LLMs use statistical algorithms to guess what should come next. The result tends toward the most statistically likely result that applies to the widest variety of cases."
 
 ## Usage
 
@@ -106,19 +56,9 @@ Now humanize this text:
 
 Humanizer matches the sample's rhythm, word choice, punctuation, and deliberate quirks.
 
-## How it works
-
-Humanizer uses patterns from Wikipedia's ["Signs of AI writing"](https://en.wikipedia.org/wiki/Wikipedia:Signs_of_AI_writing), maintained by WikiProject AI Cleanup.
+## What it catches
 
-It drafts a rewrite, checks the draft for remaining AI patterns and changed claims, then writes the final version.
-
-It does not invent facts, names, dates, quotes, or citations. Any added detail must come from the source or the writer.
-
-### Wikipedia's main point
-
-> "LLMs use statistical algorithms to guess what should come next. The result tends toward the most statistically likely result that applies to the widest variety of cases."
-
-## 35 patterns with examples
+Humanizer covers 35 recurring patterns, grouped below by type.
 
 ### Content patterns
 
@@ -217,6 +157,10 @@ It does not invent facts, names, dates, quotes, or citations. Any added detail m
 
 ## Version history
 
+<details>
+<summary>Show release notes</summary>
+
+- **2.11.2** - Removed the plugin symlink and separate Claude Desktop package. Current Claude Code loads the root `SKILL.md` directly, so GitHub's source ZIP now works in Claude Desktop. No change to the 35 patterns.
 - **2.11.1** - Added a Claude Desktop-ready release package with one regular `humanizer/SKILL.md` file. GitHub's source archive still keeps the plugin symlink (fixes #224). No change to the 35 patterns.
 - **2.11.0** - Rewrote all repo guidance, descriptions, checks, and skill instructions in Plain Language. Kept all 35 patterns and their behavior.
 - **2.10.2** - Added the standard `skills/humanizer/` plugin path for Claude Desktop and older loaders. The path links to the root skill, so there is still one prompt (fixes #202).
@@ -241,6 +185,31 @@ It does not invent facts, names, dates, quotes, or citations. Any added detail m
 - **2.0.0** - Rewrote the skill from the Wikipedia source.
 - **1.0.0** - First release.
 
+</details>
+
 ## License
 
 MIT
+
+## Installation
+
+Install Humanizer with the Skills CLI:
+
+```bash
+npx skills add blader/humanizer --global
+```
+
+Remove `--global` for a project install. Add `--agent <name>` or `--agent '*'` to choose the target agents, then reload their skills.
+
+Claude Code 2.1.142 or newer also supports the plugin:
+
+```text
+/plugin marketplace add blader/humanizer
+/plugin install humanizer@humanizer
+```
+
+The plugin command is `/humanizer:humanizer`.
+
+For Claude Desktop, download this repository as a ZIP and upload it as a skill.
+
+For a manual install, place `SKILL.md` in the agent's skill folder.

+ 4 - 4
SKILL.md

@@ -1,18 +1,18 @@
 ---
 name: humanizer
 description: |
-  Rewrite text that sounds AI-generated while keeping the writer's facts,
-  meaning, and voice. Use when editing or reviewing prose for inflated claims,
+  Rewrite AI-sounding text so it reads naturally without changing what it says.
+  Use when editing or reviewing prose for inflated claims,
   sales language, vague sources, repetitive structure, stock AI words, passive
   voice, filler, or chatbot artifacts. Based on Wikipedia's "Signs of AI writing."
 license: MIT
 metadata:
-  version: "2.11.1"
+  version: "2.11.2"
 ---
 
 # Humanizer: remove AI writing patterns
 
-Rewrite text that sounds AI-generated so it reads like the writer, not a chatbot. Keep the writer's facts, meaning, and voice.
+Rewrite AI-sounding text so it reads like the writer, not a chatbot. Do not change what it says or make up details.
 
 The patterns below come from Wikipedia's ["Signs of AI writing"](https://en.wikipedia.org/wiki/Wikipedia:Signs_of_AI_writing), maintained by WikiProject AI Cleanup.
 

+ 0 - 51
scripts/build-skill-zip.py

@@ -1,51 +0,0 @@
-#!/usr/bin/env python3
-"""Build the symlink-free archive used by Claude Desktop."""
-
-from __future__ import annotations
-
-import argparse
-import stat
-from pathlib import Path
-from zipfile import ZIP_DEFLATED, ZipFile, ZipInfo
-
-
-ROOT = Path(__file__).resolve().parent.parent
-SOURCE = ROOT / "SKILL.md"
-ARCHIVE_PATH = "humanizer/SKILL.md"
-
-
-def build_archive(output: Path) -> None:
-    source_bytes = SOURCE.read_bytes()
-    output.parent.mkdir(parents=True, exist_ok=True)
-
-    skill = ZipInfo(ARCHIVE_PATH)
-    skill.compress_type = ZIP_DEFLATED
-    skill.create_system = 3
-    skill.external_attr = (stat.S_IFREG | 0o644) << 16
-
-    with ZipFile(output, "w") as archive:
-        archive.writestr(skill, source_bytes)
-
-    with ZipFile(output) as archive:
-        entries = archive.infolist()
-        if [entry.filename for entry in entries] != [ARCHIVE_PATH]:
-            raise SystemExit(f"Archive must contain only {ARCHIVE_PATH}")
-
-        mode = entries[0].external_attr >> 16
-        if not stat.S_ISREG(mode):
-            raise SystemExit(f"{ARCHIVE_PATH} must be a regular file")
-        if archive.read(ARCHIVE_PATH) != source_bytes:
-            raise SystemExit(f"{ARCHIVE_PATH} must match the root SKILL.md")
-
-
-def main() -> None:
-    parser = argparse.ArgumentParser(description=__doc__)
-    parser.add_argument("output", type=Path, help="Path for the generated ZIP file")
-    args = parser.parse_args()
-
-    build_archive(args.output)
-    print(f"Built Claude Desktop package: {args.output}")
-
-
-if __name__ == "__main__":
-    main()

+ 7 - 6
scripts/validate-package.py

@@ -9,11 +9,11 @@ from pathlib import Path
 
 
 ROOT = Path(__file__).resolve().parent.parent
-SKILL = (ROOT / "SKILL.md").read_text(encoding="utf-8")
+SKILL_PATH = ROOT / "SKILL.md"
+SKILL = SKILL_PATH.read_text(encoding="utf-8")
 README = (ROOT / "README.md").read_text(encoding="utf-8")
 AGENTS = (ROOT / "AGENTS.md").read_text(encoding="utf-8")
 PLUGIN = json.loads((ROOT / ".claude-plugin" / "plugin.json").read_text(encoding="utf-8"))
-PLUGIN_SKILL = ROOT / "skills" / "humanizer" / "SKILL.md"
 
 
 def require_match(match: re.Match[str] | None, message: str) -> re.Match[str]:
@@ -46,10 +46,11 @@ if len(package_versions) != 1:
         f"Use one package version in all files: {sorted(package_versions)}"
     )
 
-if not PLUGIN_SKILL.is_symlink():
-    raise SystemExit("Link skills/humanizer/SKILL.md to the root SKILL.md")
-if PLUGIN_SKILL.resolve() != (ROOT / "SKILL.md").resolve():
-    raise SystemExit("Make skills/humanizer/SKILL.md point to the root SKILL.md")
+skill_files = {path.relative_to(ROOT) for path in ROOT.rglob("SKILL.md")}
+if SKILL_PATH.is_symlink() or skill_files != {Path("SKILL.md")}:
+    raise SystemExit("Keep one regular SKILL.md at the repo root")
+if PLUGIN.get("skills") != ["./"]:
+    raise SystemExit("Point the Claude plugin skill loader at the repo root")
 
 plain_language_rules = (
     "## Writing style",

+ 0 - 1
skills/humanizer/SKILL.md

@@ -1 +0,0 @@
-../../SKILL.md