Ship a new artifact-tools plugin in kit/plugins/ with three skills — diff-artifact, session-artifact, and plan-artifact — that turn branch diffs, session recaps, and implementation plans into live claude.ai artifact pages, with a scrub gate before every publish and a local-HTML fallback when publishing is unavailable.
Teams get live, shareable claude.ai pages for the three things they review most — code diffs, working sessions, and implementation plans — without leaving Claude Code. Done means each skill publishes (or falls back cleanly to local HTML), every published page passed a secret scrub, and a smoke test guards the plugin's structure and marketplace registration.
Read and implement all steps in the plan at docs/plans/create-artifact-tools-plugin.md — Create the artifact-tools plugin — publish diffs, sessions, and plans as claude.ai artifacts. Verify against the plan's Tests, Verification, and Acceptance Criteria before reporting done. If everything passed, mark completion in docs/plans/create-artifact-tools-plugin.md — tick each step's [x] marker and each criterion's - [x], set status: completed — and re-render the HTML from the spec. If any check failed, leave status: in-progress and say which.
More ways to run this plan — goal & workflow prompts, file path
Achieve this goal: Create the artifact-tools plugin — publish diffs, sessions, and plans as claude.ai artifacts. The plan at docs/plans/create-artifact-tools-plugin.md describes one approach — use it as reference, but optimize for the outcome. Fan out across parallel subagents where that serves the outcome. Verify against the plan's Tests, Verification, and Acceptance Criteria before reporting done. If everything passed, mark completion in docs/plans/create-artifact-tools-plugin.md — tick each step's [x] marker and each criterion's - [x], set status: completed — and re-render the HTML from the spec. If any check failed, leave status: in-progress and say which.
Run a workflow to implement the plan at docs/plans/create-artifact-tools-plugin.md — Create the artifact-tools plugin — publish diffs, sessions, and plans as claude.ai artifacts. Brief subagents with the plan file at docs/plans/create-artifact-tools-plugin.md. Reserve a final verification phase for the lead agent, not a subagent. Verify against the plan's Tests, Verification, and Acceptance Criteria before reporting done. If everything passed, mark completion in docs/plans/create-artifact-tools-plugin.md — tick each step's [x] marker and each criterion's - [x], set status: completed — and re-render the HTML from the spec. If any check failed, leave status: in-progress and say which.
create-artifact-tools-plugin.html
docs/plans/create-artifact-tools-plugin.html
docs/plans/create-artifact-tools-plugin.md
Context
The story behind this plan — what prompted the work and why it matters now.
Claude Code artifacts (per the official docs at code.claude.com/docs/en/artifacts) are self-contained pages published to a private claude.ai URL that update in place on republish. They carry hard constraints the skills must respect: a strict Content Security Policy (no external requests — everything inlined), a 16 MiB rendered-size cap, single-page only (in-page anchors, no relative links), and .html/.md sources — Markdown renders as styled HTML at the lowest token cost. Publishing requires a claude.ai login on Pro or higher; sharing beyond the author is Team/Enterprise only, so the fallback path is not an edge case — on Pro/Max it is how content actually reaches teammates.
The kit already owns most of the generation work: social-media-tools:export-session converts session JSONL to Markdown, social-media-tools:security-scrub produces a structured SCRUB RESULT gate, social-media-tools:save-artifact publishes HTML into the GitHub Pages artifacts gallery, and plan-agent plans are already self-contained HTML. This plugin adds the missing publish endpoints, plus the one genuinely new generator: an annotated diff walkthrough. A publish is external sharing, so every skill scrubs before it ships.
One mechanic drives the design: updating an artifact from a later session requires its URL — without it, a new session mints a new page. Each skill therefore writes the returned URL into the source file's frontmatter as artifact-url: so any future session can republish to the same link.
Files that change
Every file this plan touches, and what happens to each one.
kit/plugins/artifact-tools/.claude-plugin/plugin.jsonnew plugin manifest; name, description, keywords, homepage; no version key- kit/plugins/artifact-tools/
README.mdnew overview, features, installation, usage, structureCHANGELOG.mdnew 1.0.0 entry
kit/plugins/artifact-tools/skills/diff-artifact/SKILL.mdnew annotated diff walkthrough artifactkit/plugins/artifact-tools/skills/session-artifact/SKILL.mdnew session recap artifact with learningskit/plugins/artifact-tools/skills/session-artifact/scripts/export_session.pynew bundled transcript extractor, copied from social-media-tools so the plugin has no install-order dependencykit/plugins/artifact-tools/skills/plan-artifact/SKILL.mdnew publish and republish plan HTML.claude-plugin/marketplace.jsonmodified register artifact-tools at 1.0.0tests/plugins/test-artifact-tools.shnew structural smoke test
Steps
The step-by-step work, in order — each step says what to do, why it matters, and how to check it worked.
kit/plugins/artifact-tools/ with .claude-plugin/plugin.json (name, description, author, license, keywords, homepage pointing at the plugin's directory per repo convention, repository — and no version key), plus README.md and CHANGELOG.md
python3 -m json.tool kit/plugins/artifact-tools/.claude-plugin/plugin.json exits 0 and grep -c '"version"' on the file returns 0.skills/diff-artifact/SKILL.md: resolve the diff source (current branch vs the default branch by default; a commit range argument; or a PR number via gh pr diff <n>, degrading gracefully to branch mode with a clear message when gh or the GitHub remote is missing), run social-media-tools:security-scrub on the diff and hard-stop on findings with no override, build one self-contained annotated-diff HTML page — sticky changed-files sidebar with add/del counts anchor-linked to each file section, per-hunk margin annotations explaining the reasoning, severity coding that pairs each color with a text label (critical/warn/note) plus a legend, adaptive light/dark palettes via prefers-color-scheme, and a cap-and-summarize policy where files beyond a per-file annotation budget render as one-line summary rows so the page stays under the 16 MiB artifact cap — then publish via the Artifact tool, save the page in the .claude/artifacts/ inbox with the returned URL recorded as an artifact-url: comment, and on publish failure keep the local HTML and offer social-media-tools:save-artifact
name, a three-part description under 200 chars, and allowed-tools including Bash, Read, Write, Glob, Skill, Artifact, AskUserQuestion, ToolSearch, ExitPlanMode; the body names the blocking scrub gate, the PR-mode degradation, the cap-and-summarize policy, the sidebar/theme/severity-legend page requirements, the fallback path, and the ExitPlanMode self-bootstrap.skills/session-artifact/SKILL.md plus a bundled scripts/export_session.py (copied from social-media-tools' export-session skill so artifact-tools works standalone with no install-order dependency): locate the session transcript using the same JSONL lookup conventions (explicit path or session ID, else newest transcript for the project), run the bundled script to extract turns, then write the recap in reviewer-first order — Summary, Decisions (with rationale), Learnings (approaches tried and abandoned, gotchas discovered), Files touched — scrub it, save it under {plansDirectory}/sessions/ so the recorded artifact-url: frontmatter is committed and survives for republish, and publish the .md directly as an artifact (Markdown sources render as styled pages at the lowest token cost); when publishing is unavailable the saved file is itself the fallback deliverable
skills/plan-artifact/SKILL.md: accept a plan .html path (plan-agent output is already self-contained and CSP-compliant), read artifact-url: from the sibling .md spec's frontmatter and pass it to the Artifact tool's url parameter when present so republishing hits the same page, otherwise publish fresh and write the new URL back into the spec frontmatter (the renderer preserves unknown keys), and document the live-update loop — republish after progress edits so viewers see steps check off at the same link
artifact-url:; republish reads it) and warns never to hand-edit the plan HTML, matching plan-agent's markdown-first rule.artifact-tools in .claude-plugin/marketplace.json at version 1.0.0 (source git-subdir, path kit/plugins/artifact-tools, category development, specific tags like artifacts, diff-review, session-recap, plan-publishing) and write the matching 1.0.0 CHANGELOG entry
/plugin install, and the repo convention is one marketplace entry plus a CHANGELOG line per shipped changepython3 -m json.tool .claude-plugin/marketplace.json exits 0 and the settings-hook JSON validation reports no errors after the edit.tests/plugins/test-artifact-tools.sh following the existing test-save-artifact.sh pattern: assert plugin.json is valid JSON without a version key, all three SKILL.md files exist with name, description, and allowed-tools frontmatter, the bundled export_session.py exists, the marketplace entry exists at 1.0.0, and the diff/session skill bodies contain the scrub gate, cap-and-summarize, and fallback wording
bash tests/plugins/test-artifact-tools.sh exits 0 on the finished plugin and exits non-zero when a required frontmatter line is deleted in a scratch copy.Tests
The tests that prove the change does what it promises.
Definition of done
The plan counts as done when every statement below is true — check each one off as you verify it.
Final check
One last pass to confirm the whole change works end to end.
Load the plugin with claude --plugin-dir ./kit/plugins/artifact-tools and confirm all three skills appear. Invoke diff-artifact on a branch with committed changes: it must run the scrub first, produce one self-contained HTML page, attempt the Artifact publish, and either report a claude.ai URL (recorded in the file) or fall back with a clear message and the local path. Invoke session-artifact with no arguments and confirm it finds the newest project transcript and produces a recap containing a Learnings section. Invoke plan-artifact on an existing plan under docs/plans/ twice: the first run writes artifact-url: into the spec frontmatter, the second reads it and republishes to the same URL. Finally run the smoke test and confirm exit 0.
Wrapping up
Three gates that must all pass before this plan is marked completed.
Completion Report
No items to report — all requirements met.