[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EXE9STPWRCHBKPMRXBA4JE":3,"skill-same:01M7EXE9STPWRCHBKPMRXBA4JE":47},{"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":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":30,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M7EXE9STPWRCHBKPMRXBA4JE","write-tests",null,"Use when adding or changing behavior, signing code, contracts, or the UI. Chooses the right test level and applies the repository's test rules.","IntraverseGame\u002Fse-client-kit","IntraverseGame","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F106401126?v=4","01M7EXDHS7CGXX7G1CM6ZR69AG","Intraverse","01M7EXDHSXGC8ZJRQY5E0XCH6H",2,"MIT","https:\u002F\u002Fgithub.com\u002FIntraverseGame\u002Fse-client-kit\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Fwrite-tests\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: write-tests\ndescription: Use when adding or changing behavior, signing code, contracts, or the UI. Chooses the right test level and applies the repository's test rules.\n---\n\n# write-tests\n\n## Prerequisites\n\n- [.ai\u002Fmemories\u002Ftesting.md](..\u002F..\u002Fmemories\u002Ftesting.md) (orientation) and the\n  testing section of the kit's spec (the rules:\n  [`specs\u002Fclient-kit\u002Ftesting-and-ci.md`](..\u002F..\u002F..\u002Fspecs\u002Fclient-kit\u002Ftesting-and-ci.md) and the\n  [Wrapper test plan](..\u002F..\u002F..\u002Fspecs\u002Fwrapper.md#test-plan)).\n\n## Workflow\n\n1. Pick the level:\n   - pure logic, a use case, a parser, a validator → **unit** (Vitest, beside the\n     code);\n   - a wire or crypto format → **vector replay**: run the vendored vector files\n     through the code; add a vector rather than a one-off assertion;\n   - rendering of a Snapshot, accessibility of a component → **component**\n     (Vitest with a DOM);\n   - a user path through the built Wrapper (win, loss, cash-out, offline,\n     errors, two tabs, the sandbox) → **e2e** (Playwright, against the in-repo\n     fake Play API);\n   - a contract copy → the **hash check** against the lock file.\n2. Unit tests: no real network, disk, timers, or clock; inject a clock and a\n   random source; table-driven where it helps; one behavior per test.\n3. Assert on typed errors (their `code` or class), never on message text.\n4. Money: assert on strings or `bigint`, never on `number`.\n5. Secrets: a test never prints or snapshots a key or token. The only keys in\n   the repository are the public test keys of the vectors. Add a test that the\n   thing you touched does not leak a credential into logs, errors, or storage\n   when it handles one.\n6. e2e: unique ids per run; no dependence on test order; no real wallet or\n   third-party service.\n7. Run the whole suite before pushing.\n\n## Constraints\n\n- Deterministic and hermetic; no secrets; no test imports another package's\n  internals. The preview-stack e2e (the `preview` project, run by a\n  backend-owned job, never part of `pnpm check`) is the one non-hermetic suite;\n  add to it only through the rows of the Wrapper's test plan, and prove its\n  support code with hermetic tests in `e2e\u002Ftests\u002Fpreview-guard\u002F`.\n- Never weaken a vector assertion or skip a test to go green — fix the code, or\n  change the spec through the development flow. A released vector file is never\n  edited; add a new version.\n\n## Useful commands\n\n```sh\npnpm test                  # unit and component (wireit skips what did not change)\npnpm test:e2e              # Playwright against the fake Play API\npnpm check                 # everything the CI runs\n```\n\nA test that reads files outside its own package (a vector, the schema) must\nhave those files in its wireit `files`, or depend on the task that produces\nthem; otherwise a cached pass could hide a failure. `tools\u002Fwireit-inputs.test.ts`\nchecks the `files` of every script against the files on disk; it runs in\n`test:tools`, whose `files` cover every workspace tree so that a new file\nre-runs it. A root `tools\u002F` test that reads a file outside them adds that file\nto `test:tools` `files`.\n\n## Expected output\n\nTests at the right level that fail without the change and pass with it.\n\n## References\n\n- [.ai\u002Fmemories\u002Ftesting.md](..\u002F..\u002Fmemories\u002Ftesting.md),\n  [.ai\u002Fmemories\u002Fconventions.md](..\u002F..\u002Fmemories\u002Fconventions.md)\n","# write-tests\n\n## Prerequisites\n\n- [.ai\u002Fmemories\u002Ftesting.md](..\u002F..\u002Fmemories\u002Ftesting.md) (orientation) and the\n  testing section of the kit's spec (the rules:\n  [`specs\u002Fclient-kit\u002Ftesting-and-ci.md`](..\u002F..\u002F..\u002Fspecs\u002Fclient-kit\u002Ftesting-and-ci.md) and the\n  [Wrapper test plan](..\u002F..\u002F..\u002Fspecs\u002Fwrapper.md#test-plan)).\n\n## Workflow\n\n1. Pick the level:\n   - pure logic, a use case, a parser, a validator → **unit** (Vitest, beside the\n     code);\n   - a wire or crypto format → **vector replay**: run the vendored vector files\n     through the code; add a vector rather than a one-off assertion;\n   - rendering of a Snapshot, accessibility of a component → **component**\n     (Vitest with a DOM);\n   - a user path through the built Wrapper (win, loss, cash-out, offline,\n     errors, two tabs, the sandbox) → **e2e** (Playwright, against the in-repo\n     fake Play API);\n   - a contract copy → the **hash check** against the lock file.\n2. Unit tests: no real network, disk, timers, or clock; inject a clock and a\n   random source; table-driven where it helps; one behavior per test.\n3. Assert on typed errors (their `code` or class), never on message text.\n4. Money: assert on strings or `bigint`, never on `number`.\n5. Secrets: a test never prints or snapshots a key or token. The only keys in\n   the repository are the public test keys of the vectors. Add a test that the\n   thing you touched does not leak a credential into logs, errors, or storage\n   when it handles one.\n6. e2e: unique ids per run; no dependence on test order; no real wallet or\n   third-party service.\n7. Run the whole suite before pushing.\n\n## Constraints\n\n- Deterministic and hermetic; no secrets; no test imports another package's\n  internals. The preview-stack e2e (the `preview` project, run by a\n  backend-owned job, never part of `pnpm check`) is the one non-hermetic suite;\n  add to it only through the rows of the Wrapper's test plan, and prove its\n  support code with hermetic tests in `e2e\u002Ftests\u002Fpreview-guard\u002F`.\n- Never weaken a vector assertion or skip a test to go green — fix the code, or\n  change the spec through the development flow. A released vector file is never\n  edited; add a new version.\n\n## Useful commands\n\n```sh\npnpm test                  # unit and component (wireit skips what did not change)\npnpm test:e2e              # Playwright against the fake Play API\npnpm check                 # everything the CI runs\n```\n\nA test that reads files outside its own package (a vector, the schema) must\nhave those files in its wireit `files`, or depend on the task that produces\nthem; otherwise a cached pass could hide a failure. `tools\u002Fwireit-inputs.test.ts`\nchecks the `files` of every script against the files on disk; it runs in\n`test:tools`, whose `files` cover every workspace tree so that a new file\nre-runs it. A root `tools\u002F` test that reads a file outside them adds that file\nto `test:tools` `files`.\n\n## Expected output\n\nTests at the right level that fail without the change and pass with it.\n\n## References\n\n- [.ai\u002Fmemories\u002Ftesting.md](..\u002F..\u002Fmemories\u002Ftesting.md),\n  [.ai\u002Fmemories\u002Fconventions.md](..\u002F..\u002Fmemories\u002Fconventions.md)\n",{"name":5,"description":7},"main","4b537f4ee2a8df7dba4156583d62922c0c87399c",".ai\u002Fskills\u002Fwrite-tests",0,"https:\u002F\u002Fgithub.com\u002FIntraverseGame\u002Fse-client-kit","https:\u002F\u002Fgithub.com\u002FIntraverseGame","https:\u002F\u002Fplay.intraverse.io","Intraverse is a platform creating engagement through cross-community.","2026-11-14 02:21:01",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add IntraverseGame\u002Fse-client-kit --skill write-tests",{"tool":39,"command":40},"bunx","bunx skills add IntraverseGame\u002Fse-client-kit --skill write-tests",{"tool":42,"command":43},"pnpm","pnpm dlx skills add IntraverseGame\u002Fse-client-kit --skill write-tests","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FIntraverseGame\u002Fse-client-kit\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Fwrite-tests\u002FSKILL.md",true,[],[48,55,62,69,76,83],{"skillNo":49,"name":50,"nameZh":6,"description":51,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":52,"categories":53,"keywords":54,"publishedAt":19},"01M7EXECT0MKSVJ78TDP62R8CZ","\u003Cskill-name>","Use when \u003Csituation>. One or two sentences.","https:\u002F\u002Fgithub.com\u002FIntraverseGame\u002Fse-client-kit\u002Fblob\u002Fmain\u002F.ai\u002Ftemplates\u002Fskill.md",[],[],{"skillNo":56,"name":57,"nameZh":6,"description":58,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":59,"categories":60,"keywords":61,"publishedAt":19},"01M7EXE5SGQEC80S64WMVGKRCZ","spec-drift-sync","Use before merging any non-trivial change. Reconciles code with specs, and code\u002Fspecs with memories, runbooks, and telemetry docs (Spec Drift Synchronization).","https:\u002F\u002Fgithub.com\u002FIntraverseGame\u002Fse-client-kit\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Fspec-drift-sync\u002FSKILL.md",[],[],{"skillNo":63,"name":64,"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},"01M7EXE14F7TDGXT5JM4AH0ZVG","shepherd-a-pull-request","Use when reviewing a pull request on GitHub, following up on a review after new pushes, or answering review comments on your own pull request. The `gh` procedure behind the pr-shepherd agent, with draft-then-confirm posting.","https:\u002F\u002Fgithub.com\u002FIntraverseGame\u002Fse-client-kit\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Fshepherd-a-pull-request\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},"01M7EXDWWNJK06KPEQNDBVAZT3","prd-to-spec","Use when given a rough PRD, feature request, or raw requirement. Turns it into a spec update, an RFC when the change is significant or contested, and an ADR for hard-to-reverse decisions.","https:\u002F\u002Fgithub.com\u002FIntraverseGame\u002Fse-client-kit\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Fprd-to-spec\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":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M7EXDR4HNXMM66VPME60Q63Q","ask-the-human","Use when you hit an open question, a decision that is not yours to make, a gap or ambiguity in a spec, or a draft that needs a human's confirmation. Asks through the host's structured-question tool with concrete options and a recommendation, instead of guessing or burying the question in prose.","https:\u002F\u002Fgithub.com\u002FIntraverseGame\u002Fse-client-kit\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Fask-the-human\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":19},"01M7EXDNP3DKJ987Y40CQNT3D5","add-a-package","Use when adding a new package under packages\u002F (or an app under apps\u002F). Covers the placement check, the dependency direction, public API, wiring, tests, and docs.","https:\u002F\u002Fgithub.com\u002FIntraverseGame\u002Fse-client-kit\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Fadd-a-package\u002FSKILL.md",[],[]]