scenario-writer

bởi sveltejs

Chọn một kịch bản mới để tạo dựa trên mô tả của người dùng, ủy quyền viết kịch bản đó cho tiểu tác nhân ai-scenario-writer và xác minh tính chính xác.

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.

Thêm skills từ sveltejs

performance-investigation
sveltejs
Điều tra suy giảm hiệu suất và tìm cơ hội tối ưu hóa
official
svelte-code-writer
sveltejs
Công cụ CLI để tra cứu tài liệu Svelte 5 và phân tích mã với trình tự sửa lỗi tích hợp. Ba lệnh chính: list-sections để duyệt tài liệu có sẵn, get-documentation để lấy tài liệu đầy đủ cho các chủ đề cụ thể, và svelte-autofixer để phân tích mã và đề xuất sửa lỗi. Trình tự sửa lỗi hỗ trợ nhắm mục tiêu Svelte 4 và 5 qua cờ --svelte-version và chế độ async qua tùy chọn --async. Chấp nhận cả mã nội tuyến (với ký tự $ được thoát) và đường dẫn tệp để phân tích. Được thiết kế để sử dụng trong...
official
svelte-core-bestpractices
sveltejs
Hướng dẫn viết mã Svelte nhanh, mạnh mẽ, hiện đại. Tải kỹ năng này bất cứ khi nào đang trong dự án Svelte và được yêu cầu viết/chỉnh sửa hoặc phân tích một thành phần Svelte hoặc…
official
svelte-code-writer
sveltejs
Công cụ CLI để tra cứu tài liệu Svelte 5 và phân tích mã. PHẢI được sử dụng khi tạo, chỉnh sửa hoặc phân tích bất kỳ thành phần Svelte (.svelte) hoặc 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
Chọn một kịch bản mới để tạo dựa trên mô tả của người dùng, giao việc viết kịch bản cho tiểu tác nhân ai-scenario-writer và xác minh tính chính xác.
official
performance-investigation
sveltejs
Điều tra các vấn đề suy giảm hiệu suất và tìm cơ hội tối ưu hóa
official
writing-opencode-plugins
sveltejs
Plugin OpenCode, @opencode-ai/plugin, @opencode-ai/plugin/tui, hook plugin, công cụ tùy chỉnh, tuyến TUI, slot, keymap và đóng gói. Sử dụng khi tạo,…
official