[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M780RYFVA5DH2MVPTH7PWWSF":3,"skill-same:01M780RYFVA5DH2MVPTH7PWWSF":86},{"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":16,"sourceHtmlUrl":17,"categories":18,"keywords":19,"publishedAt":20,"linkOnly":21,"markdownContent":22,"markdownBody":23,"frontMatter":24,"refName":26,"commitSha":27,"skillDirectory":28,"forksCount":29,"repositoryHtmlUrl":30,"repositoryHomepageUrl":6,"ownerHtmlUrl":31,"ownerBlogUrl":32,"ownerDescription":33,"updatedAt":34,"install":35,"resources":47},"01M780RYFVA5DH2MVPTH7PWWSF","cursor-principle-test-behavior-not-implementation",null,"Apply when you write, change, or keep a test. Assert what the code's users can observe, so that the test fails when that behavior breaks and keeps passing when only the internals change.","TheAngryPit\u002FTheAngrySkills","TheAngryPit","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F7040636?v=4","01M7803EENA9ATXJ46S9268QJX","Vitor Cepeda Lopes","01M7803EF9FMF4G4420XE4DV7Y",0,"MIT","https:\u002F\u002Fgithub.com\u002FTheAngryPit\u002FTheAngrySkills\u002Fblob\u002Fmain\u002Fskills\u002Fmirrors-cursor\u002Fcursor-principle-test-behavior-not-implementation\u002FLICENSE.upstream","https:\u002F\u002Fgithub.com\u002FTheAngryPit\u002FTheAngrySkills\u002Fblob\u002Fmain\u002Fskills\u002Fmirrors-cursor\u002Fcursor-principle-test-behavior-not-implementation\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: cursor-principle-test-behavior-not-implementation\ndescription: \"Apply when you write, change, or keep a test. Assert what the code's users can observe, so that the test fails when that behavior breaks and keeps passing when only the internals change.\"\ndisable-model-invocation: true\n---\n\n## Runtime selection\n\nBefore runtime-dependent work, read [execution selection](references\u002Fruntime\u002Fselection.md). In a verified T3 host follow [the T3 contract](references\u002Fruntime\u002Ft3.md) and its method reference; the inline section below is the native Codex branch, not literal T3 dispatch. Outside T3, native Codex follows that inline branch unchanged. If the host is ambiguous or a required capability is unavailable, report the gap; a permission refusal never authorizes switching branches.\n\n## Native Codex branch\n\n# Test Behavior, Not Implementation\n\nA test is a claim about what the code does for its users: a caller, an end user, or another service. Behavior is what those users can observe through the interface they use. That includes return values, errors, state they can read back, and effects on systems outside the code, such as a request sent, a row written, or a message emitted. Implementation is what they cannot observe: private helpers, internal call order, intermediate data, and which internal collaborator did the work.\n\nJudge each test against two imagined edits:\n\n- **Break the behavior.** Make the code return a wrong value, skip an effect, or do the effect twice. If the test still passes, it proves nothing. The usual causes are an assertion looser than the contract, an expected value computed by the code under test, a restated constant or prompt string that never runs the code that reads it, and an assertion on data that the test built itself.\n- **Change the internals.** Keep every observable result the same and restructure the code underneath. If the test now fails, it is pinned to the implementation. It will need a rewrite on every refactor and still catches no bug.\n\nKeep a test that catches the first edit and survives the second. Rewrite or delete the rest. To write a test that does both, drive the code through its users' interface with a concrete input. Derive the expected value from the requirement, not from a run of the code. Assert what the contract promises, no less and no more.\n\nThe contract decides, not the shape of the assertion. When \"an empty cart never charges\" is the promise, an assertion that the payment client got no call is behavior. Pair it with a case where the charge happens, so that the test shows it can see a call. The payload that a mocked external service receives is behavior, because that service observes it. A call to an internal helper is implementation, because no user can see it. An empty list is the exact answer when no record matches, and a hollow check when the test only needs some result. An exact error message pins wording that no caller reads. The error type that callers branch on is the contract.\n\nA test can pin an invariant instead of a call, such as a key that must exist in two tables or a compile-time type check. The invariant is the behavior.\n","## Runtime selection\n\nBefore runtime-dependent work, read [execution selection](references\u002Fruntime\u002Fselection.md). In a verified T3 host follow [the T3 contract](references\u002Fruntime\u002Ft3.md) and its method reference; the inline section below is the native Codex branch, not literal T3 dispatch. Outside T3, native Codex follows that inline branch unchanged. If the host is ambiguous or a required capability is unavailable, report the gap; a permission refusal never authorizes switching branches.\n\n## Native Codex branch\n\n# Test Behavior, Not Implementation\n\nA test is a claim about what the code does for its users: a caller, an end user, or another service. Behavior is what those users can observe through the interface they use. That includes return values, errors, state they can read back, and effects on systems outside the code, such as a request sent, a row written, or a message emitted. Implementation is what they cannot observe: private helpers, internal call order, intermediate data, and which internal collaborator did the work.\n\nJudge each test against two imagined edits:\n\n- **Break the behavior.** Make the code return a wrong value, skip an effect, or do the effect twice. If the test still passes, it proves nothing. The usual causes are an assertion looser than the contract, an expected value computed by the code under test, a restated constant or prompt string that never runs the code that reads it, and an assertion on data that the test built itself.\n- **Change the internals.** Keep every observable result the same and restructure the code underneath. If the test now fails, it is pinned to the implementation. It will need a rewrite on every refactor and still catches no bug.\n\nKeep a test that catches the first edit and survives the second. Rewrite or delete the rest. To write a test that does both, drive the code through its users' interface with a concrete input. Derive the expected value from the requirement, not from a run of the code. Assert what the contract promises, no less and no more.\n\nThe contract decides, not the shape of the assertion. When \"an empty cart never charges\" is the promise, an assertion that the payment client got no call is behavior. Pair it with a case where the charge happens, so that the test shows it can see a call. The payload that a mocked external service receives is behavior, because that service observes it. A call to an internal helper is implementation, because no user can see it. An empty list is the exact answer when no record matches, and a hollow check when the test only needs some result. An exact error message pins wording that no caller reads. The error type that callers branch on is the contract.\n\nA test can pin an invariant instead of a call, such as a key that must exist in two tables or a compile-time type check. The invariant is the behavior.\n",{"name":5,"description":7,"disable-model-invocation":25},true,"main","f31e1d2df163b90a48e30d0a3df67285f6641418","skills\u002Fmirrors-cursor\u002Fcursor-principle-test-behavior-not-implementation",1,"https:\u002F\u002Fgithub.com\u002FTheAngryPit\u002FTheAngrySkills","https:\u002F\u002Fgithub.com\u002FTheAngryPit","www.vitorcepedalopes.com","Creative Director | Executive Producer | Storyteller | Narrative Worlds & Creative Production Systems\r\nFounder @TheHive-Mind ","2026-11-14 21:48:38",{"source":8,"skillName":5,"commands":36,"prompt":46,"zipAvailable":25},[37,40,43],{"tool":38,"command":39},"npx","npx skills add TheAngryPit\u002FTheAngrySkills --skill cursor-principle-test-behavior-not-implementation",{"tool":41,"command":42},"bunx","bunx skills add TheAngryPit\u002FTheAngrySkills --skill cursor-principle-test-behavior-not-implementation",{"tool":44,"command":45},"pnpm","pnpm dlx skills add TheAngryPit\u002FTheAngrySkills --skill cursor-principle-test-behavior-not-implementation","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FTheAngryPit\u002FTheAngrySkills\u002Fblob\u002Fmain\u002Fskills\u002Fmirrors-cursor\u002Fcursor-principle-test-behavior-not-implementation\u002FSKILL.md",[48,54,59,63,67,70,74,78,82],{"path":49,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":52,"sourceHtmlUrl":53},"agents\u002Fopenai.yaml","REFERENCE","参考文档",43,"https:\u002F\u002Fgithub.com\u002FTheAngryPit\u002FTheAngrySkills\u002Fblob\u002Fmain\u002Fskills\u002Fmirrors-cursor\u002Fcursor-principle-test-behavior-not-implementation\u002Fagents\u002Fopenai.yaml",{"path":55,"resourceType":56,"resourceTypeDesc":57,"sizeBytes":58,"sourceHtmlUrl":16},"LICENSE.upstream","LICENSE","许可证",1067,{"path":60,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":61,"sourceHtmlUrl":62},"MIRROR.md",959,"https:\u002F\u002Fgithub.com\u002FTheAngryPit\u002FTheAngrySkills\u002Fblob\u002Fmain\u002Fskills\u002Fmirrors-cursor\u002Fcursor-principle-test-behavior-not-implementation\u002FMIRROR.md",{"path":64,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":65,"sourceHtmlUrl":66},"references\u002Fruntime\u002Fmethod.md",2944,"https:\u002F\u002Fgithub.com\u002FTheAngryPit\u002FTheAngrySkills\u002Fblob\u002Fmain\u002Fskills\u002Fmirrors-cursor\u002Fcursor-principle-test-behavior-not-implementation\u002Freferences\u002Fruntime\u002Fmethod.md",{"path":68,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":65,"sourceHtmlUrl":69},"references\u002Fruntime\u002Fnative-codex.md","https:\u002F\u002Fgithub.com\u002FTheAngryPit\u002FTheAngrySkills\u002Fblob\u002Fmain\u002Fskills\u002Fmirrors-cursor\u002Fcursor-principle-test-behavior-not-implementation\u002Freferences\u002Fruntime\u002Fnative-codex.md",{"path":71,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":72,"sourceHtmlUrl":73},"references\u002Fruntime\u002Foriginal-codex.txt",2590,"https:\u002F\u002Fgithub.com\u002FTheAngryPit\u002FTheAngrySkills\u002Fblob\u002Fmain\u002Fskills\u002Fmirrors-cursor\u002Fcursor-principle-test-behavior-not-implementation\u002Freferences\u002Fruntime\u002Foriginal-codex.txt",{"path":75,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":76,"sourceHtmlUrl":77},"references\u002Fruntime\u002Fruntime-files.json",590,"https:\u002F\u002Fgithub.com\u002FTheAngryPit\u002FTheAngrySkills\u002Fblob\u002Fmain\u002Fskills\u002Fmirrors-cursor\u002Fcursor-principle-test-behavior-not-implementation\u002Freferences\u002Fruntime\u002Fruntime-files.json",{"path":79,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":80,"sourceHtmlUrl":81},"references\u002Fruntime\u002Fselection.md",1783,"https:\u002F\u002Fgithub.com\u002FTheAngryPit\u002FTheAngrySkills\u002Fblob\u002Fmain\u002Fskills\u002Fmirrors-cursor\u002Fcursor-principle-test-behavior-not-implementation\u002Freferences\u002Fruntime\u002Fselection.md",{"path":83,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":84,"sourceHtmlUrl":85},"references\u002Fruntime\u002Ft3.md",5135,"https:\u002F\u002Fgithub.com\u002FTheAngryPit\u002FTheAngrySkills\u002Fblob\u002Fmain\u002Fskills\u002Fmirrors-cursor\u002Fcursor-principle-test-behavior-not-implementation\u002Freferences\u002Fruntime\u002Ft3.md",[87,94,101,108,115,122],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":20},"01M782GJ4CTPNKZN0WXTASXXZ4","X MCP guide","ALWAYS read this before using any X tool (the X plugin, any X MCP, or Grok Bot's built-in public X reads) and again on any X error. X tools are included in Grok Bot at no cost: never estimate costs, check credits, or tell the user to buy credits. tools=0 \u002F user-X-* not found is a setup failure, not a paywall. Covers Spaces, communities, and Lists (reads and list writes), X Chat (XChat, inbox, DMs, unread, message requests, Chat PIN, juicebox, xchat_lite: clone xchat-grokbot-helper yourself and decrypt locally), scheduled X calls (schedule_call, list_scheduled_calls and the other call tools), and livestreams (stream sources, broadcasts, scheduled broadcasts, broadcast chat, moderators, mutes). Chat, call, livestream, Spaces, or Lists tools missing while other X tools work: reconnect the X plugin.","https:\u002F\u002Fgithub.com\u002FTheAngryPit\u002FTheAngrySkills\u002Fblob\u002Fmain\u002Fsources\u002Fcursor-plugins\u002Fupstream-tree\u002Fthird_party\u002Fx\u002Fskills\u002Fx-api-mcp-guide\u002FSKILL.md",[],[],{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":20},"01M782GBW77901ESC9PD3XAM6V","X Money guide","Read this before the first X Money action in a session and again on any X Money error, refusal, or missing capability. Covers the approval rule for every action that moves money (always ask, every time, no exceptions), how the connection works (connection code plus passkey in the X app), how to guide the user through connect, reconnect, and revoke at x.com\u002Fi\u002Fmoney\u002Fsettings\u002Fconnections, and what each failure message means.","https:\u002F\u002Fgithub.com\u002FTheAngryPit\u002FTheAngrySkills\u002Fblob\u002Fmain\u002Fsources\u002Fcursor-plugins\u002Fupstream-tree\u002Fthird_party\u002Fx-money\u002Fskills\u002Fx-money-guide\u002FSKILL.md",[],[],{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":20},"01M782G7CMYD2JSVT3RX81QRB8","google-slides","Build and edit Google Slides through the google-slides MCP tools - slides, grids of cards and columns, text boxes, shapes, images, tables, styling, layout inspection, and per-slide PNG rendering. Use when creating a deck, laying out slide elements, matching a template, or verifying how a slide looks.","https:\u002F\u002Fgithub.com\u002FTheAngryPit\u002FTheAngrySkills\u002Fblob\u002Fmain\u002Fsources\u002Fcursor-plugins\u002Fupstream-tree\u002Fthird_party\u002Fgoogle-slides\u002Fskills\u002Fgoogle-slides\u002FSKILL.md",[],[],{"skillNo":109,"name":110,"nameZh":6,"description":111,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":112,"categories":113,"keywords":114,"publishedAt":20},"01M782G4DDAJ4SMGJEF13HTX69","google-sheets","Build and edit Google Sheets with the google-sheets tools - values, formatting, charts, conditional formatting, structure, validation, named and protected ranges. Use when creating a spreadsheet or dashboard, formatting cells, adding or fixing charts, or reorganizing tabs and rows.","https:\u002F\u002Fgithub.com\u002FTheAngryPit\u002FTheAngrySkills\u002Fblob\u002Fmain\u002Fsources\u002Fcursor-plugins\u002Fupstream-tree\u002Fthird_party\u002Fgoogle-sheets\u002Fskills\u002Fgoogle-sheets\u002FSKILL.md",[],[],{"skillNo":116,"name":117,"nameZh":6,"description":118,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":119,"categories":120,"keywords":121,"publishedAt":20},"01M782G1F8QNMNKRSY6M3Y0QG6","google-drive","Work with Google Drive through its MCP tools - search, read, create, organize, share, comment, and export files. Use when creating files in specific folders, moving or renaming, converting Markdown\u002FCSV into Docs\u002FSheets, managing comments, or exporting a rendered PDF.","https:\u002F\u002Fgithub.com\u002FTheAngryPit\u002FTheAngrySkills\u002Fblob\u002Fmain\u002Fsources\u002Fcursor-plugins\u002Fupstream-tree\u002Fthird_party\u002Fgoogle-drive\u002Fskills\u002Fgoogle-drive\u002FSKILL.md",[],[],{"skillNo":123,"name":124,"nameZh":6,"description":125,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":126,"categories":127,"keywords":128,"publishedAt":20},"01M782FYVJ5XTP2R0B446RRYTX","google-docs","Author and edit Google Docs with the google-docs tools - structured writing, character and paragraph styling, lists, tables, images, headers\u002Ffooters. Use when creating a formatted document, editing document content, or applying styles.","https:\u002F\u002Fgithub.com\u002FTheAngryPit\u002FTheAngrySkills\u002Fblob\u002Fmain\u002Fsources\u002Fcursor-plugins\u002Fupstream-tree\u002Fthird_party\u002Fgoogle-docs\u002Fskills\u002Fgoogle-docs\u002FSKILL.md",[],[]]