[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M786JXR18KB7KM7MS6346ZXS":3,"skill-same:01M786JXR18KB7KM7MS6346ZXS":49},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":29,"commitSha":30,"skillDirectory":31,"forksCount":14,"repositoryHtmlUrl":32,"repositoryHomepageUrl":6,"ownerHtmlUrl":33,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":34,"install":35,"resources":48},"01M786JXR18KB7KM7MS6346ZXS","js-testing",null,"Use ONLY when user explicitly requests JavaScript\u002FTypeScript test code, Vitest\u002FJest configuration, test failure diagnosis, or coverage improvement for JS\u002FTS projects.\nTriggers: \"write test js\", \"vitest\", \"jest\", \"react test\", \"vue test\", \"MSW\", \"playwright\", \"fast-check\", \"coverage js\", \"snapshot test\", \"testing-library\".\nDo NOT activate for: general JS\u002FTS coding without test context, build tool configuration (Vite\u002Fwebpack), npm\u002Fpnpm\u002Fyarn install issues, or TypeScript type-only questions.","chenziyang110\u002Flaunchdeck","chenziyang110","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43693913?v=4","01M7863EBWK1D0P6A29YGEMAS4","Robin11","01M7863ECM1VB6RXDMHTW90D2T",0,"MIT","https:\u002F\u002Fgithub.com\u002Fchenziyang110\u002Flaunchdeck\u002Fblob\u002Fmain\u002F.codex\u002Fskills\u002Fjs-testing\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: \"js-testing\"\ndescription: \"Use ONLY when user explicitly requests JavaScript\u002FTypeScript test code, Vitest\u002FJest configuration,\ntest failure diagnosis, or coverage improvement for JS\u002FTS projects.\n\nTriggers: \\\"write test js\\\", \\\"vitest\\\", \\\"jest\\\", \\\"react test\\\", \\\"vue test\\\", \\\"MSW\\\",\n\\\"playwright\\\", \\\"fast-check\\\", \\\"coverage js\\\", \\\"snapshot test\\\", \\\"testing-library\\\".\n\nDo NOT activate for: general JS\u002FTS coding without test context, build tool configuration\n(Vite\u002Fwebpack), npm\u002Fpnpm\u002Fyarn install issues, or TypeScript type-only questions.\n\"\ncompatibility: \"Requires spec-kit project structure with .specify\u002F directory\"\nmetadata:\n  author: \"github-spec-kit\"\n  source: \"templates\u002Fpassive-skills\u002Fjs-testing\u002FSKILL.md\"\n---\n\n\n# JS\u002FTS Testing (Agent Skill)\n\nAgent-focused testing workflow for modern JavaScript\u002FTypeScript using Vitest, the fastest-growing test framework with native Vite integration.\n\n## When to Use\n\n- Writing new JS\u002FTS tests or fixing existing tests\n- Designing unit\u002Fintegration test coverage for JS\u002FTS components\n- Adding test coverage, CI gating, or regression protection\n- Configuring Vitest\u002FJest workflows for consistent execution\n- Investigating test failures or flaky behavior\n- Testing browser, Node, or isomorphic code\n\n### When NOT to Use\n\n- Implementing new product features without test changes\n- Large-scale refactors unrelated to test coverage or failures\n- Performance tuning without test regressions to validate\n- Non-JS\u002FTS projects or non-test tasks\n\n### Stop Conditions — When to ASK instead of generating\n\nBefore generating any test code, STOP and ask the user if:\n- The code under test has **zero testability** (no module exports, global side-effects, hard-coded fetch\u002Faxios)\n- **No test framework** is detected in the project (no vitest.config.ts, jest.config, test script in package.json)\n- The request is **ambiguous**: \"test my app\" or \"add tests\" without specifying files or components\n- A **required test dependency** (vitest, jest, @testing-library, MSW) is not installed\n- The test would require **secrets, real credentials, or production API access**\n\n## Core Concepts\n\n- **TDD loop**: red → green → refactor (tests first, minimal fix, then cleanups).\n- **Isolation**: prefer dependency injection and mocks over global state.\n- **Test layout**: `src\u002F__tests__\u002F` co-located, or `tests\u002Funit`, `tests\u002Fintegration`, `tests\u002Ffixtures`.\n- **Mocks vs fakes**: mock for interactions (`vi.mock`, `vi.spyOn`), fake for stateful behavior.\n- **In-source testing**: Vitest supports `.test.ts` co-located with source.\n- **CI signal**: run affected tests first, then full suite with `--reporter=junit`.\n\n## Agent Execution Protocol\n\nWhen this skill is activated, follow this exact execution sequence:\n\n### Phase 1: Context Analysis\nBefore writing any test code:\n1. Identify the runtime (Node\u002FBrowser) and framework (Vitest preferred, Jest if existing).\n2. Check for existing test files (`*.test.ts`, `*.spec.ts`) to infer naming conventions and style.\n3. Analyze the code under test: identify public API surface, side effects, HTTP calls, DOM interactions, and async patterns.\n4. Determine request type: (a) new tests, (b) fixing broken tests, (c) coverage improvement, (d) flaky test diagnosis.\n\n### Phase 2: Strategy Selection\nBased on Phase 1, select the appropriate strategy:\n- **Pure functions \u002F utilities**: unit tests only, no mocks needed. Use `describe`\u002F`it` with `expect`.\n- **HTTP \u002F API calls**: use MSW (Mock Service Worker) to intercept network requests; avoid mocking `fetch` directly.\n- **React\u002FVue components**: use Testing Library (`@testing-library\u002Freact`, `@testing-library\u002Fvue`); test behavior, not implementation.\n- **E2E flows**: use Playwright for critical user journeys.\n- **Async code**: use `async\u002Fawait` in tests; use `waitFor` for DOM assertions, `vi.advanceTimersByTime` for timers.\n\n### Decision Tree (Complex Scenarios)\n\n```text\nQ1: External I\u002FO (HTTP, localStorage, IndexedDB, filesystem)?\n  → Yes → Q2\n  → No  → Pure unit test, no mocks needed\n\nQ2: Mockable at boundary (module import, fetch wrapper, axios instance)?\n  → Yes → Mock at boundary (vi.mock, MSW, jest.mock)\n  → No  → Q3\n\nQ3: Needs real network behavior verification (API contract, error responses)?\n  → Yes → MSW handlers with real-like responses\n  → No  → Simple mock with hardcoded return values\n\nQ4: Async (Promises\u002FObservables\u002Fasync-await)?\n  → Yes → await\u002Fexpect().resolves\u002Fexpect().rejects\n  → No  → Synchronous test sufficient\n\nQ5: Browser rendering \u002F user interaction?\n  → Yes → Component test (RTL, Vue Test Utils) ⋯ or E2E (Playwright, Cypress)\n  → No  → Standard unit test with Vitest\u002FJest\n```\n\n### Phase 3: Test Case Design\nApply systematic test design before coding:\n1. **Happy path**: normal input → expected output\u002FDOM state.\n2. **Boundary values**: empty arrays, `null`, `undefined`, `0`, `NaN`, empty strings.\n3. **Error cases**: rejected promises, thrown errors, 4xx\u002F5xx responses, invalid props.\n4. **Interaction & state**: user events (click, type), form validation, loading\u002Ferror\u002Fsuccess states.\n\n### Phase 4: Code Generation\nOutput tests in this exact structure:\n```\n#### Test Strategy Summary\n- [ ] Scope: Unit \u002F Component \u002F Integration \u002F E2E\n- [ ] Framework: Vitest (or Jest) + Testing Library + MSW (if HTTP)\n- [ ] Mocking: Yes\u002FNo — vi.mock \u002F MSW \u002F Playwright\n- [ ] Edge cases covered: \u003Clist>\n\n#### Generated Test Code\n\u003Cfile_path>\n\u003Ccode>\n\n#### Running Commands\n```bash\nnpx vitest run \u003Cfile_path>\nnpx vitest run --coverage\n```\n\n#### Coverage Impact (if applicable)\n- Estimated coverage change: \u003CX%>\n- Command to verify: `npx vitest run --coverage`\n```\n\n### Phase 5: Verification Checklist\nBefore completing, verify:\n- [ ] Tests run without parse errors (`npx vitest run`).\n- [ ] Each test has exactly one logical assertion focus.\n- [ ] Mocks are reset between tests (`vi.clearAllMocks()` in `beforeEach`).\n- [ ] No `setTimeout` used for synchronization (use `waitFor` or `vi.useFakeTimers`).\n- [ ] Flaky test guardrails applied (isolation, no real network in unit tests).\n\n## TDD Workflow\n\nFollow the RED → GREEN → REFACTOR loop:\n\n1. **RED**: write a failing test that captures the new behavior\n2. **GREEN**: implement the smallest change to pass\n3. **REFACTOR**: clean up while tests stay green\n\n```ts\n\u002F\u002F add.test.ts\nimport { describe, it, expect } from 'vitest'\n\nfunction add(a: number, b: number): number \u002F\u002F Provided by production code.\n\ndescribe('add', () => {\n  it('adds two numbers', () => { \u002F\u002F RED\n    expect(add(2, 3)).toBe(5)\n  })\n})\n\n\u002F\u002F src\u002Fadd.ts\nexport function add(a: number, b: number): number { \u002F\u002F GREEN\n  return a + b\n}\n\n\u002F\u002F REFACTOR: simplify\u002Frename once tests pass\n```\n\n## Code Examples\n\n### Basic Unit Test (Vitest)\n\n```ts\n\u002F\u002F calculator.test.ts\nimport { describe, it, expect } from 'vitest'\n\nfunction add(a: number, b: number): number \u002F\u002F Provided by production code.\n\ndescribe('Calculator', () => {\n  it('adds two numbers', () => {\n    expect(add(2, 3)).toBe(5)\n  })\n})\n```\n\n### Setup \u002F Teardown (Vitest)\n\n```ts\n\u002F\u002F user-store.test.ts\nimport { describe, it, expect, beforeEach, afterEach } from 'vitest'\n\ninterface User { name: string }\nclass UserStore {\n  private users: User[] = []\n  seed(users: User[]) { this.users.push(...users) }\n  find(name: string): User | undefined {\n    return this.users.find(u => u.name === name)\n  }\n}\n\ndescribe('UserStore', () => {\n  let store: UserStore\n\n  beforeEach(() => {\n    store = new UserStore()\n    store.seed([{ name: 'alice' }, { name: 'bob' }])\n  })\n\n  it('finds existing user', () => {\n    const user = store.find('alice')\n    expect(user).toBeDefined()\n    expect(user!.name).toBe('alice')\n  })\n})\n```\n\n### Mocking (vi.mock \u002F vi.spyOn)\n\n```ts\n\u002F\u002F notifier.test.ts\nimport { describe, it, expect, vi } from 'vitest'\n\ninterface Notifier {\n  send(message: string): void\n}\n\nclass Service {\n  constructor(private notifier: Notifier) {}\n  publish(message: string) { this.notifier.send(message) }\n}\n\ndescribe('Service', () => {\n  it('sends notifications', () => {\n    const notifier: Notifier = { send: vi.fn() }\n    const service = new Service(notifier)\n\n    service.publish('hello')\n\n    expect(notifier.send).toHaveBeenCalledWith('hello')\n    expect(notifier.send).toHaveBeenCalledTimes(1)\n  })\n})\n```\n\n### Async Test\n\n```ts\n\u002F\u002F api.test.ts\nimport { describe, it, expect, vi } from 'vitest'\n\nasync function fetchUser(id: string): Promise\u003C{ name: string }> {\n  return { name: 'alice' }\n}\n\ndescribe('API', () => {\n  it('fetches user data', async () => {\n    const user = await fetchUser('1')\n    expect(user.name).toBe('alice')\n  })\n\n  it('handles errors', async () => {\n    await expect(fetchUser('invalid')).rejects.toThrow()\n  })\n})\n```\n\n### Snapshot Testing\n\n```ts\n\u002F\u002F component.test.tsx\nimport { describe, it, expect } from 'vitest'\nimport { render } from '@testing-library\u002Freact'\nimport Button from '.\u002FButton'\n\ndescribe('Button', () => {\n  it('renders correctly', () => {\n    const { container } = render(\u003CButton label=\"Click me\" \u002F>)\n    expect(container).toMatchSnapshot()\n  })\n})\n```\n\n## Package.json Quickstart\n\n```jsonc\n\u002F\u002F package.json\n{\n  \"scripts\": {\n    \"test\": \"vitest\",\n    \"test:run\": \"vitest run\",\n    \"test:coverage\": \"vitest run --coverage\",\n    \"test:ui\": \"vitest --ui\"\n  },\n  \"devDependencies\": {\n    \"vitest\": \"^3.0.0\",\n    \"@testing-library\u002Freact\": \"^16.0.0\",\n    \"msw\": \"^2.0.0\",\n    \"fast-check\": \"^3.0.0\"\n  }\n}\n```\n\n## Vitest Configuration\n\n```ts\n\u002F\u002F vitest.config.ts\nimport { defineConfig } from 'vitest\u002Fconfig'\n\nexport default defineConfig({\n  test: {\n    globals: true,\n    environment: 'node',  \u002F\u002F or 'jsdom' \u002F 'happy-dom' for browser\n    include: ['src\u002F**\u002F*.{test,spec}.{ts,tsx}'],\n    coverage: {\n      provider: 'v8',\n      reporter: ['text', 'json', 'html'],\n      include: ['src\u002F**'],\n      exclude: ['src\u002F**\u002F*.test.ts', 'src\u002F**\u002F*.spec.ts'],\n    },\n  },\n})\n```\n\n```bash\nnpx vitest                    # watch mode\nnpx vitest run                # single run\nnpx vitest run --reporter=junit  # CI output\nnpx vitest run --coverage     # with coverage\n```\n\n## Running Tests\n\n```bash\nnpx vitest run\nnpx vitest run src\u002Fcalculator.test.ts\nnpx vitest run --reporter=junit --outputFile=test-results.xml\nnpx vitest related src\u002Fcalculator.ts\n```\n\n## Debugging Failures\n\n1. Re-run the single failing test with `.only()` or `--testNamePattern`.\n2. Add `--reporter=verbose` for detailed output.\n3. Use `console.log` with `--reporter=verbose` since Vitest captures stdout.\n4. Use `--ui` mode for interactive debugging.\n5. Expand to full suite once the root cause is fixed.\n\n## Coverage\n\n```bash\nnpx vitest run --coverage\nnpx vitest run --coverage --coverage.reporter=lcov\n```\n\n```ts\n\u002F\u002F vitest.config.ts — coverage configuration\nimport { defineConfig } from 'vitest\u002Fconfig'\n\nexport default defineConfig({\n  test: {\n    coverage: {\n      provider: 'v8',\n      reporter: ['text', 'json', 'html', 'lcov'],\n      thresholds: {\n        branches: 80,\n        functions: 80,\n        lines: 80,\n        statements: 80,\n      },\n    },\n  },\n})\n```\n\n## Mocking HTTP with MSW\n\nMSW (Mock Service Worker) is the modern standard for intercepting and mocking HTTP requests in JavaScript\u002FTypeScript tests. Unlike mocking `fetch` directly, MSW operates at the network level, making tests more realistic and easier to maintain.\n\n```ts\n\u002F\u002F tests\u002Fmocks\u002Fhandlers.ts\nimport { http, HttpResponse } from 'msw'\n\nexport const handlers = [\n  http.get('\u002Fapi\u002Fuser\u002F:id', ({ params }) => {\n    return HttpResponse.json({ id: params.id, name: 'alice' })\n  }),\n]\n```\n\n```ts\n\u002F\u002F tests\u002Fmocks\u002Fserver.ts\nimport { setupServer } from 'msw\u002Fnode'\nimport { handlers } from '.\u002Fhandlers'\n\nexport const server = setupServer(...handlers)\n```\n\n```ts\n\u002F\u002F vitest.setup.ts\nimport { beforeAll, afterAll, afterEach } from 'vitest'\nimport { server } from '.\u002Ftests\u002Fmocks\u002Fserver'\n\nbeforeAll(() => server.listen({ onUnhandledRequest: 'error' }))\nafterEach(() => server.resetHandlers())\nafterAll(() => server.close())\n```\n\n```ts\n\u002F\u002F tests\u002Fapi.test.ts\nimport { describe, it, expect } from 'vitest'\nimport { http, HttpResponse } from 'msw'\nimport { server } from '.\u002Fmocks\u002Fserver'\n\ndescribe('fetchUser', () => {\n  it('returns user data', async () => {\n    const user = await fetchUser('1')\n    expect(user.name).toBe('alice')\n  })\n\n  it('handles server errors', async () => {\n    server.use(\n      http.get('\u002Fapi\u002Fuser\u002F:id', () => {\n        return new HttpResponse(null, { status: 500 })\n      })\n    )\n    await expect(fetchUser('1')).rejects.toThrow('Server error')\n  })\n})\n```\n\n## E2E Testing with Playwright\n\nFor critical user journeys, use Playwright instead of unit tests.\n\n```ts\n\u002F\u002F tests\u002Fe2e\u002Flogin.spec.ts\nimport { test, expect } from '@playwright\u002Ftest'\n\ntest('user can log in', async ({ page }) => {\n  await page.goto('\u002Flogin')\n  await page.fill('[name=email]', 'alice@example.com')\n  await page.fill('[name=password]', 'secret')\n  await page.click('button[type=submit]')\n  await expect(page).toHaveURL('\u002Fdashboard')\n  await expect(page.locator('h1')).toContainText('Welcome')\n})\n```\n\n```bash\nnpx playwright test\nnpx playwright test --ui\nnpx playwright test --headed\n```\n\n## CI\u002FCD Integration (GitHub Actions)\n\n```yaml\n# .github\u002Fworkflows\u002Ftest.yml\nname: Test\non: [push, pull_request]\njobs:\n  test:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fcheckout@v4\n      - uses: actions\u002Fsetup-node@v4\n        with: { node-version: '22' }\n      - run: npm ci\n      - run: npx vitest run --coverage --reporter=junit --outputFile=report.xml\n      - uses: actions\u002Fupload-artifact@v4\n        if: always()\n        with: { name: test-results, path: report.xml }\n```\n\n## Flaky Tests Guardrails\n\n- Never use `setTimeout` for synchronization; use `waitFor` from Testing Library.\n- Make temp directories unique per test with `fs.mkdtempSync()`.\n- Avoid real time, network, or filesystem dependencies in unit tests.\n- Use `vi.useFakeTimers()` for time-dependent code.\n- Reset mocks between tests with `vi.clearAllMocks()` or `vi.resetAllMocks()`.\n\n## Test Case Design Patterns\n\nApply these systematic patterns before writing test code to ensure robust coverage beyond the happy path.\n\n### 1. Boundary Value Analysis\nTest at the edges of valid input domains: empty, zero, maximum, null, undefined, and just-outside valid ranges.\n\n```ts\n\u002F\u002F tests\u002Fvalidator.test.ts\nimport { describe, it, expect } from 'vitest'\n\ndescribe('validateInput', () => {\n  it.each([\n    ['', 'empty string'],\n    [null, 'null'],\n    [undefined, 'undefined'],\n    ['a'.repeat(10001), 'too long'],\n    ['\u003Cscript>alert(1)\u003C\u002Fscript>', 'xss attempt'],\n  ])('rejects %s (%s)', (input) => {\n    expect(() => validateInput(input)).toThrow()\n  })\n})\n```\n\n### 2. Negative \u002F Error Case Testing\nVerify the system behaves correctly under invalid or unexpected conditions.\n\n```ts\n\u002F\u002F tests\u002Fcalculator.test.ts\nimport { describe, it, expect } from 'vitest'\n\ndescribe('divide', () => {\n  it('throws on divide by zero', () => {\n    expect(() => divide(10, 0)).toThrow('Division by zero')\n  })\n})\n```\n\n### 3. State-Based Testing\nFor objects with internal state, verify transitions between states are correct and irreversible where expected.\n\n```ts\n\u002F\u002F tests\u002Fconnection.test.ts\nimport { describe, it, expect } from 'vitest'\n\ndescribe('Connection', () => {\n  it('transitions through states', () => {\n    const conn = new Connection()\n    expect(conn.state).toBe('closed')\n    conn.open()\n    expect(conn.state).toBe('open')\n    conn.close()\n    expect(conn.state).toBe('closed')\n    \u002F\u002F Idempotency\n    conn.close()\n    expect(conn.state).toBe('closed')\n  })\n})\n```\n\n## Common Test Smells to Avoid\n\n- **Assertion Roulette**: Many assertions without descriptive messages, making failure diagnosis ambiguous. *Fix: Use `expect(value, 'description').toBe(...)` or descriptive `describe`\u002F`it` blocks.*\n- **Happy Path Bias**: Only testing successful scenarios, leaving error paths uncovered. *Fix: Test rejected promises, `null`\u002F`undefined`\u002Fempty inputs, 4xx\u002F5xx responses.*\n- **Mock Overdose**: Too many mocks hiding integration issues or coupling tests to implementation. *Fix: Mock only at boundaries (HTTP with MSW, timers with `vi.useFakeTimers()`).*\n- **The Free Ride**: Tests that execute code but assert nothing meaningful (e.g., `expect(true).toBe(true)`). *Fix: Every test must have at least one specific, falsifiable assertion.*\n- **Obscure Test**: Long, complex test methods with no clear arrange\u002Fact\u002Fassert structure. *Fix: Follow AAA, avoid testing implementation details (test behavior, not state).*\n- **Flaky Test**: Non-deterministic results from async, timers, or DOM. *Fix: Use `waitFor`, `act()`, `vi.useFakeTimers()`, avoid real network in unit tests.*\n\n## Best Practices\n\n### DO\n\n- Keep tests deterministic and isolated\n- Prefer dependency injection over globals\n- Use `describe` \u002F `it` nesting for readable test structure\n- Separate unit vs integration tests in directory structure or config\n- Run type checking with `vitest --typecheck`\n- Use Testing Library for DOM\u002Fcomponent tests (React, Vue, etc.)\n\n### DON'T\n\n- Don't depend on real time or network in unit tests\n- Don't use `setTimeout` as synchronization when `waitFor` can be used\n- Don't over-mock simple value objects\n- Don't snapshot large dynamic objects that change frequently\n- Don't test implementation details (private methods, internal state)\n\n### Common Pitfalls\n\n- **Leaking mock state** → Use `beforeEach` with `vi.clearAllMocks()`.\n- **Relying on real timers** → Use `vi.useFakeTimers()` with `vi.advanceTimersByTime()`.\n- **Flaky async tests** → Use `waitFor` or proper `await` instead of arbitrary timeouts.\n- **Global test pollution** → Reset modules with `vi.resetModules()` in `beforeEach`.\n- **Over-mocking** → Prefer integration-style tests that use real implementations for core logic.\n- **Missing type checks** → Enable `--typecheck` flag in CI.\n- **Brittle snapshots** → Keep snapshots small; prefer inline snapshots for critical structure.\n\n## Optional Appendix: Property-Based Testing\n\nOnly use if the project already supports fast-check or similar.\n\n- **fast-check**: property-based testing for TypeScript\u002FJavaScript.\n\n```ts\nimport { describe, it } from 'vitest'\nimport * as fc from 'fast-check'\n\nfunction add(a: number, b: number): number { return a + b }\n\ndescribe('add', () => {\n  it('is commutative', () => {\n    fc.assert(\n      fc.property(fc.integer(), fc.integer(), (a, b) => {\n        expect(add(a, b)).toBe(add(b, a))\n      })\n    )\n  })\n})\n```\n\n## Alternatives to Vitest\n\n- **Jest**: mature, massive ecosystem, slower migration path.\n- **Mocha + Chai**: flexible, no built-in mocking, requires more configuration.\n- **Node test runner**: built-in since Node 20, minimal setup for simple projects.\n","# JS\u002FTS Testing (Agent Skill)\n\nAgent-focused testing workflow for modern JavaScript\u002FTypeScript using Vitest, the fastest-growing test framework with native Vite integration.\n\n## When to Use\n\n- Writing new JS\u002FTS tests or fixing existing tests\n- Designing unit\u002Fintegration test coverage for JS\u002FTS components\n- Adding test coverage, CI gating, or regression protection\n- Configuring Vitest\u002FJest workflows for consistent execution\n- Investigating test failures or flaky behavior\n- Testing browser, Node, or isomorphic code\n\n### When NOT to Use\n\n- Implementing new product features without test changes\n- Large-scale refactors unrelated to test coverage or failures\n- Performance tuning without test regressions to validate\n- Non-JS\u002FTS projects or non-test tasks\n\n### Stop Conditions — When to ASK instead of generating\n\nBefore generating any test code, STOP and ask the user if:\n- The code under test has **zero testability** (no module exports, global side-effects, hard-coded fetch\u002Faxios)\n- **No test framework** is detected in the project (no vitest.config.ts, jest.config, test script in package.json)\n- The request is **ambiguous**: \"test my app\" or \"add tests\" without specifying files or components\n- A **required test dependency** (vitest, jest, @testing-library, MSW) is not installed\n- The test would require **secrets, real credentials, or production API access**\n\n## Core Concepts\n\n- **TDD loop**: red → green → refactor (tests first, minimal fix, then cleanups).\n- **Isolation**: prefer dependency injection and mocks over global state.\n- **Test layout**: `src\u002F__tests__\u002F` co-located, or `tests\u002Funit`, `tests\u002Fintegration`, `tests\u002Ffixtures`.\n- **Mocks vs fakes**: mock for interactions (`vi.mock`, `vi.spyOn`), fake for stateful behavior.\n- **In-source testing**: Vitest supports `.test.ts` co-located with source.\n- **CI signal**: run affected tests first, then full suite with `--reporter=junit`.\n\n## Agent Execution Protocol\n\nWhen this skill is activated, follow this exact execution sequence:\n\n### Phase 1: Context Analysis\nBefore writing any test code:\n1. Identify the runtime (Node\u002FBrowser) and framework (Vitest preferred, Jest if existing).\n2. Check for existing test files (`*.test.ts`, `*.spec.ts`) to infer naming conventions and style.\n3. Analyze the code under test: identify public API surface, side effects, HTTP calls, DOM interactions, and async patterns.\n4. Determine request type: (a) new tests, (b) fixing broken tests, (c) coverage improvement, (d) flaky test diagnosis.\n\n### Phase 2: Strategy Selection\nBased on Phase 1, select the appropriate strategy:\n- **Pure functions \u002F utilities**: unit tests only, no mocks needed. Use `describe`\u002F`it` with `expect`.\n- **HTTP \u002F API calls**: use MSW (Mock Service Worker) to intercept network requests; avoid mocking `fetch` directly.\n- **React\u002FVue components**: use Testing Library (`@testing-library\u002Freact`, `@testing-library\u002Fvue`); test behavior, not implementation.\n- **E2E flows**: use Playwright for critical user journeys.\n- **Async code**: use `async\u002Fawait` in tests; use `waitFor` for DOM assertions, `vi.advanceTimersByTime` for timers.\n\n### Decision Tree (Complex Scenarios)\n\n```text\nQ1: External I\u002FO (HTTP, localStorage, IndexedDB, filesystem)?\n  → Yes → Q2\n  → No  → Pure unit test, no mocks needed\n\nQ2: Mockable at boundary (module import, fetch wrapper, axios instance)?\n  → Yes → Mock at boundary (vi.mock, MSW, jest.mock)\n  → No  → Q3\n\nQ3: Needs real network behavior verification (API contract, error responses)?\n  → Yes → MSW handlers with real-like responses\n  → No  → Simple mock with hardcoded return values\n\nQ4: Async (Promises\u002FObservables\u002Fasync-await)?\n  → Yes → await\u002Fexpect().resolves\u002Fexpect().rejects\n  → No  → Synchronous test sufficient\n\nQ5: Browser rendering \u002F user interaction?\n  → Yes → Component test (RTL, Vue Test Utils) ⋯ or E2E (Playwright, Cypress)\n  → No  → Standard unit test with Vitest\u002FJest\n```\n\n### Phase 3: Test Case Design\nApply systematic test design before coding:\n1. **Happy path**: normal input → expected output\u002FDOM state.\n2. **Boundary values**: empty arrays, `null`, `undefined`, `0`, `NaN`, empty strings.\n3. **Error cases**: rejected promises, thrown errors, 4xx\u002F5xx responses, invalid props.\n4. **Interaction & state**: user events (click, type), form validation, loading\u002Ferror\u002Fsuccess states.\n\n### Phase 4: Code Generation\nOutput tests in this exact structure:\n```\n#### Test Strategy Summary\n- [ ] Scope: Unit \u002F Component \u002F Integration \u002F E2E\n- [ ] Framework: Vitest (or Jest) + Testing Library + MSW (if HTTP)\n- [ ] Mocking: Yes\u002FNo — vi.mock \u002F MSW \u002F Playwright\n- [ ] Edge cases covered: \u003Clist>\n\n#### Generated Test Code\n\u003Cfile_path>\n\u003Ccode>\n\n#### Running Commands\n```bash\nnpx vitest run \u003Cfile_path>\nnpx vitest run --coverage\n```\n\n#### Coverage Impact (if applicable)\n- Estimated coverage change: \u003CX%>\n- Command to verify: `npx vitest run --coverage`\n```\n\n### Phase 5: Verification Checklist\nBefore completing, verify:\n- [ ] Tests run without parse errors (`npx vitest run`).\n- [ ] Each test has exactly one logical assertion focus.\n- [ ] Mocks are reset between tests (`vi.clearAllMocks()` in `beforeEach`).\n- [ ] No `setTimeout` used for synchronization (use `waitFor` or `vi.useFakeTimers`).\n- [ ] Flaky test guardrails applied (isolation, no real network in unit tests).\n\n## TDD Workflow\n\nFollow the RED → GREEN → REFACTOR loop:\n\n1. **RED**: write a failing test that captures the new behavior\n2. **GREEN**: implement the smallest change to pass\n3. **REFACTOR**: clean up while tests stay green\n\n```ts\n\u002F\u002F add.test.ts\nimport { describe, it, expect } from 'vitest'\n\nfunction add(a: number, b: number): number \u002F\u002F Provided by production code.\n\ndescribe('add', () => {\n  it('adds two numbers', () => { \u002F\u002F RED\n    expect(add(2, 3)).toBe(5)\n  })\n})\n\n\u002F\u002F src\u002Fadd.ts\nexport function add(a: number, b: number): number { \u002F\u002F GREEN\n  return a + b\n}\n\n\u002F\u002F REFACTOR: simplify\u002Frename once tests pass\n```\n\n## Code Examples\n\n### Basic Unit Test (Vitest)\n\n```ts\n\u002F\u002F calculator.test.ts\nimport { describe, it, expect } from 'vitest'\n\nfunction add(a: number, b: number): number \u002F\u002F Provided by production code.\n\ndescribe('Calculator', () => {\n  it('adds two numbers', () => {\n    expect(add(2, 3)).toBe(5)\n  })\n})\n```\n\n### Setup \u002F Teardown (Vitest)\n\n```ts\n\u002F\u002F user-store.test.ts\nimport { describe, it, expect, beforeEach, afterEach } from 'vitest'\n\ninterface User { name: string }\nclass UserStore {\n  private users: User[] = []\n  seed(users: User[]) { this.users.push(...users) }\n  find(name: string): User | undefined {\n    return this.users.find(u => u.name === name)\n  }\n}\n\ndescribe('UserStore', () => {\n  let store: UserStore\n\n  beforeEach(() => {\n    store = new UserStore()\n    store.seed([{ name: 'alice' }, { name: 'bob' }])\n  })\n\n  it('finds existing user', () => {\n    const user = store.find('alice')\n    expect(user).toBeDefined()\n    expect(user!.name).toBe('alice')\n  })\n})\n```\n\n### Mocking (vi.mock \u002F vi.spyOn)\n\n```ts\n\u002F\u002F notifier.test.ts\nimport { describe, it, expect, vi } from 'vitest'\n\ninterface Notifier {\n  send(message: string): void\n}\n\nclass Service {\n  constructor(private notifier: Notifier) {}\n  publish(message: string) { this.notifier.send(message) }\n}\n\ndescribe('Service', () => {\n  it('sends notifications', () => {\n    const notifier: Notifier = { send: vi.fn() }\n    const service = new Service(notifier)\n\n    service.publish('hello')\n\n    expect(notifier.send).toHaveBeenCalledWith('hello')\n    expect(notifier.send).toHaveBeenCalledTimes(1)\n  })\n})\n```\n\n### Async Test\n\n```ts\n\u002F\u002F api.test.ts\nimport { describe, it, expect, vi } from 'vitest'\n\nasync function fetchUser(id: string): Promise\u003C{ name: string }> {\n  return { name: 'alice' }\n}\n\ndescribe('API', () => {\n  it('fetches user data', async () => {\n    const user = await fetchUser('1')\n    expect(user.name).toBe('alice')\n  })\n\n  it('handles errors', async () => {\n    await expect(fetchUser('invalid')).rejects.toThrow()\n  })\n})\n```\n\n### Snapshot Testing\n\n```ts\n\u002F\u002F component.test.tsx\nimport { describe, it, expect } from 'vitest'\nimport { render } from '@testing-library\u002Freact'\nimport Button from '.\u002FButton'\n\ndescribe('Button', () => {\n  it('renders correctly', () => {\n    const { container } = render(\u003CButton label=\"Click me\" \u002F>)\n    expect(container).toMatchSnapshot()\n  })\n})\n```\n\n## Package.json Quickstart\n\n```jsonc\n\u002F\u002F package.json\n{\n  \"scripts\": {\n    \"test\": \"vitest\",\n    \"test:run\": \"vitest run\",\n    \"test:coverage\": \"vitest run --coverage\",\n    \"test:ui\": \"vitest --ui\"\n  },\n  \"devDependencies\": {\n    \"vitest\": \"^3.0.0\",\n    \"@testing-library\u002Freact\": \"^16.0.0\",\n    \"msw\": \"^2.0.0\",\n    \"fast-check\": \"^3.0.0\"\n  }\n}\n```\n\n## Vitest Configuration\n\n```ts\n\u002F\u002F vitest.config.ts\nimport { defineConfig } from 'vitest\u002Fconfig'\n\nexport default defineConfig({\n  test: {\n    globals: true,\n    environment: 'node',  \u002F\u002F or 'jsdom' \u002F 'happy-dom' for browser\n    include: ['src\u002F**\u002F*.{test,spec}.{ts,tsx}'],\n    coverage: {\n      provider: 'v8',\n      reporter: ['text', 'json', 'html'],\n      include: ['src\u002F**'],\n      exclude: ['src\u002F**\u002F*.test.ts', 'src\u002F**\u002F*.spec.ts'],\n    },\n  },\n})\n```\n\n```bash\nnpx vitest                    # watch mode\nnpx vitest run                # single run\nnpx vitest run --reporter=junit  # CI output\nnpx vitest run --coverage     # with coverage\n```\n\n## Running Tests\n\n```bash\nnpx vitest run\nnpx vitest run src\u002Fcalculator.test.ts\nnpx vitest run --reporter=junit --outputFile=test-results.xml\nnpx vitest related src\u002Fcalculator.ts\n```\n\n## Debugging Failures\n\n1. Re-run the single failing test with `.only()` or `--testNamePattern`.\n2. Add `--reporter=verbose` for detailed output.\n3. Use `console.log` with `--reporter=verbose` since Vitest captures stdout.\n4. Use `--ui` mode for interactive debugging.\n5. Expand to full suite once the root cause is fixed.\n\n## Coverage\n\n```bash\nnpx vitest run --coverage\nnpx vitest run --coverage --coverage.reporter=lcov\n```\n\n```ts\n\u002F\u002F vitest.config.ts — coverage configuration\nimport { defineConfig } from 'vitest\u002Fconfig'\n\nexport default defineConfig({\n  test: {\n    coverage: {\n      provider: 'v8',\n      reporter: ['text', 'json', 'html', 'lcov'],\n      thresholds: {\n        branches: 80,\n        functions: 80,\n        lines: 80,\n        statements: 80,\n      },\n    },\n  },\n})\n```\n\n## Mocking HTTP with MSW\n\nMSW (Mock Service Worker) is the modern standard for intercepting and mocking HTTP requests in JavaScript\u002FTypeScript tests. Unlike mocking `fetch` directly, MSW operates at the network level, making tests more realistic and easier to maintain.\n\n```ts\n\u002F\u002F tests\u002Fmocks\u002Fhandlers.ts\nimport { http, HttpResponse } from 'msw'\n\nexport const handlers = [\n  http.get('\u002Fapi\u002Fuser\u002F:id', ({ params }) => {\n    return HttpResponse.json({ id: params.id, name: 'alice' })\n  }),\n]\n```\n\n```ts\n\u002F\u002F tests\u002Fmocks\u002Fserver.ts\nimport { setupServer } from 'msw\u002Fnode'\nimport { handlers } from '.\u002Fhandlers'\n\nexport const server = setupServer(...handlers)\n```\n\n```ts\n\u002F\u002F vitest.setup.ts\nimport { beforeAll, afterAll, afterEach } from 'vitest'\nimport { server } from '.\u002Ftests\u002Fmocks\u002Fserver'\n\nbeforeAll(() => server.listen({ onUnhandledRequest: 'error' }))\nafterEach(() => server.resetHandlers())\nafterAll(() => server.close())\n```\n\n```ts\n\u002F\u002F tests\u002Fapi.test.ts\nimport { describe, it, expect } from 'vitest'\nimport { http, HttpResponse } from 'msw'\nimport { server } from '.\u002Fmocks\u002Fserver'\n\ndescribe('fetchUser', () => {\n  it('returns user data', async () => {\n    const user = await fetchUser('1')\n    expect(user.name).toBe('alice')\n  })\n\n  it('handles server errors', async () => {\n    server.use(\n      http.get('\u002Fapi\u002Fuser\u002F:id', () => {\n        return new HttpResponse(null, { status: 500 })\n      })\n    )\n    await expect(fetchUser('1')).rejects.toThrow('Server error')\n  })\n})\n```\n\n## E2E Testing with Playwright\n\nFor critical user journeys, use Playwright instead of unit tests.\n\n```ts\n\u002F\u002F tests\u002Fe2e\u002Flogin.spec.ts\nimport { test, expect } from '@playwright\u002Ftest'\n\ntest('user can log in', async ({ page }) => {\n  await page.goto('\u002Flogin')\n  await page.fill('[name=email]', 'alice@example.com')\n  await page.fill('[name=password]', 'secret')\n  await page.click('button[type=submit]')\n  await expect(page).toHaveURL('\u002Fdashboard')\n  await expect(page.locator('h1')).toContainText('Welcome')\n})\n```\n\n```bash\nnpx playwright test\nnpx playwright test --ui\nnpx playwright test --headed\n```\n\n## CI\u002FCD Integration (GitHub Actions)\n\n```yaml\n# .github\u002Fworkflows\u002Ftest.yml\nname: Test\non: [push, pull_request]\njobs:\n  test:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fcheckout@v4\n      - uses: actions\u002Fsetup-node@v4\n        with: { node-version: '22' }\n      - run: npm ci\n      - run: npx vitest run --coverage --reporter=junit --outputFile=report.xml\n      - uses: actions\u002Fupload-artifact@v4\n        if: always()\n        with: { name: test-results, path: report.xml }\n```\n\n## Flaky Tests Guardrails\n\n- Never use `setTimeout` for synchronization; use `waitFor` from Testing Library.\n- Make temp directories unique per test with `fs.mkdtempSync()`.\n- Avoid real time, network, or filesystem dependencies in unit tests.\n- Use `vi.useFakeTimers()` for time-dependent code.\n- Reset mocks between tests with `vi.clearAllMocks()` or `vi.resetAllMocks()`.\n\n## Test Case Design Patterns\n\nApply these systematic patterns before writing test code to ensure robust coverage beyond the happy path.\n\n### 1. Boundary Value Analysis\nTest at the edges of valid input domains: empty, zero, maximum, null, undefined, and just-outside valid ranges.\n\n```ts\n\u002F\u002F tests\u002Fvalidator.test.ts\nimport { describe, it, expect } from 'vitest'\n\ndescribe('validateInput', () => {\n  it.each([\n    ['', 'empty string'],\n    [null, 'null'],\n    [undefined, 'undefined'],\n    ['a'.repeat(10001), 'too long'],\n    ['\u003Cscript>alert(1)\u003C\u002Fscript>', 'xss attempt'],\n  ])('rejects %s (%s)', (input) => {\n    expect(() => validateInput(input)).toThrow()\n  })\n})\n```\n\n### 2. Negative \u002F Error Case Testing\nVerify the system behaves correctly under invalid or unexpected conditions.\n\n```ts\n\u002F\u002F tests\u002Fcalculator.test.ts\nimport { describe, it, expect } from 'vitest'\n\ndescribe('divide', () => {\n  it('throws on divide by zero', () => {\n    expect(() => divide(10, 0)).toThrow('Division by zero')\n  })\n})\n```\n\n### 3. State-Based Testing\nFor objects with internal state, verify transitions between states are correct and irreversible where expected.\n\n```ts\n\u002F\u002F tests\u002Fconnection.test.ts\nimport { describe, it, expect } from 'vitest'\n\ndescribe('Connection', () => {\n  it('transitions through states', () => {\n    const conn = new Connection()\n    expect(conn.state).toBe('closed')\n    conn.open()\n    expect(conn.state).toBe('open')\n    conn.close()\n    expect(conn.state).toBe('closed')\n    \u002F\u002F Idempotency\n    conn.close()\n    expect(conn.state).toBe('closed')\n  })\n})\n```\n\n## Common Test Smells to Avoid\n\n- **Assertion Roulette**: Many assertions without descriptive messages, making failure diagnosis ambiguous. *Fix: Use `expect(value, 'description').toBe(...)` or descriptive `describe`\u002F`it` blocks.*\n- **Happy Path Bias**: Only testing successful scenarios, leaving error paths uncovered. *Fix: Test rejected promises, `null`\u002F`undefined`\u002Fempty inputs, 4xx\u002F5xx responses.*\n- **Mock Overdose**: Too many mocks hiding integration issues or coupling tests to implementation. *Fix: Mock only at boundaries (HTTP with MSW, timers with `vi.useFakeTimers()`).*\n- **The Free Ride**: Tests that execute code but assert nothing meaningful (e.g., `expect(true).toBe(true)`). *Fix: Every test must have at least one specific, falsifiable assertion.*\n- **Obscure Test**: Long, complex test methods with no clear arrange\u002Fact\u002Fassert structure. *Fix: Follow AAA, avoid testing implementation details (test behavior, not state).*\n- **Flaky Test**: Non-deterministic results from async, timers, or DOM. *Fix: Use `waitFor`, `act()`, `vi.useFakeTimers()`, avoid real network in unit tests.*\n\n## Best Practices\n\n### DO\n\n- Keep tests deterministic and isolated\n- Prefer dependency injection over globals\n- Use `describe` \u002F `it` nesting for readable test structure\n- Separate unit vs integration tests in directory structure or config\n- Run type checking with `vitest --typecheck`\n- Use Testing Library for DOM\u002Fcomponent tests (React, Vue, etc.)\n\n### DON'T\n\n- Don't depend on real time or network in unit tests\n- Don't use `setTimeout` as synchronization when `waitFor` can be used\n- Don't over-mock simple value objects\n- Don't snapshot large dynamic objects that change frequently\n- Don't test implementation details (private methods, internal state)\n\n### Common Pitfalls\n\n- **Leaking mock state** → Use `beforeEach` with `vi.clearAllMocks()`.\n- **Relying on real timers** → Use `vi.useFakeTimers()` with `vi.advanceTimersByTime()`.\n- **Flaky async tests** → Use `waitFor` or proper `await` instead of arbitrary timeouts.\n- **Global test pollution** → Reset modules with `vi.resetModules()` in `beforeEach`.\n- **Over-mocking** → Prefer integration-style tests that use real implementations for core logic.\n- **Missing type checks** → Enable `--typecheck` flag in CI.\n- **Brittle snapshots** → Keep snapshots small; prefer inline snapshots for critical structure.\n\n## Optional Appendix: Property-Based Testing\n\nOnly use if the project already supports fast-check or similar.\n\n- **fast-check**: property-based testing for TypeScript\u002FJavaScript.\n\n```ts\nimport { describe, it } from 'vitest'\nimport * as fc from 'fast-check'\n\nfunction add(a: number, b: number): number { return a + b }\n\ndescribe('add', () => {\n  it('is commutative', () => {\n    fc.assert(\n      fc.property(fc.integer(), fc.integer(), (a, b) => {\n        expect(add(a, b)).toBe(add(b, a))\n      })\n    )\n  })\n})\n```\n\n## Alternatives to Vitest\n\n- **Jest**: mature, massive ecosystem, slower migration path.\n- **Mocha + Chai**: flexible, no built-in mocking, requires more configuration.\n- **Node test runner**: built-in since Node 20, minimal setup for simple projects.\n",{"name":5,"metadata":24,"description":27,"compatibility":28},{"author":25,"source":26},"github-spec-kit","templates\u002Fpassive-skills\u002Fjs-testing\u002FSKILL.md","Use ONLY when user explicitly requests JavaScript\u002FTypeScript test code, Vitest\u002FJest configuration, test failure diagnosis, or coverage improvement for JS\u002FTS projects.\nTriggers: \"write test js\", \"vitest\", \"jest\", \"react test\", \"vue test\", \"MSW\", \"playwright\", \"fast-check\", \"coverage js\", \"snapshot test\", \"testing-library\".\nDo NOT activate for: general JS\u002FTS coding without test context, build tool configuration (Vite\u002Fwebpack), npm\u002Fpnpm\u002Fyarn install issues, or TypeScript type-only questions. ","Requires spec-kit project structure with .specify\u002F directory","main","021f5cbe02157229460a577e9a585f2da6d78cb0",".codex\u002Fskills\u002Fjs-testing","https:\u002F\u002Fgithub.com\u002Fchenziyang110\u002Flaunchdeck","https:\u002F\u002Fgithub.com\u002Fchenziyang110","2026-08-07 18:10:54",{"source":8,"skillName":5,"commands":36,"prompt":46,"zipAvailable":47},[37,40,43],{"tool":38,"command":39},"npx","npx skills add chenziyang110\u002Flaunchdeck --skill js-testing",{"tool":41,"command":42},"bunx","bunx skills add chenziyang110\u002Flaunchdeck --skill js-testing",{"tool":44,"command":45},"pnpm","pnpm dlx skills add chenziyang110\u002Flaunchdeck --skill js-testing","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fchenziyang110\u002Flaunchdeck\u002Fblob\u002Fmain\u002F.codex\u002Fskills\u002Fjs-testing\u002FSKILL.md",true,[],[50,57,63,69,76,85],{"skillNo":51,"name":52,"nameZh":6,"description":53,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":54,"categories":55,"keywords":56,"publishedAt":19},"01M7875F3HQ1GF5F6BR36KY3JE","launchdeck-agent","Codex host adapter contract fixture for Launchdeck.","https:\u002F\u002Fgithub.com\u002Fchenziyang110\u002Flaunchdeck\u002Fblob\u002Fmain\u002Ftest\u002Ffixtures\u002Fagent-hosts\u002Fcodex\u002Fskill\u002FSKILL.md",[],[],{"skillNo":58,"name":52,"nameZh":6,"description":59,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":19},"01M7875DV2DQR33K1NFJHKAMZP","Claude host adapter contract fixture for Launchdeck.","https:\u002F\u002Fgithub.com\u002Fchenziyang110\u002Flaunchdeck\u002Fblob\u002Fmain\u002Ftest\u002Ffixtures\u002Fagent-hosts\u002Fclaude\u002Fskill\u002FSKILL.md",[],[],{"skillNo":64,"name":52,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":19},"01M78759JQ7A6FQ8KDQTNYS3X9","Use this skill aggressively for local project lifecycle operations even when the user does not mention Launchdeck: start this project, run the dev server, dev, build, test, restart service, stop service, show logs, inspect ports, port is occupied, clean cache; and when the user explicitly asks to configure this local project for Launchdeck or create or generate a project-adapted `.launchdeck.yml`, including 为这个项目生成 Launchdeck 配置. Do not use for ordinary code edits, docs-only work, general explanations, API design discussion, or production deployment unless the user also asks to operate or configure a local project or service.","https:\u002F\u002Fgithub.com\u002Fchenziyang110\u002Flaunchdeck\u002Fblob\u002Fmain\u002Fagent\u002Finstaller-payload\u002Fskill\u002Flaunchdeck-agent\u002FSKILL.md",[],[],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M78753ZJQ7G2CZT1W1G8WRJV","zig-testing","Use ONLY when user explicitly requests Zig test code, built-in test runner configuration,\ntest failure diagnosis, or coverage for Zig projects.\n\nTriggers: \"write test zig\", \"zig test\", \"testing.allocator\", \"zig coverage\",\n\"comptime test\", \"zig expectError\", \"zig snapshot test\", \"zig fuzz\".\n\nDo NOT activate for: general Zig coding without test context, build.zig configuration\nfor non-test targets, Zig compiler errors, or Zig build system setup.","https:\u002F\u002Fgithub.com\u002Fchenziyang110\u002Flaunchdeck\u002Fblob\u002Fmain\u002F.specify\u002Ftemplates\u002Fpassive-skills\u002Fzig-testing\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":80,"licenseFileUrl":81,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":19},"01M78750JXY4Z5D5W1EX3PQ31Z","webapp-testing","Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fchenziyang110\u002Flaunchdeck\u002Fblob\u002Fmain\u002F.specify\u002Ftemplates\u002Fpassive-skills\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fchenziyang110\u002Flaunchdeck\u002Fblob\u002Fmain\u002F.specify\u002Ftemplates\u002Fpassive-skills\u002Fwebapp-testing\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":19},"01M7874X2T83EQQFRCEY5SJJVC","verification-before-completion","Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always","https:\u002F\u002Fgithub.com\u002Fchenziyang110\u002Flaunchdeck\u002Fblob\u002Fmain\u002F.specify\u002Ftemplates\u002Fpassive-skills\u002Fverification-before-completion\u002FSKILL.md",[],[]]