[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6C4K06CX37MTMM541NR0SJS":3,"skill-same:01M6C4K06CX37MTMM541NR0SJS":54},{"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":26,"linkOnly":27,"markdownContent":28,"markdownBody":29,"frontMatter":30,"refName":31,"commitSha":32,"skillDirectory":33,"forksCount":34,"repositoryHtmlUrl":35,"repositoryHomepageUrl":6,"ownerHtmlUrl":36,"ownerBlogUrl":37,"ownerDescription":38,"updatedAt":39,"install":40,"resources":53},"01M6C4K06CX37MTMM541NR0SJS","principle-keep-the-core-pure",null,"WHEN domain logic lands in an adapter, handler, job or UI component; NOT for wiring that makes no domain decision; keeps decisions in pure functions behind thin framework wiring.","mintuz\u002Fskills","mintuz","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F447031?v=4","01M6BVWJYSVR4XQC9AQCEMWQRG","Adam Bulmer","01M6C4DCXKNYZB281YB3PZDJJG",35,"MIT","https:\u002F\u002Fgithub.com\u002Fmintuz\u002Fskills\u002Fblob\u002Fmain\u002Fsrc\u002Fprinciple\u002Fskills\u002Fprinciple-keep-the-core-pure\u002FSKILL.md",[],[19,20,21,22,23,24,25],"core","principle keep the core pure","component","framework","ui","decision","decisions","2026-11-10 10:12:30",false,"---\nname: principle-keep-the-core-pure\ndescription: \"WHEN domain logic lands in an adapter, handler, job or UI component; NOT for wiring that makes no domain decision; keeps decisions in pure functions behind thin framework wiring.\"\n---\n\n# Keep The Core Pure\n\nPut domain decisions in pure functions; keep framework wiring thin and mechanical.\n\n1. Find each domain decision inside the adapter, request handler, job, view or component: the branch that applies a business rule, computes a result or chooses an outcome.\n2. Extract it into a pure function: explicit inputs in, a domain result out. Pass time, configuration and identifiers as arguments; read no clock, global, database or framework object inside it.\n3. Leave the shell to read input, call the function and perform effects with the result. Add new rules to the function, not to the shell. When several frameworks need the same rule, they share the function rather than copy it into each.\n4. Test the decision directly, without starting the framework, server, database or renderer.\n\nDistinct from: `principle-hide-representations` (a private wire, storage or framework shape crosses a module boundary), `principle-parse-at-the-boundary` (untrusted data enters and needs validating), `principle-minimize-reader-load` (layers that own no decision make a path hard to trace).\n\nDone: every domain rule touched is testable without the framework, and the wiring holds no domain branches.\n","# Keep The Core Pure\n\nPut domain decisions in pure functions; keep framework wiring thin and mechanical.\n\n1. Find each domain decision inside the adapter, request handler, job, view or component: the branch that applies a business rule, computes a result or chooses an outcome.\n2. Extract it into a pure function: explicit inputs in, a domain result out. Pass time, configuration and identifiers as arguments; read no clock, global, database or framework object inside it.\n3. Leave the shell to read input, call the function and perform effects with the result. Add new rules to the function, not to the shell. When several frameworks need the same rule, they share the function rather than copy it into each.\n4. Test the decision directly, without starting the framework, server, database or renderer.\n\nDistinct from: `principle-hide-representations` (a private wire, storage or framework shape crosses a module boundary), `principle-parse-at-the-boundary` (untrusted data enters and needs validating), `principle-minimize-reader-load` (layers that own no decision make a path hard to trace).\n\nDone: every domain rule touched is testable without the framework, and the wiring holds no domain branches.\n",{"name":5,"description":7},"main","4e0a12b5048eac78a3ace4feee657873cdd530ef","src\u002Fprinciple\u002Fskills\u002Fprinciple-keep-the-core-pure",7,"https:\u002F\u002Fgithub.com\u002Fmintuz\u002Fskills","https:\u002F\u002Fgithub.com\u002Fmintuz","http:\u002F\u002Fwww.mintuz.com","Working at @monzo, Previously worked at Moonpig, @booking and @bbc","2026-11-11 15:50:19",{"source":8,"skillName":5,"commands":41,"prompt":51,"zipAvailable":52},[42,45,48],{"tool":43,"command":44},"npx","npx skills add mintuz\u002Fskills --skill principle-keep-the-core-pure",{"tool":46,"command":47},"bunx","bunx skills add mintuz\u002Fskills --skill principle-keep-the-core-pure",{"tool":49,"command":50},"pnpm","pnpm dlx skills add mintuz\u002Fskills --skill principle-keep-the-core-pure","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmintuz\u002Fskills\u002Fblob\u002Fmain\u002Fsrc\u002Fprinciple\u002Fskills\u002Fprinciple-keep-the-core-pure\u002FSKILL.md",true,[],[55,78,100,112,133,150],{"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":69,"publishedAt":26},"01M6C4PDGB6ZZWBS35N3DF7PZZ","xstate","WHEN React state changes in response to an external answer — async submit, in-flight or loading flags, retries, cancellation, polling, optimistic updates, stale responses — or to an interaction with an interruptible middle, such as a drag or a gesture; or WHEN building, reviewing, testing, or visualising XState 5 actors and @xstate\u002Freact integrations; NOT for a value one event sets completely, such as a text draft, a focus flag, or a plain open and closed toggle; models typed lifecycles and renders legal Mermaid stateDiagram-v2 charts.","https:\u002F\u002Fgithub.com\u002Fmintuz\u002Fskills\u002Fblob\u002Fmain\u002Fsrc\u002Fweb\u002Fskills\u002Fxstate\u002FSKILL.md",[61,66],{"categoryNo":62,"categoryName":63,"taxonomyType":64,"taxonomyTypeDesc":65},"01JBSEEDCAT000000000000008","测试与质量","SCENARIO","使用场景",{"categoryNo":67,"categoryName":68,"taxonomyType":64,"taxonomyTypeDesc":65},"01JBSEEDCAT000000000000009","前端开发",[57,70,71,72,73,74,75,76,77],"integrations","react","text","open","Charts","state","mermaid","testing",{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":92,"publishedAt":26},"01M6C4PB6VVC2X19B63B7YNH0T","web-design","WHEN refining UI layout, typography, color, or polish; NOT code implementation; provides concise principles for intentional, legible design.","https:\u002F\u002Fgithub.com\u002Fmintuz\u002Fskills\u002Fblob\u002Fmain\u002Fsrc\u002Fweb\u002Fskills\u002Fweb-design\u002FSKILL.md",[84,87],{"categoryNo":85,"categoryName":86,"taxonomyType":64,"taxonomyTypeDesc":65},"01JBSEEDCAT000000000000015","视觉设计",{"categoryNo":88,"categoryName":89,"taxonomyType":90,"taxonomyTypeDesc":91},"01JBSEEDCAT000000000000032","设计师","PROFESSION","适用职业",[93,94,95,96,97,23,98,99],"design","web","web design","code","code implementation","polish","typography",{"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":107,"publishedAt":26},"01M6C4P8D92GJDA49V7X1CZXEV","tailwind","WHEN building design systems or component libraries with Tailwind CSS; covers design tokens, CVA patterns and dark mode.","https:\u002F\u002Fgithub.com\u002Fmintuz\u002Fskills\u002Fblob\u002Fmain\u002Fsrc\u002Fweb\u002Fskills\u002Ftailwind\u002FSKILL.md",[106],{"categoryNo":85,"categoryName":86,"taxonomyType":64,"taxonomyTypeDesc":65},[108,93,109,21,110,111],"Tailwind","css","libraries","design systems",{"skillNo":113,"name":114,"nameZh":6,"description":115,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":121,"publishedAt":26},"01M6C4P5VWQ69Q32DA0634GDJY","refactoring","WHEN you need a plan to refactor, restructure, or clean up working code and the test result is known, either green or a recorded failing set; NOT for new feature delivery or any behavior change; reversible-baseline safety with prioritized improvements.","https:\u002F\u002Fgithub.com\u002Fmintuz\u002Fskills\u002Fblob\u002Fmain\u002Fsrc\u002Fweb\u002Fskills\u002Frefactoring\u002FSKILL.md",[118],{"categoryNo":119,"categoryName":120,"taxonomyType":64,"taxonomyTypeDesc":65},"01JBSEEDCAT000000000000007","代码审查",[114,122,123,124,125,126,127,128,129,130,131,96,132],"baseline","SET","plan","behavior","new feature","up","Safety","test","change","feature delivery","refactor",{"skillNo":134,"name":71,"nameZh":6,"description":135,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":136,"categories":137,"keywords":140,"publishedAt":26},"01M6C4P345APEFEX00J8T7QMXQ","WHEN building or changing React components, pages, hooks, effects, or apps, including edits to existing components; NOT for test code (react-testing) or styling (css, tailwind); enforces scalable architecture, state management, API layer, performance patterns.","https:\u002F\u002Fgithub.com\u002Fmintuz\u002Fskills\u002Fblob\u002Fmain\u002Fsrc\u002Fweb\u002Fskills\u002Freact\u002FSKILL.md",[138,139],{"categoryNo":62,"categoryName":63,"taxonomyType":64,"taxonomyTypeDesc":65},{"categoryNo":67,"categoryName":68,"taxonomyType":64,"taxonomyTypeDesc":65},[71,141,77,109,142,129,143,144,145,96,75,146,108,147,148,149],"react components","performance","components","architecture","state management","api","management","hooks","styling",{"skillNo":151,"name":152,"nameZh":6,"description":153,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":154,"categories":155,"keywords":158,"publishedAt":26},"01M6C4P0DK385QBG3B3S86TQV2","react-testing","WHEN testing React components\u002Fhooks\u002Fcontext with React Testing Library; NOT e2e; covers renderHook, providers, forms, and anti-patterns.","https:\u002F\u002Fgithub.com\u002Fmintuz\u002Fskills\u002Fblob\u002Fmain\u002Fsrc\u002Fweb\u002Fskills\u002Freact-testing\u002FSKILL.md",[156,157],{"categoryNo":62,"categoryName":63,"taxonomyType":64,"taxonomyTypeDesc":65},{"categoryNo":67,"categoryName":68,"taxonomyType":64,"taxonomyTypeDesc":65},[77,159,71,143,141,160,161,162,163,164,165,148],"react testing","testing library","library","Providers","e2e","context","anti-patterns"]