Command Palette

Search for a command to run...

Назад к скиллам
скилл № 54943

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от 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>, version 0.0.0 (the changeset takes it to 1.0.0), ESM only, sideEffects: false, the same author, homepage, bugs, engines, files, exports, publishConfig, repository.directory set to the new folder, keywords naming the framework and its meta-frameworks.
  • Dependencies: @fasterfixes/widget at workspace:^, 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 for app.onUnmount), and a dev dependency for tests.
  • tsdown.config.ts: the framework in deps.neverBundle, so the app's copy is used.
  • .lintstagedrc: add an ESLint entry for the folder, as for packages/widget-vue.
  • Adding dependencies is the one deliberate pnpm install: check the pnpm-lock.yaml diff 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 init as 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 subscribe per 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(), because destroy drops every listener.
  • A second install on the same app is a no-op with a development-only [faster-fixes] warning, using the guarded process.env.NODE_ENV check (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:

  1. The option object reaches init one to one.
  2. Server rendering through the framework's server renderer never calls init and renders children with the unmounted values.
  3. The accessor throws a clear error outside the install.
  4. The three state members reflect the instance, and update when the fake emits.
  5. The four actions call the instance methods.
  6. Destroying the app destroys the instance and leaves listenerCount at 0.
  7. A second install calls init once and warns once in development, never in production.
  8. Several consumers share one subscription (listenerCount 1) and all update on emit.

Done when all eight pass und

Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

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), без исполняемых скриптов.

Похожие скиллы

Сравнить framework-embed с