[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EMBHXM6HQGPJ2J0BEVEEZ3":3,"skill-same:01M7EMBHXM6HQGPJ2J0BEVEEZ3":50},{"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":14,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":29,"install":30,"resources":43},"01M7EMBHXM6HQGPJ2J0BEVEEZ3","testing",null,"Test strategy and execution: test-first, isolated unit tests, then integration, then regression; tests assert behaviour, boundaries and errors, never wiring or mock echoes; make test and test.sh for programs, fixture tests for contracts; memory-safe fixtures for large suites. Use when writing tests, choosing what to test, or when a test suite is slow, flaky or runs out of memory.","VolkovIlia\u002Fdeadlion-studio","VolkovIlia","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43730119?v=4","01M7EM9F1A574SS7HEZRWMCA9C","Ilia Volkov","01M7EM9F1Z1DM8DEAT2WYZB6D0",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FVolkovIlia\u002Fdeadlion-studio\u002Fblob\u002Fmain\u002Fplugins\u002Fdeadlion\u002Fskills\u002Ftesting\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: testing\ndescription: \"Test strategy and execution: test-first, isolated unit tests, then integration, then regression; tests assert behaviour, boundaries and errors, never wiring or mock echoes; make test and test.sh for programs, fixture tests for contracts; memory-safe fixtures for large suites. Use when writing tests, choosing what to test, or when a test suite is slow, flaky or runs out of memory.\"\n---\n\n# Testing\n\nAcceptance criteria come from `product.md` \u002F `plan.md` when a feature is active (contract: `${CLAUDE_SKILL_DIR}\u002F..\u002Fworkflow\u002Freferences\u002Fartifacts.md`).\n\n## TDD law\nNo production code without a failing test first. Code written before its test is deleted\nand rewritten after the test fails for the right reason.\n\n## Gates (blocking, in order)\n1. **Pre-flight**: project env and toolchain present (`cc`, `cargo`, venv…), dependencies consistent (`pip check`, lockfile in sync). Broken env → stop and report; do not test around it.\n2. **Isolated (unit)**: 100% pass before running integration.\n3. **Integration**: 100% pass; contracts match their schema files.\n4. **Workflows**: every happy path covered end to end.\n5. **Browser E2E**: zero console errors.\n6. Never loosen a gate, skip a test or exclude code from coverage to go green.\n\n## What a test must assert\n- Behaviour: observable output\u002Fstate, not that a function was called. A test that only re-asserts what a mock returned proves nothing.\n- Every handler has an explicit state assertion; \"does not crash\" is not a test.\n- Boundaries: empty, min, max, null\u002Fmissing optional fields.\n- Errors: invalid input, 401, 403, 429 — each yields a clear, specific message and status.\n- Type coercion across boundaries (a string id from a token vs an int id in the DB) — the most common integration failure.\n- Concurrency where it applies (≥5 simulated users), soft-delete visibility, persistence across reload.\n- Synthetic test data; never real credentials.\n- Every RNG is seeded with a fixed, named seed.\n\n## Programs and contracts\n- **Programs:** `make test` is every program's test entry; CLI behaviour is tested by\n  `test.sh`: exact stdout for an input, exit code, `NAME:` stderr prefix.\n- **Interactive terminal programs:** tmux-driven screen tests in `test.sh` (see the\n  `rust-tui` template) and dl-tui snapshots for each designed state.\n- **Contracts:** each consumer has a test that feeds its fixture copy of the contract\n  example; each producer has a test that its output matches the example format.\n\n## Order\n1. Unit tests, no external dependencies.\n2. Integration: API vs schema, DB type conversions, auth flows, contract fixtures.\n3. Workflow\u002FE2E: full CRUD lifecycle, then error paths, then edge cases. Collect console errors:\n   ```javascript\n   const errors = [];\n   page.on('console', m => { if (m.type() === 'error') errors.push(m.text()); });\n   \u002F\u002F after each step\n   expect(errors).toHaveLength(0);\n   ```\n4. Risk-based regression — score and run highest first:\n   - +20 critical path (auth, payment, data loss)\n   - +15 cyclomatic complexity >10\n   - +10 changed in the current diff\n   - +5 defect history or external dependency\n\nGates >1 min run in background with output to `.logs\u002Ftests\u002F\u003Cgate>.log`.\n\n## Failure classification\nClassify every failure into exactly one row. Calling a non-failure a failure is itself a defect.\n\n| Category | Indicators | Action |\n|---|---|---|\n| True test failure | Assertion fails in a regime the gate is specified to hold; contract violation | Reproduce and fix via `debug` |\n| Implementation bug | Code does not meet acceptance criteria | Fix with a repro test |\n| Environment | Env missing, service down | Fix env; do not retry tests |\n| Test bug | Flaky (\u003C95% pass rate), non-deterministic | Pin seed, fix test, re-run once |\n| Infra \u002F timeout | Budget exceeded, network | Decompose; retry with backoff, max 2 |\n\nNever widen a threshold to pass. After 2 retries of a transient failure, stop and report.\n\n## Logs\nTest logs go to `.logs\u002Ftests\u002F{unit,integration,e2e}\u002F` (`mkdir -p` first); never `.log` files in the project root.\n\n## Large suites\nSuite slow or OOM, many per-file engines\u002Ffixtures, or files >500 lines → follow `${CLAUDE_SKILL_DIR}\u002Freferences\u002Fmemory-efficient-testing.md`.\n\n## Report\nPer phase: command run, pass\u002Ffail counts, each failure with its category and repro command. Partial results are reported as partial.\n","# Testing\n\nAcceptance criteria come from `product.md` \u002F `plan.md` when a feature is active (contract: `${CLAUDE_SKILL_DIR}\u002F..\u002Fworkflow\u002Freferences\u002Fartifacts.md`).\n\n## TDD law\nNo production code without a failing test first. Code written before its test is deleted\nand rewritten after the test fails for the right reason.\n\n## Gates (blocking, in order)\n1. **Pre-flight**: project env and toolchain present (`cc`, `cargo`, venv…), dependencies consistent (`pip check`, lockfile in sync). Broken env → stop and report; do not test around it.\n2. **Isolated (unit)**: 100% pass before running integration.\n3. **Integration**: 100% pass; contracts match their schema files.\n4. **Workflows**: every happy path covered end to end.\n5. **Browser E2E**: zero console errors.\n6. Never loosen a gate, skip a test or exclude code from coverage to go green.\n\n## What a test must assert\n- Behaviour: observable output\u002Fstate, not that a function was called. A test that only re-asserts what a mock returned proves nothing.\n- Every handler has an explicit state assertion; \"does not crash\" is not a test.\n- Boundaries: empty, min, max, null\u002Fmissing optional fields.\n- Errors: invalid input, 401, 403, 429 — each yields a clear, specific message and status.\n- Type coercion across boundaries (a string id from a token vs an int id in the DB) — the most common integration failure.\n- Concurrency where it applies (≥5 simulated users), soft-delete visibility, persistence across reload.\n- Synthetic test data; never real credentials.\n- Every RNG is seeded with a fixed, named seed.\n\n## Programs and contracts\n- **Programs:** `make test` is every program's test entry; CLI behaviour is tested by\n  `test.sh`: exact stdout for an input, exit code, `NAME:` stderr prefix.\n- **Interactive terminal programs:** tmux-driven screen tests in `test.sh` (see the\n  `rust-tui` template) and dl-tui snapshots for each designed state.\n- **Contracts:** each consumer has a test that feeds its fixture copy of the contract\n  example; each producer has a test that its output matches the example format.\n\n## Order\n1. Unit tests, no external dependencies.\n2. Integration: API vs schema, DB type conversions, auth flows, contract fixtures.\n3. Workflow\u002FE2E: full CRUD lifecycle, then error paths, then edge cases. Collect console errors:\n   ```javascript\n   const errors = [];\n   page.on('console', m => { if (m.type() === 'error') errors.push(m.text()); });\n   \u002F\u002F after each step\n   expect(errors).toHaveLength(0);\n   ```\n4. Risk-based regression — score and run highest first:\n   - +20 critical path (auth, payment, data loss)\n   - +15 cyclomatic complexity >10\n   - +10 changed in the current diff\n   - +5 defect history or external dependency\n\nGates >1 min run in background with output to `.logs\u002Ftests\u002F\u003Cgate>.log`.\n\n## Failure classification\nClassify every failure into exactly one row. Calling a non-failure a failure is itself a defect.\n\n| Category | Indicators | Action |\n|---|---|---|\n| True test failure | Assertion fails in a regime the gate is specified to hold; contract violation | Reproduce and fix via `debug` |\n| Implementation bug | Code does not meet acceptance criteria | Fix with a repro test |\n| Environment | Env missing, service down | Fix env; do not retry tests |\n| Test bug | Flaky (\u003C95% pass rate), non-deterministic | Pin seed, fix test, re-run once |\n| Infra \u002F timeout | Budget exceeded, network | Decompose; retry with backoff, max 2 |\n\nNever widen a threshold to pass. After 2 retries of a transient failure, stop and report.\n\n## Logs\nTest logs go to `.logs\u002Ftests\u002F{unit,integration,e2e}\u002F` (`mkdir -p` first); never `.log` files in the project root.\n\n## Large suites\nSuite slow or OOM, many per-file engines\u002Ffixtures, or files >500 lines → follow `${CLAUDE_SKILL_DIR}\u002Freferences\u002Fmemory-efficient-testing.md`.\n\n## Report\nPer phase: command run, pass\u002Ffail counts, each failure with its category and repro command. Partial results are reported as partial.\n",{"name":5,"description":7},"main","02aa71ce4bc4511265a1469ef79ed215a71f9b2f","plugins\u002Fdeadlion\u002Fskills\u002Ftesting","https:\u002F\u002Fgithub.com\u002FVolkovIlia\u002Fdeadlion-studio","https:\u002F\u002Fgithub.com\u002FVolkovIlia","2026-10-15 18:45:06",{"source":8,"skillName":5,"commands":31,"prompt":41,"zipAvailable":42},[32,35,38],{"tool":33,"command":34},"npx","npx skills add VolkovIlia\u002Fdeadlion-studio --skill testing",{"tool":36,"command":37},"bunx","bunx skills add VolkovIlia\u002Fdeadlion-studio --skill testing",{"tool":39,"command":40},"pnpm","pnpm dlx skills add VolkovIlia\u002Fdeadlion-studio --skill testing","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FVolkovIlia\u002Fdeadlion-studio\u002Fblob\u002Fmain\u002Fplugins\u002Fdeadlion\u002Fskills\u002Ftesting\u002FSKILL.md",true,[44],{"path":45,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":48,"sourceHtmlUrl":49},"references\u002Fmemory-efficient-testing.md","REFERENCE","参考文档",5518,"https:\u002F\u002Fgithub.com\u002FVolkovIlia\u002Fdeadlion-studio\u002Fblob\u002Fmain\u002Fplugins\u002Fdeadlion\u002Fskills\u002Ftesting\u002Freferences\u002Fmemory-efficient-testing.md",[51,58,65,72,79,86],{"skillNo":52,"name":53,"nameZh":6,"description":54,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":55,"categories":56,"keywords":57,"publishedAt":19},"01M7EMCBYGSW1DZJP59294W9NP","write-plan","Turns approved product\u002Fdesign\u002Farchitecture artifacts or a clear request into plan.md: small ordered tasks, each with exact files, a test written first and a verification command. Use before implementing anything larger than a one-file change.","https:\u002F\u002Fgithub.com\u002FVolkovIlia\u002Fdeadlion-studio\u002Fblob\u002Fmain\u002Fplugins\u002Fdeadlion\u002Fskills\u002Fwrite-plan\u002FSKILL.md",[],[],{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":19},"01M7EMC7ANMETP06JQ1158G7MS","workflow","Runs the deadlion pipeline (product → design → decompose → architecture → plan → build → review → verify) through plain-text artifacts in .dev-docs\u002F. Use when the user starts a new product, system, feature or multi-step change, or asks what to do next.","https:\u002F\u002Fgithub.com\u002FVolkovIlia\u002Fdeadlion-studio\u002Fblob\u002Fmain\u002Fplugins\u002Fdeadlion\u002Fskills\u002Fworkflow\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":19},"01M7EMC46H7411EB9DVQQPHESC","verify","Evidence before claims: before saying work is done, fixed or passing, run the proving command fresh, read its output and the git diff, and report VERIFIED and NOT VERIFIED items separately. Use before declaring any task complete and after any subagent reports success.","https:\u002F\u002Fgithub.com\u002FVolkovIlia\u002Fdeadlion-studio\u002Fblob\u002Fmain\u002Fplugins\u002Fdeadlion\u002Fskills\u002Fverify\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":19},"01M7EMBZTP61P22DG5A0EK9CXT","ux-design","Designs the user interface of a program at the lowest rung that serves the job — CLI, filter (dmenu\u002Ffzf style), terminal UI, native GUI or web — with flows, states, a key map, design tokens kept in config.def and numeric gates per rung, so every UI works alone and embeds; avoids generic AI-looking UI. Includes the dl-contrast checker. Writes design.md. Use when building or changing any user interface, screen, TUI, GUI, component or visual style.","https:\u002F\u002Fgithub.com\u002FVolkovIlia\u002Fdeadlion-studio\u002Fblob\u002Fmain\u002Fplugins\u002Fdeadlion\u002Fskills\u002Fux-design\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":19},"01M7EMBV6DXFPQ5B7DVJFADTRB","unix-design","Designs the internals of one program or sub-project as small single-purpose modules with plain-text interfaces, separated mechanism and policy, and one build\u002Frun command each, following the Unix philosophy. Writes arch.md. Use when designing a new feature's architecture inside a program, a CLI, module or data flow; for splitting a system into several programs use decompose.","https:\u002F\u002Fgithub.com\u002FVolkovIlia\u002Fdeadlion-studio\u002Fblob\u002Fmain\u002Fplugins\u002Fdeadlion\u002Fskills\u002Funix-design\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":19},"01M7EMBQ2M8RB244K803J257NP","ui-verify","Verifies a running UI against the gates in design.md — web pages in a real browser via the Playwright MCP (screenshots at 375\u002F768\u002F1280 px, console errors, axe scan, touch targets), terminal programs through dl-tui in a headless tmux (screens at 80×24, 40×12 and 20×5, NO_COLOR, key scripts per state, terminal restore, stdout purity), and token contrast with dl-contrast. Use after implementing or changing any UI, or when the user asks to check how a screen looks or works.","https:\u002F\u002Fgithub.com\u002FVolkovIlia\u002Fdeadlion-studio\u002Fblob\u002Fmain\u002Fplugins\u002Fdeadlion\u002Fskills\u002Fui-verify\u002FSKILL.md",[],[]]