[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6C326TFWDHX21JFXK8NYSW8":3,"skill-same:01M6C326TFWDHX21JFXK8NYSW8":61},{"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":23,"publishedAt":32,"linkOnly":33,"markdownContent":34,"markdownBody":35,"frontMatter":36,"refName":38,"commitSha":39,"skillDirectory":40,"forksCount":41,"repositoryHtmlUrl":42,"repositoryHomepageUrl":43,"ownerHtmlUrl":44,"ownerBlogUrl":45,"ownerDescription":46,"updatedAt":47,"install":48,"resources":60},"01M6C326TFWDHX21JFXK8NYSW8","principle-test-behavior-not-implementation",null,"Apply when you write, change, or keep a test. Call the code the way its users do and assert the result they observe against a literal expected value. If the test would still pass when every imported function returns undefined, rewrite the assertion or delete the test.","IgorGanapolsky\u002FRandom-Timer","IgorGanapolsky","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F201209?v=4","01M6C2WB7720K13ERYVB3AJ0SQ","Igor Ganapolsky","01M6C2WBBF0NWVQV4A89FS00Q5",1,"MIT","https:\u002F\u002Fgithub.com\u002FIgorGanapolsky\u002FRandom-Timer\u002Fblob\u002Fdevelop\u002F.claude\u002Fskills\u002Fprinciple-test-behavior-not-implementation\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000008","测试与质量","SCENARIO","使用场景",[24,25,26,27,28,29,30,31],"test","principle test behavior not implementation","behavior","change","delete","code","returns","write","2026-11-10 10:12:30",false,"---\nname: principle-test-behavior-not-implementation\ndescription: \"Apply when you write, change, or keep a test. Call the code the way its users do and assert the result they observe against a literal expected value. If the test would still pass when every imported function returns undefined, rewrite the assertion or delete the test.\"\ndisable-model-invocation: true\n---\n\n# Test Behavior, Not Implementation\n\nA test calls the code the way its users do and asserts the result they observe against a literal expected value. A test that asserts which calls the code made, or restates a constant the code contains, does neither.\n\nThe check: before you keep a test, ask whether it would still pass if every function it imports returned `undefined`. If yes, it observes no behavior and cannot fail for a defect. Rewrite the assertion or delete the test.\n\n**Why:** A test that cannot fail for a defect costs CI time and review attention and catches nothing. A constant pin also fails when someone edits the constant or the prompt it restates, so it prevents that edit.\n\n**Five shapes that still pass when every imported function returns `undefined`:**\n\n- **Weak or no assertion.** No `expect`, or only `toBeDefined`, `toBeTruthy`, `not.toThrow`, `toBeInstanceOf`, `toBeGreaterThan(0)`.\n- **Mock or absence only.** Only `toHaveBeenCalled`, `not.toHaveBeenCalled`, `toBeUndefined`, `toEqual([])`, `toHaveLength(0)`, `not.toBe(wrongValue)`.\n- **Self-referential.** The expected value comes from the code under test: `expect(f(a)).toBe(f(a))`, `expect(parsed.url).toBe(buildUrl(...))`.\n- **Constant pin.** The assertion restates a hand-maintained constant, config default, table row, or prompt string: `expect(LIMITS.maxTools).toBe(8)`, `expect(PROMPT).toContain(\"You are\")`.\n- **Fixture asserts fixture.** The assertion reads data the test built or a value computed in `beforeEach`, and the subject never runs inside the body.\n\n**The fix:** call the subject inside the test body with one concrete input and assert the literal output or the observable effect, `expect(slugify(\"Hello, World!\")).toBe(\"hello-world\")`. For an absence, assert the presence on the other input in the same test. For a constant, test the mechanism that reads it with one input instead of restating the value. For a mock, assert the payload it received or the state after the call, not that it was called. When no such assertion exists, delete the test.\n\n**Keep** a test of a relation across a table's rows (a key present in two tables, a parent that exists), and a compile-time check in a `*.test-d.ts` file.\n","# Test Behavior, Not Implementation\n\nA test calls the code the way its users do and asserts the result they observe against a literal expected value. A test that asserts which calls the code made, or restates a constant the code contains, does neither.\n\nThe check: before you keep a test, ask whether it would still pass if every function it imports returned `undefined`. If yes, it observes no behavior and cannot fail for a defect. Rewrite the assertion or delete the test.\n\n**Why:** A test that cannot fail for a defect costs CI time and review attention and catches nothing. A constant pin also fails when someone edits the constant or the prompt it restates, so it prevents that edit.\n\n**Five shapes that still pass when every imported function returns `undefined`:**\n\n- **Weak or no assertion.** No `expect`, or only `toBeDefined`, `toBeTruthy`, `not.toThrow`, `toBeInstanceOf`, `toBeGreaterThan(0)`.\n- **Mock or absence only.** Only `toHaveBeenCalled`, `not.toHaveBeenCalled`, `toBeUndefined`, `toEqual([])`, `toHaveLength(0)`, `not.toBe(wrongValue)`.\n- **Self-referential.** The expected value comes from the code under test: `expect(f(a)).toBe(f(a))`, `expect(parsed.url).toBe(buildUrl(...))`.\n- **Constant pin.** The assertion restates a hand-maintained constant, config default, table row, or prompt string: `expect(LIMITS.maxTools).toBe(8)`, `expect(PROMPT).toContain(\"You are\")`.\n- **Fixture asserts fixture.** The assertion reads data the test built or a value computed in `beforeEach`, and the subject never runs inside the body.\n\n**The fix:** call the subject inside the test body with one concrete input and assert the literal output or the observable effect, `expect(slugify(\"Hello, World!\")).toBe(\"hello-world\")`. For an absence, assert the presence on the other input in the same test. For a constant, test the mechanism that reads it with one input instead of restating the value. For a mock, assert the payload it received or the state after the call, not that it was called. When no such assertion exists, delete the test.\n\n**Keep** a test of a relation across a table's rows (a key present in two tables, a parent that exists), and a compile-time check in a `*.test-d.ts` file.\n",{"name":5,"description":7,"disable-model-invocation":37},true,"develop","4af946ac9a2b3cfbbe9b2e8696cc436f1d16e2e2",".claude\u002Fskills\u002Fprinciple-test-behavior-not-implementation",0,"https:\u002F\u002Fgithub.com\u002FIgorGanapolsky\u002FRandom-Timer","https:\u002F\u002Fapps.apple.com\u002Fus\u002Fapp\u002Frandom-tactical-timer\u002Fid6758355312","https:\u002F\u002Fgithub.com\u002FIgorGanapolsky","https:\u002F\u002Fwww.igorganapolsky.com","Forward Deploy AI Engineer. Automation specialist.\r\n","2026-11-09 23:14:20",{"source":8,"skillName":5,"commands":49,"prompt":59,"zipAvailable":37},[50,53,56],{"tool":51,"command":52},"npx","npx skills add IgorGanapolsky\u002FRandom-Timer --skill principle-test-behavior-not-implementation",{"tool":54,"command":55},"bunx","bunx skills add IgorGanapolsky\u002FRandom-Timer --skill principle-test-behavior-not-implementation",{"tool":57,"command":58},"pnpm","pnpm dlx skills add IgorGanapolsky\u002FRandom-Timer --skill principle-test-behavior-not-implementation","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FIgorGanapolsky\u002FRandom-Timer\u002Fblob\u002Fdevelop\u002F.claude\u002Fskills\u002Fprinciple-test-behavior-not-implementation\u002FSKILL.md",[],[62,81,100,111,123,134],{"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":76,"publishedAt":32},"01M6C3CEGAENG02BPG636N9WG6","writing-plans","Use when you have a spec or requirements for a multi-step task, before touching code","https:\u002F\u002Fgithub.com\u002FIgorGanapolsky\u002FRandom-Timer\u002Fblob\u002Fdevelop\u002F.cursor\u002Fskills\u002Fwriting-plans\u002FSKILL.md",[68,71],{"categoryNo":69,"categoryName":70,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000018","写作与文案",{"categoryNo":72,"categoryName":73,"taxonomyType":74,"taxonomyTypeDesc":75},"01JBSEEDCAT000000000000036","内容创作者","PROFESSION","适用职业",[77,78,79,29,80],"writing plans","writing","spec","use",{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":90,"publishedAt":32},"01M6C3CC40GJBTJQHQ5BF7CQN9","workflow-economics-lite","Escape AI pilot purgatory: require completion-loop workflows with one owner, baseline, economic metric, system-of-record integration, and audit trail. Block orphan chatbots and interest-as-ROI claims.","https:\u002F\u002Fgithub.com\u002FIgorGanapolsky\u002FRandom-Timer\u002Fblob\u002Fdevelop\u002F.cursor\u002Fskills\u002Fworkflow-economics-lite\u002FSKILL.md",[87],{"categoryNo":88,"categoryName":89,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",[91,92,93,94,95,96,97,98,99],"workflow economics lite","workflow","loop","roi","workflows","audit","integration","baseline","system",{"skillNo":101,"name":102,"nameZh":6,"description":103,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":104,"categories":105,"keywords":106,"publishedAt":32},"01M6C3C9ESBW612NMMMBQDWSWR","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\u002FIgorGanapolsky\u002FRandom-Timer\u002Fblob\u002Fdevelop\u002F.cursor\u002Fskills\u002Fverification-before-completion\u002FSKILL.md",[],[107,108,80,109,110],"verification before completion","verification","evidence","work",{"skillNo":112,"name":113,"nameZh":6,"description":114,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":115,"categories":116,"keywords":117,"publishedAt":32},"01M6C3C71DNQHJ6PGV0TN1R99N","value-center-lite","Apply InfoQ Rohrer value-center \u002F VSM five questions (agency + coherence). Use when planning work, shipping releases, or auditing agent autonomy claims. Fail closed on product-only slogans without WQTU\u002Fpaywall value.","https:\u002F\u002Fgithub.com\u002FIgorGanapolsky\u002FRandom-Timer\u002Fblob\u002Fdevelop\u002F.cursor\u002Fskills\u002Fvalue-center-lite\u002FSKILL.md",[],[118,119,80,110,120,121,122],"value center lite","only","product","shipping","planning",{"skillNo":124,"name":125,"nameZh":6,"description":126,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":127,"categories":128,"keywords":129,"publishedAt":32},"01M6C3C41Q0R2J49F3Q4CQ004J","using-superpowers","Use when starting any conversation - establishes how to find and use skills, requiring skill invocation before ANY response including clarifying questions","https:\u002F\u002Fgithub.com\u002FIgorGanapolsky\u002FRandom-Timer\u002Fblob\u002Fdevelop\u002F.cursor\u002Fskills\u002Fusing-superpowers\u002FSKILL.md",[],[130,131,80,132,133],"superpowers","using superpowers","find","how",{"skillNo":135,"name":136,"nameZh":6,"description":137,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":138,"categories":139,"keywords":140,"publishedAt":32},"01M6C3C1EBYXRVMNHZZE9N49PN","using-git-worktrees","Use when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback","https:\u002F\u002Fgithub.com\u002FIgorGanapolsky\u002FRandom-Timer\u002Fblob\u002Fdevelop\u002F.cursor\u002Fskills\u002Fusing-git-worktrees\u002FSKILL.md",[],[141,142,143,144,145,146,147,110,80],"git","using git worktrees","git worktrees","git worktree","Tools","worktree","workspace"]