scenario-writer

โดย sveltejs

เลือกสถานการณ์ใหม่ที่จะสร้างตามคำอธิบายของผู้ใช้ มอบหมายการเขียนให้กับ ai-scenario-writer subagent และตรวจสอบความถูกต้อง

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 เพื่อวิเคราะห์โค้ดและแนะนำการแก้ไข Autofixer รองรับ Svelte 4 และ 5 โดยกำหนดเป้าหมายผ่านแฟล็ก --svelte-version และโหมด async ผ่านแฟล็ก --async รองรับทั้งโค้ดแบบอินไลน์ (ที่มีอักขระ $ ที่ถูก Escape) และพาธไฟล์สำหรับการวิเคราะห์ ออกแบบมาเพื่อใช้ภายใน...
official
svelte-core-bestpractices
sveltejs
คำแนะนำในการเขียนโค้ด Svelte ที่รวดเร็ว แข็งแกร่ง และทันสมัย โหลดสกิลนี้เมื่ออยู่ในโปรเจกต์ Svelte และถูกขอให้เขียน/แก้ไข หรือวิเคราะห์คอมโพเนนต์ Svelte หรือ…
official
svelte-code-writer
sveltejs
เครื่องมือ CLI สำหรับค้นหาเอกสาร Svelte 5 และวิเคราะห์โค้ด ต้องใช้เมื่อสร้าง แก้ไข หรือวิเคราะห์คอมโพเนนต์ 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