chore(claude): add playground builder skill - #285
Draft
greg-olivier wants to merge 5 commits into
Draft
greg-olivier wants to merge 5 commits into
greg-olivier wants to merge 5 commits into
Conversation
greg-olivier
changed the base branch from
master
to
refactor/fixtures/extract-plans
September 14, 2026 13:30
greg-olivier
changed the base branch from
refactor/fixtures/extract-plans
to
feature/DCC2-adaptation
September 14, 2026 13:31
greg-olivier
changed the base branch from
feature/DCC2-adaptation
to
refactor/fixtures/extract-plans
September 14, 2026 13:35
…folding for playground assets Co-Authored-By: Claude <noreply@anthropic.com>
…e playground directory Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
… improve skill documentation Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
greg-olivier
force-pushed
the
chore/claude/add-plaground-builder-skill
branch
from
September 14, 2026 13:54
8b8b382 to
c0306ca
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new Claude Code skill,
playground-builder, that scaffolds a local, live-reloading vanilla-DOM playground for visually verifying@alma/widgetschanges (payment-plan lists, legal disclosures, ineligible plans, deferred/pay-later/credit scenarios) without hitting the real eligibility API or waiting on backend test data.SKILL.md— skill definition: when to invoke it, why the playground is plain TypeScript + DOM rather than JSX/React/Preact, the build/adapt flow, and that the generated playground directory itself is scratch and never committed.references/gotchas.md— 282-line reference of known pitfalls when building/using the playground (e.g. clearing the sessionStorage eligibility cache before every remount; avoiding DOM moves that blur focus on an already-correctly-positioned node).assets/playground/dom.ts— reusable vanilla-DOM helpers copied into each generated playground:el()(createElement + prop/event wiring) andsyncList()(keyed list reconciliation that avoids losing input focus).assets/playground/mockFetch.ts— intercepts only the widget's real eligibility-fetch call at thewindow.fetchlevel and answers from in-memory mutable state (plans / simulated error / delay); every other fetch passes through untouched.assets/playground/main.ts— entry point; installs the fetch mock before mounting the widget so its first request hits the mock, not the real API.assets/playground/tsconfig.json— extends the repo's tsconfig, scoped to the playground assets plus the package's.d.tsfiles.scripts/ensure-setup.sh— idempotent setup script that gitignores/playground/and/vite.playground.config.ts(root-anchored so it doesn't also match the trackedassets/playground/directory)..gitignore— adds the same two anchored entries.Standing up real merchant test data to verify a rendering change is slow and depends on someone else's plan constraints, and reading code alone doesn't reliably predict rendering. This lets the real widget mount through its actual public API with only the eligibility fetch intercepted, so hook/filter/render logic runs unmodified.
No
src/code changes — this is tooling under.claude/skills/only, with no runtime/behavioral impact on the published package.Testing
Run the skill in Claude :
/playground-builderNotes
playground/,vite.playground.config.ts) are intentionally never committed — only the skill definition and reusable scaffolding under.claude/skills/playground-builder/are tracked. A playground is rebuilt/adapted fresh each session rather than persisted..gitignoreentries are root-anchored on purpose to avoid shadowing the trackedassets/playground/directory — worth preserving if this is ever "simplified."