Skip to content

Free, open source blog writer for Claude Code. Researches current sources, writes answer-first posts for Google and AI answers, has an independent reviewer score each one out of 100 and ships only after five delivery gates. 32 skills, 30 /blog commands, 5 agents. Active development at AI-Marketing-Hub/claude-blog; public releases ship here.

fix(triage): public-repo issue/PR remediation (#22, #33) + adopt hygiene idea from #38

AgriciDaniel1567ed307bb1
diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json
index edaaf88..d0f0281 100644
--- a/.claude-plugin/plugin.json
+++ b/.claude-plugin/plugin.json
@@ -1,6 +1,6 @@
{
"name": "claude-blog",
- "description": "AI-powered blog skill suite with 32 sub-skills and 5 agents. FLOW framework integration (Find/Optimize/Win, 30 evidence-led prompts), semantic topic-cluster planning + execution, multilingual publishing (translate/localize/locale-audit), Google API integration (PageSpeed, CrUX, GSC, GA4, YouTube, NLP, Keywords), YouTube video embedding, persona-driven writing, two-tier AI slop detection, 0-4 editorial heuristics rubric, cognitive-load assessment, durable BRAND.md + VOICE.md context, API-free last-30-days discourse research, 5-dimension research quality rubric, 6-LAW synthesis contract, fact-checking, cannibalization detection, CMS taxonomy sync, NotebookLM research, Gemini TTS audio narration, 5-category scoring, and Gemini image generation. Optimized for Google rankings and AI citations (GEO/AEO).",
+ "description": "AI-powered blog skill suite: 32 sub-skills and 5 agents for writing, rewriting, auditing, and optimizing content for Google rankings and AI citations (GEO/AEO). Includes the FLOW framework, semantic topic-cluster planning and execution, multilingual publishing, Google API integration (PSI, CrUX, GSC, GA4, YouTube, NLP), persona-driven writing, fact-checking, cannibalization detection, CMS taxonomy sync, NotebookLM research, Gemini TTS narration, image generation, and 5-category quality scoring.",
"version": "1.11.0",
"author": {
"name": "AgriciDaniel",
@@ -10,14 +10,40 @@
"repository": "https://github.com/AI-Marketing-Hub/claude-blog",
"license": "MIT",
"keywords": [
- "blog", "seo", "content", "writing", "ai-citations",
- "geo", "aeo", "eeat", "google-rankings", "content-optimization",
- "blog-writing", "markdown", "mdx", "wordpress",
- "google-api", "youtube", "pagespeed", "search-console",
- "flow-framework", "topic-clusters", "hub-and-spoke",
- "multilingual", "translation", "localization", "hreflang", "i18n",
- "discourse-research", "voice-of-customer", "social-listening",
- "research-quality", "synthesis-contract", "ai-slop-detection",
- "editorial-heuristics", "cognitive-load", "brand-context"
+ "blog",
+ "seo",
+ "content",
+ "writing",
+ "ai-citations",
+ "geo",
+ "aeo",
+ "eeat",
+ "google-rankings",
+ "content-optimization",
+ "blog-writing",
+ "markdown",
+ "mdx",
+ "wordpress",
+ "google-api",
+ "youtube",
+ "pagespeed",
+ "search-console",
+ "flow-framework",
+ "topic-clusters",
+ "hub-and-spoke",
+ "multilingual",
+ "translation",
+ "localization",
+ "hreflang",
+ "i18n",
+ "discourse-research",
+ "voice-of-customer",
+ "social-listening",
+ "research-quality",
+ "synthesis-contract",
+ "ai-slop-detection",
+ "editorial-heuristics",
+ "cognitive-load",
+ "brand-context"
]
}
diff --git a/CLAUDE.md b/CLAUDE.md
index 054367e..3ac441e 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -28,6 +28,7 @@ claude-blog/
scripts/analyze_blog.py # 5-category quality scoring (stdlib)
scripts/blog_preflight.py # 5-gate delivery contract runner (v1.9.0)
scripts/blog_render.py # md -> html -> pdf renderer; XSS-safe JSON-LD (v1.9.0)
+ scripts/blog_hygiene.py # Optional deterministic hygiene: lazy-load imgs + auto-TOC (v1.11.0)
scripts/cognitive_load.py # Per-section concept-density analyzer (v1.8.0)
scripts/discourse_research.py # Discourse brief synthesis from SERP JSON (v1.8.0)
scripts/generate_hero.py # Hero image ladder: Banana -> Gemini -> stock -> Openverse (v1.9.0)
diff --git a/README.md b/README.md
index 0c44cfc..1b3d7f6 100644
--- a/README.md
+++ b/README.md
@@ -149,7 +149,8 @@ curl -fsSL https://raw.githubusercontent.com/AI-Marketing-Hub/claude-blog/main/i
```powershell
$env:CLAUDE_BLOG_REF = "v1.11.0"
-irm https://raw.githubusercontent.com/AI-Marketing-Hub/claude-blog/main/install.ps1 | iex
+irm https://raw.githubusercontent.com/AI-Marketing-Hub/claude-blog/main/install.ps1 -OutFile install.ps1
+pwsh -File ./install.ps1
```
> Piping `curl` or `irm` to a shell gives the script execution authority on your machine. The clone-then-checkout-tag flow is safer because you can inspect what runs. Both flows authenticate against the private repo using your existing `gh auth` / GitHub credentials.
diff --git a/SECURITY.md b/SECURITY.md
index a4b487a..da41dd4 100644
--- a/SECURITY.md
+++ b/SECURITY.md
@@ -218,6 +218,28 @@ intent, not negligence.
- GitHub Actions are SHA-pinned (mutable tag risk closed).
- OAuth flow uses CSRF state token validation.
+## Antivirus false positives
+
+Some antivirus engines (reported: Kaspersky for Mac, engine 26.0.0.150) may quarantine
+`install.ps1` and even `docs/INSTALLATION.md` with a heuristic verdict such as
+`HEUR:Trojan.PowerShell.Generic`. This is a **false positive**, not malware:
+
+- A Markdown documentation file cannot be a PowerShell trojan. The scanner is matching the
+ text of the documented `iex (irm ...)` install one-liner, not any behavior.
+- `HEUR:...Generic` is a generic-pattern heuristic, not a signature match to a known sample.
+ Download-and-execute PowerShell one-liners are a well-known source of these false positives.
+- `install.ps1` is auditable and unobfuscated: it copies files into `~/.claude/`, validates
+ paths, and uses no `eval`, `base64`, or hidden remote execution beyond the documented flow.
+
+**What we changed:** the documented Windows install now downloads the script to a file and runs
+it (`irm ... -OutFile install.ps1; pwsh -File ./install.ps1`) instead of piping straight into
+the shell. This is both safer (you can inspect the script before running it) and avoids the
+heuristic that fires on `iex (irm ...)`.
+
+**If your scanner still flags it:** you can safely review `install.ps1` in this repository, then
+allowlist it, or use the Git-clone install flow instead. Maintainers periodically submit the
+files to Kaspersky for reclassification. Tracking: issue #33.
+
## Audit History
Public audit notes for this project:
diff --git a/docs/INSTALLATION.md b/docs/INSTALLATION.md
index 7713a32..c0989bf 100644
--- a/docs/INSTALLATION.md
+++ b/docs/INSTALLATION.md
@@ -28,9 +28,12 @@ curl -sL https://raw.githubusercontent.com/AgriciDaniel/claude-blog/main/install
### Windows (PowerShell)
```powershell
-iex (irm https://raw.githubusercontent.com/AgriciDaniel/claude-blog/main/install.ps1)
+irm https://raw.githubusercontent.com/AgriciDaniel/claude-blog/main/install.ps1 -OutFile install.ps1
+pwsh -File ./install.ps1
```
+> Downloading the script and running it as a file (rather than piping it straight into the shell) lets you inspect it first and avoids a heuristic antivirus false positive some scanners raise on `iex (irm ...)` one-liners. See [SECURITY.md](../SECURITY.md#antivirus-false-positives).
+
Both installers automatically copy all skills, agents, references, templates,
and scripts to the correct Claude Code configuration directories.
diff --git a/install.ps1 b/install.ps1
index 8b68fc1..3479bf0 100644
--- a/install.ps1
+++ b/install.ps1
@@ -2,8 +2,9 @@
# claude-blog installer for Windows
# Installs the blog skill ecosystem to ~/.claude/skills/ and ~/.claude/agents/
#
-# One-command install:
-# iex (irm https://raw.githubusercontent.com/AI-Marketing-Hub/claude-blog/main/install.ps1)
+# Install (download first, then run so you can inspect it):
+# irm https://raw.githubusercontent.com/AI-Marketing-Hub/claude-blog/main/install.ps1 -OutFile install.ps1
+# pwsh -File ./install.ps1
$ErrorActionPreference = "Stop"
diff --git a/pyproject.toml b/pyproject.toml
index 84411a5..77dc983 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -53,7 +53,7 @@ google = [
"requests>=2.32.4,<3.0.0",
"google-api-python-client>=2.100.0,<3.0.0",
"google-auth>=2.20.0,<3.0.0",
- "google-auth-oauthlib>=1.0.0,<2.0.0",
+ "google-auth-oauthlib>=1.3.1,<2.0.0",
"google-auth-httplib2>=0.2.0,<1.0.0",
"google-analytics-data>=0.18.0,<1.0.0",
]
diff --git a/scripts/blog_hygiene.py b/scripts/blog_hygiene.py
new file mode 100644
index 0000000..f2cb8f1
--- /dev/null
+++ b/scripts/blog_hygiene.py
@@ -0,0 +1,212 @@
+#!/usr/bin/env python3
+"""blog_hygiene.py: deterministic, judgment-free structural hygiene for blog drafts.
+
+Applies only fixes that never need editorial judgment, so it is safe to run
+automatically. It is an OPTIONAL helper, not a delivery-contract gate: it never
+blocks delivery and always exits 0 on a successful run.
+
+Fixes:
+ 1. HTML: add loading="lazy" to <img> tags that lack a loading attribute.
+ 2. HTML: report (never invent) <img> tags missing alt text.
+ 3. Markdown: insert an idempotent Table of Contents before the first body H2
+ on posts over the word threshold (default 2000) when none is present.
+
+Safety:
+ - Refuses symlinked inputs and non-regular files; only rewrites the file passed.
+ - Default is dry-run (report only). Pass --apply to write changes back.
+
+Output: a JSON object on stdout. Exit code 0 on success, 2 on usage/IO error.
+
+Usage:
+ python3 scripts/blog_hygiene.py --md post.md [--html post.html] [--apply]
+ python3 scripts/blog_hygiene.py --html post.html --apply
+"""
+from __future__ import annotations
+
+import argparse
+import json
+import os
+import re
+import sys
+import unicodedata
+from pathlib import Path
+
+TOC_BEGIN = "<!-- blog-hygiene:toc:begin -->"
+TOC_END = "<!-- blog-hygiene:toc:end -->"
+DEFAULT_TOC_HEADING = "In this article"
+
+
+def slugify(text: str) -> str:
+ """Convert heading text to a GitHub-style anchor slug (ASCII, lowercase)."""
+ text = unicodedata.normalize("NFKD", text).encode("ascii", "ignore").decode("ascii")
+ text = text.lower()
+ text = re.sub(r"[^\w\s-]", "", text)
+ text = re.sub(r"[\s_]+", "-", text).strip("-")
+ return text
+
+
+def fix_html_lazy_loading(html: str) -> tuple[str, int]:
+ """Add loading="lazy" to <img> tags missing a loading attribute. Pure."""
+ count = 0
+
+ def _add_lazy(m: "re.Match[str]") -> str:
+ nonlocal count
+ tag = m.group(0)
+ if re.search(r"\bloading\s*=", tag, re.IGNORECASE):
+ return tag
+ count += 1
+ # insert right after the "<img" token (first 4 chars of the match)
+ return tag[:4] + ' loading="lazy"' + tag[4:]
+
+ result = re.sub(r"<img\b[^>]*>", _add_lazy, html, flags=re.IGNORECASE | re.DOTALL)
+ return result, count
+
+
+def find_missing_alt(html: str) -> list[str]:
+ """Return srcs of <img> tags missing an alt attribute (cannot auto-fix)."""
+ missing: list[str] = []
+ for m in re.finditer(r"<img\b([^>]*)>", html, re.IGNORECASE | re.DOTALL):
+ attrs = m.group(1)
+ if not re.search(r"\balt\s*=", attrs, re.IGNORECASE):
+ src_m = re.search(r'\bsrc\s*=\s*["\']([^"\']+)["\']', attrs, re.IGNORECASE)
+ missing.append(src_m.group(1) if src_m else "(unknown)")
+ return missing
+
+
+def split_frontmatter(text: str) -> tuple[str, str]:
+ """Return (frontmatter_including_fences_or_empty, body)."""
+ if text.startswith("---"):
+ end = text.find("\n---", 3)
+ if end != -1:
+ nl = text.find("\n", end + 1)
+ if nl != -1:
+ return text[: nl + 1], text[nl + 1:]
+ return "", text
+
+
+def count_words(body: str) -> int:
+ """Word count of body with HTML tags and markdown punctuation stripped."""
+ clean = re.sub(r"<[^>]+>", " ", body)
+ clean = re.sub(r"[*_`#\[\]()>~]", " ", clean)
+ return len(clean.split())
+
+
+def extract_h2s(body: str) -> list[tuple[str, str]]:
+ """Return [(heading_text, anchor_slug)] for each ATX H2, skipping code fences."""
+ out: list[tuple[str, str]] = []
+ in_fence = False
+ for line in body.splitlines():
+ if line.lstrip().startswith("```"):
+ in_fence = not in_fence
+ continue
+ if in_fence:
+ continue
+ m = re.match(r"^## +(.+?)\s*#*\s*$", line)
+ if m:
+ heading = m.group(1).strip()
+ slug = slugify(heading)
+ if slug:
+ out.append((heading, slug))
+ return out
+
+
+def toc_present(text: str) -> bool:
+ """True if a TOC (this tool's marker or a common manual one) already exists."""
+ if TOC_BEGIN in text:
+ return True
+ lowered = text.lower()
+ return any(
+ marker in lowered
+ for marker in ("## table of contents", "## contents", "**in this article", "**table of contents")
+ )
+
+
+def build_toc(h2s: list[tuple[str, str]], heading: str = DEFAULT_TOC_HEADING) -> str:
+ """Build an idempotent, marker-wrapped markdown TOC block."""
+ lines = [TOC_BEGIN, f"**{heading}:**", ""]
+ lines += [f"- [{text}](#{slug})" for text, slug in h2s]
+ lines += ["", TOC_END, ""]
+ return "\n".join(lines)
+
+
+def insert_toc(md: str, min_words: int = 2000, heading: str = DEFAULT_TOC_HEADING) -> tuple[str, bool]:
+ """Insert a TOC before the first body H2 when long enough and none present."""
+ front, body = split_frontmatter(md)
+ if toc_present(body) or count_words(body) < min_words:
+ return md, False
+ h2s = extract_h2s(body)
+ if len(h2s) < 2:
+ return md, False
+ first = re.search(r"^## +", body, re.MULTILINE)
+ if not first:
+ return md, False
+ toc = build_toc(h2s, heading) + "\n"
+ new_body = body[: first.start()] + toc + body[first.start():]
+ return front + new_body, True
+
+
+def _read_safely(path: Path) -> str:
+ if path.is_symlink():
+ raise OSError(f"refusing to read symlink: {path}")
+ if not path.is_file():
+ raise OSError(f"not a regular file: {path}")
+ fd = os.open(path, os.O_RDONLY | getattr(os, "O_NOFOLLOW", 0))
+ try:
+ fh = os.fdopen(fd, "r", encoding="utf-8")
+ except Exception:
+ os.close(fd)
+ raise
+ with fh:
+ return fh.read()
+
+
+def _write_safely(path: Path, data: str) -> None:
+ if path.is_symlink():
+ raise OSError(f"refusing to write through symlink: {path}")
+ path.write_text(data, encoding="utf-8")
+
+
+def main(argv: list[str] | None = None) -> int:
+ ap = argparse.ArgumentParser(description="Deterministic blog draft hygiene (optional; never blocks).")
+ ap.add_argument("--md", type=Path, help="Markdown draft (TOC insertion).")
+ ap.add_argument("--html", type=Path, help="Rendered HTML (lazy-loading + alt report).")
+ ap.add_argument("--apply", action="store_true", help="Write changes back (default: dry-run).")
+ ap.add_argument("--min-words", type=int, default=2000, help="TOC word threshold (default 2000).")
+ ap.add_argument("--toc-heading", default=DEFAULT_TOC_HEADING, help="TOC heading label.")
+ args = ap.parse_args(argv)
+
+ if not args.md and not args.html:
+ ap.error("provide at least one of --md or --html")
+
+ result: dict[str, object] = {
+ "lazy_fixed": 0, "alt_missing": [], "toc_inserted": False,
+ "applied": bool(args.apply), "changed_files": [], "warnings": [],
+ }
+ try:
+ if args.html:
+ html = _read_safely(args.html)
+ new_html, n = fix_html_lazy_loading(html)
+ result["lazy_fixed"] = n
+ result["alt_missing"] = find_missing_alt(new_html)
+ if args.apply and new_html != html:
+ _write_safely(args.html, new_html)
+ result["changed_files"].append(str(args.html))
+ if args.md:
+ md = _read_safely(args.md)
+ new_md, inserted = insert_toc(md, args.min_words, args.toc_heading)
+ result["toc_inserted"] = inserted
+ if args.apply and inserted:
+ _write_safely(args.md, new_md)
+ result["changed_files"].append(str(args.md))
+ except OSError as exc:
+ print(json.dumps({"error": str(exc)}), file=sys.stdout)
+ return 2
+
+ if result["alt_missing"]:
+ result["warnings"].append(f"{len(result['alt_missing'])} <img> tag(s) missing alt text; add manually.")
+ print(json.dumps(result, indent=2))
+ return 0
+
+
+if __name__ == "__main__":
+ sys.exit(main())
diff --git a/skills/blog-google/scripts/requirements.txt b/skills/blog-google/scripts/requirements.txt
index 26d5b02..6e0b7b8 100644
--- a/skills/blog-google/scripts/requirements.txt
+++ b/skills/blog-google/scripts/requirements.txt
@@ -10,7 +10,7 @@
# Core Google API client
google-api-python-client>=2.100.0,<3.0.0
google-auth>=2.53.0,<3.0.0
-google-auth-oauthlib>=1.0.0,<2.0.0
+google-auth-oauthlib>=1.3.1,<2.0.0
google-auth-httplib2>=0.2.0,<1.0.0
# GA4 Data API
diff --git a/skills/blog/references/blog-delivery-contract.md b/skills/blog/references/blog-delivery-contract.md
index 2c82b7f..703ce2a 100644
--- a/skills/blog/references/blog-delivery-contract.md
+++ b/skills/blog/references/blog-delivery-contract.md
@@ -46,6 +46,10 @@ Every delivered blog ships with four artifacts in `<draft-folder>/`:
Implementation lives in `scripts/blog_render.py`. Failure to produce any of the four artifacts blocks delivery.
+### Optional hygiene pass (non-blocking)
+
+After rendering and before Gate 3, you may run `python3 scripts/blog_hygiene.py --md <slug>.md --html <slug>.html --apply` to auto-apply judgment-free fixes: add `loading="lazy"` to images that lack it and insert a Table of Contents on posts over 2000 words. It is optional, never blocks delivery, and reports any images missing alt text (which a human must fill in). It does not replace any gate.
+
## Gate 3: Visual Verification
Renders the `.html` in headless `patchright` at three viewport widths and checks for visual defects. This is the "review before present" step.
diff --git a/tests/test_blog_hygiene.py b/tests/test_blog_hygiene.py
new file mode 100644
index 0000000..d145f48
--- /dev/null
+++ b/tests/test_blog_hygiene.py
@@ -0,0 +1,97 @@
+"""Tests for scripts/blog_hygiene.py (optional deterministic hygiene helper)."""
+import json
+import subprocess
+import sys
+from pathlib import Path
+
+import pytest
+
+ROOT = Path(__file__).resolve().parent.parent
+sys.path.insert(0, str(ROOT / "scripts"))
+import blog_hygiene as bh # noqa: E402
+
+
+def test_lazy_loading_added_once_and_idempotent() -> None:
+ html = '<p><img src="a.png" alt="A"><img src="b.png" alt="B" loading="eager"></p>'
+ out, n = bh.fix_html_lazy_loading(html)
+ assert n == 1
+ assert 'src="a.png" alt="A"' in out and 'loading="lazy"' in out
+ # already-eager image is left untouched
+ assert out.count('loading="eager"') == 1
+ # idempotent: second pass changes nothing
+ out2, n2 = bh.fix_html_lazy_loading(out)
+ assert n2 == 0 and out2 == out
+
+
+def test_missing_alt_reported_not_invented() -> None:
+ html = '<img src="x.png"><img src="y.png" alt="ok">'
+ missing = bh.find_missing_alt(html)
+ assert missing == ["x.png"]
+
+
+def test_toc_inserted_only_for_long_multi_h2_posts() -> None:
+ body = "## First\n\n" + ("word " * 2100) + "\n\n## Second\n\nmore\n"
+ md = "---\ntitle: t\n---\n" + body
+ out, inserted = bh.insert_toc(md, min_words=2000)
+ assert inserted
+ assert bh.TOC_BEGIN in out and "- [First](#first)" in out and "- [Second](#second)" in out
+ # TOC sits before the first H2
+ assert out.index(bh.TOC_BEGIN) < out.index("## First")
+ # idempotent
+ out2, inserted2 = bh.insert_toc(out, min_words=2000)
+ assert not inserted2 and out2 == out
+
+
+def test_toc_skipped_when_short_or_single_heading() -> None:
+ short = "---\nt: 1\n---\n## Only\n\nshort body\n"
+ _, inserted = bh.insert_toc(short, min_words=2000)
+ assert not inserted
+ long_one_h2 = "---\nt: 1\n---\n## Only\n\n" + ("word " * 2100)
+ _, inserted2 = bh.insert_toc(long_one_h2, min_words=2000)
+ assert not inserted2
+
+
+def test_h2_extraction_skips_code_fences() -> None:
+ body = "## Real\n\n```\n## NotAHeading\n```\n\n## AlsoReal\n"
+ h2s = bh.extract_h2s(body)
+ assert [t for t, _ in h2s] == ["Real", "AlsoReal"]
+
+
+def test_cli_dry_run_does_not_write(tmp_path: Path) -> None:
+ p = tmp_path / "post.html"
+ p.write_text('<img src="a.png">', encoding="utf-8")
+ r = subprocess.run(
+ [sys.executable, str(ROOT / "scripts" / "blog_hygiene.py"), "--html", str(p)],
+ capture_output=True, text=True,
+ )
+ assert r.returncode == 0
+ data = json.loads(r.stdout)
+ assert data["lazy_fixed"] == 1 and data["applied"] is False
+ assert p.read_text(encoding="utf-8") == '<img src="a.png">' # unchanged in dry-run
+
+
+def test_cli_apply_writes(tmp_path: Path) -> None:
+ p = tmp_path / "post.html"
+ p.write_text('<img src="a.png">', encoding="utf-8")
+ r = subprocess.run(
+ [sys.executable, str(ROOT / "scripts" / "blog_hygiene.py"), "--html", str(p), "--apply"],
+ capture_output=True, text=True,
+ )
+ assert r.returncode == 0
+ assert 'loading="lazy"' in p.read_text(encoding="utf-8")
+
+
+def test_cli_refuses_symlink(tmp_path: Path) -> None:
+ real = tmp_path / "real.html"
+ real.write_text("<img src='a.png'>", encoding="utf-8")
+ link = tmp_path / "link.html"
+ try:
+ link.symlink_to(real)
+ except (OSError, NotImplementedError):
+ pytest.skip("symlinks unsupported on this platform")
+ r = subprocess.run(
+ [sys.executable, str(ROOT / "scripts" / "blog_hygiene.py"), "--html", str(link), "--apply"],
+ capture_output=True, text=True,
+ )
+ assert r.returncode == 2
+ assert "symlink" in (r.stdout + r.stderr).lower()
diff --git a/tests/test_plugin_manifest.py b/tests/test_plugin_manifest.py
new file mode 100644
index 0000000..92a1530
--- /dev/null
+++ b/tests/test_plugin_manifest.py
@@ -0,0 +1,29 @@
+"""Guard the plugin manifest against org-install validation failures.
+
+The Claude plugin registry enforces a 500-character cap on the plugin
+description (issue #22: a 579 -> 809 char description silently blocked
+organisation installs even though `claude plugin validate` passed locally).
+"""
+import json
+from pathlib import Path
+
+ROOT = Path(__file__).resolve().parent.parent
+
+
+def test_plugin_description_within_registry_cap() -> None:
+ d = json.loads((ROOT / ".claude-plugin" / "plugin.json").read_text(encoding="utf-8"))
+ desc = d.get("description", "")
+ assert 0 < len(desc) <= 500, (
+ f"plugin.json description is {len(desc)} chars; the plugin registry caps "
+ f"it at 500 and rejects org installs above that."
+ )
+
+
+def test_marketplace_plugin_description_within_cap() -> None:
+ m = json.loads((ROOT / ".claude-plugin" / "marketplace.json").read_text(encoding="utf-8"))
+ for plugin in m.get("plugins", []):
+ desc = plugin.get("description", "")
+ assert len(desc) <= 500, (
+ f"marketplace plugin '{plugin.get('name')}' description is {len(desc)} "
+ f"chars; keep it at or under 500."
+ )
diff --git a/uninstall.ps1 b/uninstall.ps1
index 4a95414..8d5fb4a 100644
--- a/uninstall.ps1
+++ b/uninstall.ps1
@@ -46,7 +46,7 @@ function Main {
# Remove root-level scripts copied to ~/.claude/scripts/ by install.ps1
# (v1.8.6: install.ps1 now copies all scripts/*.py to that location).
$ClaudeScriptsDir = Join-Path $env:USERPROFILE ".claude\scripts"
- $helperScripts = @("analyze_blog.py", "blog_preflight.py", "blog_render.py",
+ $helperScripts = @("analyze_blog.py", "blog_preflight.py", "blog_render.py", "blog_hygiene.py",
"cognitive_load.py", "discourse_research.py", "generate_hero.py",
"load_untrusted_root.py", "lint_prose.py", "sync_flow.py",
"ai_citation_score.py", "content_decay.py", "quality_gate.py", "style_learn.py")
diff --git a/uninstall.sh b/uninstall.sh
index be3e4b7..c4e5eb9 100755
--- a/uninstall.sh
+++ b/uninstall.sh
@@ -19,7 +19,7 @@ main() {
"blog-write"
)
local helper_scripts=(
- "analyze_blog.py" "blog_preflight.py" "blog_render.py" "cognitive_load.py"
+ "analyze_blog.py" "blog_preflight.py" "blog_render.py" "blog_hygiene.py" "cognitive_load.py"
"discourse_research.py" "generate_hero.py" "load_untrusted_root.py"
"lint_prose.py" "sync_flow.py"
"ai_citation_score.py" "content_decay.py" "quality_gate.py" "style_learn.py"