Skip to content

v0.5.0: package html-kit as a Claude Code plugin - #3

Merged
nyashkn merged 12 commits into
mainfrom
feat/v0.5.0-plugin-packaging
Sep 16, 2026
Merged

nyashkn merged 12 commits into
mainfrom
feat/v0.5.0-plugin-packaging

Conversation

@nyashkn

@nyashkn nyashkn commented Sep 16, 2026

Copy link
Copy Markdown
Owner

Packages html-kit as an installable Claude Code plugin and adds enforcement, evals and CI. Spec: docs/specs/2026-09-16-plugin-packaging.md (P0, P1, P3; the P2 annotation monitor is deferred).

What changes

  • Plugin install: .claude-plugin/plugin.json + self-hosted marketplace.json; skill/ renamed to skills/. Install with /plugin marketplace add nyashkn/html-kit then /plugin install html-kit@html-kit. ./install.sh still works for manual installs.
  • Portable skills: bundled scripts are called via ${CLAUDE_SKILL_DIR} with matching allowed-tools, so they run from any repo without permission prompts. daemon-check.ts and artifact-from-url.ts replace curl/jq snippets.
  • User notes survive updates: recipe gotchas and extracted patterns go to ~/.html-kit/_gotchas/ and ~/.html-kit/_patterns/; repo files are only edited inside an html-kit checkout.
  • Render audit hook: a PostToolUse hook audits each write under .html-kit/ and feeds failures back to Claude. The audit now catches external scripts, stylesheets, fonts, CSS url(), media and module imports, ignores code samples, and accepts <meta name="html-kit:palette" content="custom"> for non-Anthropic palettes.
  • Generated cheatsheet: recipe.md files carry name/when frontmatter; bun run cheatsheet regenerates the SKILL.md table and README counts (--check in CI).
  • Index on clean clones: the index template moved to tracked assets/index-template.html.
  • No personal defaults: no default scan root; client and project names removed from recipes and patterns.
  • Licence: the 11 unknowns exemplars are Apache-2.0 (upstream relicensed 2026-05-18); attribution and LICENSES/Apache-2.0.txt added.
  • Daemon fixes: no rebuild loops, orphaned staging cleanup, log rotation.

Tests and evals

  • Playwright: 22/22 pass locally against a started daemon, using a committed fixture artifact.
  • claude plugin validate . --strict passes; plugin loads 3 skills + 1 hook.
  • evals/: 6 cases tagged free / paid. CI runs free graders on same-repo PRs and pushes, paid graders on main only.

Before merging

  • Add the ANTHROPIC_API_KEY repository secret, or the eval jobs fail.

🤖 Generated with Claude Code

nyashkn and others added 12 commits September 16, 2026 20:35
- ignore watch events from the daemon's own _daemon/ output dir
- skip overlapping builds; 1.5s trailing debounce; --incremental rebuilds
- watch each ~/.html-kit slug dir instead of a recursive KIT_HOME watch
  (macOS FSEvents fired spurious parent-dir events)
- rotate out.log/daemon.log at 5 MB on startup
- build-index: remove staged copies whose source is gone; warn and skip
  sources that vanish or fail to stage
- gitignore .html-kit/_archive/

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
- replace client, vendor and internal project names in recipe gotchas and
  patterns with generic descriptions; every lesson kept
- move dated gotcha entries above the field-manual footer, date-ordered
- every recipe.md starts with name/when frontmatter (routing phrase used
  to generate the SKILL.md cheatsheet)

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
- build-index reads tracked assets/index-template.html; the old template
  lived in a gitignored .html-kit/ file, so clean clones could not build
- discover-roots: no default scan root; empty config returns
  unconfigured:true and the Rescan toast says how to configure it
- project labels strip the mangled HOME prefix instead of a hardcoded path
- skip all _-prefixed dirs in ~/.html-kit (_gotchas, _patterns)

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
- .claude-plugin/plugin.json + self-hosted marketplace.json
- skills call bundled scripts via ${CLAUDE_SKILL_DIR} with matching
  allowed-tools rules; daemon-check.ts and artifact-from-url.ts replace
  curl/jq snippets
- user gotchas and patterns go to ~/.html-kit/_gotchas and _patterns so
  they survive plugin updates; repo edits only inside an html-kit checkout
- build-cheatsheet.ts generates the SKILL.md cheatsheet and README counts
  from recipe frontmatter (--check for CI)
- attribution: the 11 unknowns exemplars are Apache-2.0 (upstream
  relicensed 2026-05-18); add LICENSES/Apache-2.0.txt
- README install matrix, namespaced plugin command names, spec doc

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
- PostToolUse hook audits every write under .html-kit/ and feeds failures
  back to Claude
- render-audit: fail on external scripts, stylesheets, fonts, CSS url(),
  media and module imports; ignore code samples and comments; check every
  :root block; html-kit:palette=custom meta skips the palette check
- evals/: 6 cases tagged free/paid for claude plugin eval
- CI: Playwright suite against a started daemon + cheatsheet check; free
  evals on same-repo PRs and pushes, paid graders on main only
- tests use a committed fixture artifact instead of a personal path

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…red scan toast in test

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@nyashkn
nyashkn merged commit d8e3cf3 into main Sep 16, 2026
3 checks passed
@nyashkn
nyashkn deleted the feat/v0.5.0-plugin-packaging branch September 16, 2026 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant