framework-embed
Checklist for a framework Embed on the closed list in ADR-0016, now complete (React, Vue, Angular, Svelte). Use when rebuilding, auditing or extending one of…
от manucoffin★ 52 звезды на GitHub
Установить framework-embed в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
ADR-0016 (its 2026-09-28 amendment) is the what and why: the closed list of framework Embeds, one package per rendering runtime, the seven-member control contract, options forwarded unchanged. This skill is the how. The worked example is the Vue Embed: packages/widget-vue, examples/vue, apps/web/e2e/vue-embed.spec.ts, apps/web/src/content/docs/widget/install/vue.mdx. At every step, open the Vue file first and mirror it; diverge only where the framework's idiom forces it.
Every framework on ADR-0016's closed list has its Embed. A framework outside it needs a new amendment first: stop and ask. The package shape (install entry, accessor name, peer range) is decided with the user before code, since the ADR leaves it open.
<fw> below is the framework slug (vue, angular, svelte).
1. Package skeleton and metadata
Create packages/widget-<fw> from the files of packages/widget-vue: package.json, tsdown.config.ts, tsconfig.json, turbo.json, vitest.config.ts, eslint.config.js, .gitignore, LICENSE.
package.json: name@fasterfixes/<fw>, version0.0.0(the changeset takes it to 1.0.0), ESM only,sideEffects: false, the sameauthor,homepage,bugs,engines,files,exports,publishConfig,repository.directoryset to the new folder, keywords naming the framework and its meta-frameworks.- Dependencies:
@fasterfixes/widgetatworkspace:^, nothing else at runtime. Never@fasterfixes/core(ADR-0013). The framework is a peer dependency, with a floor set by the oldest version that has every lifecycle hook you use (Vue needs 3.5 forapp.onUnmount), and a dev dependency for tests. tsdown.config.ts: the framework indeps.neverBundle, so the app's copy is used..lintstagedrc: add an ESLint entry for the folder, as forpackages/widget-vue.- Adding dependencies is the one deliberate
pnpm install: check thepnpm-lock.yamldiff holds only the new importer before committing.
Done when pnpm check:packages is green (build, typecheck, lint, publint on every @fasterfixes/* package).
2. The contract and its framework mapping
The public API is exactly: an install entry in the framework's idiom, a control accessor, the accessor's return type, and the re-exported WidgetOptions, Labels, WidgetPosition. Compare packages/widget-vue/src/index.ts.
| Member | React | Vue | New Embed |
|---|---|---|---|
show, hide, startAnnotation, togglePins |
functions from useFeedback() |
functions from useFeedback() |
plain functions delegating to the instance |
isVisible, feedbackItems, showPins |
values, re-render on change | readonly shallow refs | the framework's read-only reactive primitive (signal, store) |
Behaviour every Embed carries, each one in the Vue source:
- The option object reaches
initas the same reference: no renamed keys, no defaults of the wrapper's own, no re-initialisation (create-faster-fixes.ts). - Without
document(server rendering) nothing is initialised, and the accessor returns the unmounted values:isVisible: false,feedbackItems: [],showPins: true. - One
subscribeper app, held with the instance, never one per consumer (feedback-slot.ts). - Teardown on the framework's app-level destroy hook: unsubscribe first, then
destroy(), becausedestroydrops every listener. - A second install on the same app is a no-op with a development-only
[faster-fixes]warning, using the guardedprocess.env.NODE_ENVcheck (environment.ts). - The accessor called outside the install throws an error naming the missing install call.
3. Unit tests
Vitest with jsdom. Mock @fasterfixes/widget so init returns createFakeWidget() from @fasterfixes/widget/testing, and assert on its recorded calls.<method>, emit(patch) and listenerCount, never on spies of your own. Cover the contract checklist, one test each, mirroring create-faster-fixes.test.ts, create-faster-fixes.server.test.ts and use-feedback.test.ts:
- The option object reaches
initone to one. - Server rendering through the framework's server renderer never calls
initand renders children with the unmounted values. - The accessor throws a clear error outside the install.
- The three state members reflect the instance, and update when the fake emits.
- The four actions call the instance methods.
- Destroying the app destroys the instance and leaves
listenerCountat 0. - A second install calls
initonce and warns once in development, never in production. - Several consumers share one subscription (
listenerCount1) and all update on emit.
Done when all eight pass und
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл framework-embed?
Checklist for a framework Embed on the closed list in ADR-0016, now complete (React, Vue, Angular, Svelte). Use when rebuilding, auditing or extending one of those packages, or when asked for a new framework package that wraps `@fasterfixes/widget`, which first needs an ADR amendment.
Как установить скилл framework-embed?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл framework-embed запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
AnthropicToolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
access
AnthropicManage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
configure
AnthropicSet up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
access
AnthropicManage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…