scenario-writer

作者: sveltejs

根據用戶的描述選擇一個新的場景來創作,將其寫作任務委派給 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.

來自 sveltejs 的更多技能

performance-investigation
sveltejs
調查效能回歸並尋找優化機會
official
svelte-code-writer
sveltejs
Svelte 5 文件查詢與程式碼分析的 CLI 工具,內建自動修復功能。三個核心指令:list-sections 瀏覽可用文件、get-documentation 取得特定主題的完整文件、svelte-autofixer 分析程式碼並建議修復。Autofixer 支援透過 --svelte-version 標記指定 Svelte 4 或 5 版本,以及透過 --async 選項啟用非同步模式。接受內嵌程式碼(含跳脫的 $ 字元)與檔案路徑進行分析。設計用於...
official
svelte-core-bestpractices
sveltejs
撰寫快速、穩健、現代化 Svelte 程式碼的指南。在 Svelte 專案中,當被要求撰寫、編輯或分析 Svelte 元件或……時,請載入此技能。
official
svelte-code-writer
sveltejs
Svelte 5 文件查詢與程式碼分析的 CLI 工具。在建立、編輯或分析任何 Svelte 元件(.svelte)或 Svelte…時,必須使用此工具。
official
svelte-core-bestpractices
sveltejs
Guidance on writing fast, robust, modern Svelte code. Load this skill whenever in a Svelte project and asked to write/edit or analyze a Svelte component or…
official
scenario-writer
sveltejs
根據使用者的描述挑選要建立的新情境,將撰寫工作委派給 ai-scenario-writer 子代理,並驗證其正確性。
official
performance-investigation
sveltejs
調查效能回歸並尋找最佳化的機會
official
writing-opencode-plugins
sveltejs
OpenCode 插件、@opencode-ai/plugin、@opencode-ai/plugin/tui、插件鉤子、自訂工具、TUI 路由、插槽、按鍵映射與封裝。用於建立、…
official