scenario-writer

Выбирает новый сценарий для создания на основе описания пользователя, делегирует его написание под-агенту ai-scenario-writer и проверяет корректность.

npx skills add https://github.com/sveltejs/ai --skill scenario-writer

Implement the scenario proposed by the user if that has not been implemented yet. Then invoke the ai-scenario-writer subagent to actually write the test in a separate context. When it finishes please validate its work and launch a new subagent with a new task if the user proposed multiple scenarios (or to correct the work of the last one).

Test Structure

Each test in the tests/ directory should have:

tests/
  {test-name}/
    Reference.svelte  - Reference implementation (known-good solution)
    test.ts          - Vitest test file (imports "./Component.svelte")
    prompt.md        - Prompt for the AI agent
    validator.ts     - Extra validation to verify with static analysis that the code written adhere to Svelte best practices

The benchmark:

  1. Reads the prompt from prompt.md
  2. Asks the agent to generate a component
  3. Writes the generated component to a temporary location
  4. Runs the tests against the generated component
  5. Reports pass/fail status

Verifying Reference Implementations

To verify that all reference implementations pass their tests:

bun run verify-tests

This copies each Reference.svelte to Component.svelte temporarily and runs the tests.

Больше skills от sveltejs

performance-investigation
sveltejs
Исследовать регрессии производительности и найти возможности для оптимизации
official
svelte-code-writer
sveltejs
CLI-инструменты для поиска документации Svelte 5 и анализа кода со встроенным автоисправителем. Три основные команды: list-sections для просмотра доступной документации, get-documentation для получения полной документации по конкретным темам и svelte-autofixer для анализа кода и предложения исправлений. Автоисправитель поддерживает Svelte 4 и 5 с помощью флага --svelte-version и асинхронный режим через флаг --async. Принимает как встроенный код (с экранированными символами $), так и пути к файлам для анализа. Предназначен для использования в...
official
svelte-core-bestpractices
sveltejs
Руководство по написанию быстрого, надёжного и современного кода на Svelte. Загружайте этот навык, когда работаете в проекте на Svelte и вас просят написать, отредактировать или проанализировать компонент Svelte или…
official
writing-opencode-plugins
sveltejs
Плагины OpenCode, @opencode-ai/plugin, @opencode-ai/plugin/tui, хуки плагинов, пользовательские инструменты, маршруты TUI, слоты, раскладки клавиш и упаковка. Используйте при создании,…
official