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分析代码并建议修复。自动修复器通过--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
performance-investigation
sveltejs
调查性能回归问题,并寻找优化机会
official
writing-opencode-plugins
sveltejs
OpenCode插件,@opencode-ai/plugin,@opencode-ai/plugin/tui,插件钩子,自定义工具,TUI路由,插槽,键位映射,以及打包。在创建时使用…
official
scenario-writer
sveltejs
根据用户的描述选择要创建的新场景,将其写作任务委托给 ai-scenario-writer 子代理,并验证其正确性。
official