[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6MDBG25DCZ082JMVRFBY9YE":3,"skill-same:01M6MDBG25DCZ082JMVRFBY9YE":103},{"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":37,"linkOnly":38,"markdownContent":39,"markdownBody":40,"frontMatter":41,"refName":42,"commitSha":43,"skillDirectory":44,"forksCount":45,"repositoryHtmlUrl":46,"repositoryHomepageUrl":47,"ownerHtmlUrl":48,"ownerBlogUrl":47,"ownerDescription":49,"updatedAt":50,"install":51,"resources":64},"01M6MDBG25DCZ082JMVRFBY9YE","xstate-store",null,"Build, test, integrate, or migrate XState Store v4: transitions, effects, schemas, selectors, atoms, extensions, React bindings, and fromStore. Excludes XState state-machine design, other stores, and Query server state.","compozy\u002Fcompozy","compozy","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F205107042?v=4","01M6JWVTXX4DX38AWZ7SPFEKEV","CompozyOS","01M6JWVV2P34GM1PDATVB2EV05",2871,"MIT","https:\u002F\u002Fgithub.com\u002Fcompozy\u002Fcompozy\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fxstate-store\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36],"xstate store","store","xstate","build","effects","extensions","machine design","machine","transitions","query","design","state-machine","integrate","migrate","server","state","react","test","2026-11-10 10:12:30",false,"---\nname: xstate-store\ndescription: \"Build, test, integrate, or migrate XState Store v4: transitions, effects, schemas, selectors, atoms, extensions, React bindings, and fromStore. Excludes XState state-machine design, other stores, and Query server state.\"\n---\n\n# XState Store\n\nTargets `@xstate\u002Fstore` v4 and `@xstate\u002Fstore-react` v2 (TypeScript 5.4+). Read the reference matched by the API or behavior being changed. Load adjacent references only for concerns the change crosses; reuse relevant context already read.\n\n## Pick the primitive first\n\n| State | Primitive | Why |\n| --- | --- | --- |\n| Domain state updated through named events | `createStore({ context, on })` | Typed `trigger`, `can`, emitted events, replayable transitions |\n| Per-instance state built from input | `createStoreLogic({ context: (input) => … })` | One definition, many instances; `selectors` come along |\n| A single value set directly | `createAtom(value)` | No event vocabulary to justify a store |\n| A value computed from other atoms or selectors | `createAtom(() => …)` | Read-only, recomputes on dependency change |\n| Modes, guards, delays, hierarchical or parallel states | `xstate` machine | A store models data, not lifecycle |\n\n*Done when:* the primitive is chosen from this table and its justification holds.\n\n## Branches\n\n| When you are… | Reference |\n| --- | --- |\n| Creating a store, writing transitions, using `trigger`\u002F`send`\u002F`can`, or Immer | `references\u002Fstore-core.md` |\n| Enqueuing effects, emitting events, or doing async work | `references\u002Feffects-and-events.md` |\n| Declaring `schemas` or turning on runtime validation | `references\u002Fschemas-and-validation.md` |\n| Reading state with `store.select`, atoms, derived\u002Fasync\u002Freducer atoms | `references\u002Fselectors-and-atoms.md` |\n| Building reusable\u002Fper-instance stores with `createStoreLogic`, input, or `selectors` | `references\u002Fstore-logic-and-input.md` |\n| Adding `persist`, `undoRedo`, `reset`, or composing `.with(...)` | `references\u002Fextensions.md` |\n| Wiring a store into React components | `references\u002Freact.md` |\n| Testing transitions, inspecting a store, or interoperating with XState | `references\u002Ftesting-and-interop.md` |\n| Upgrading a v3 store to v4, or porting an existing Zustand store over | `references\u002Fmigration-v4.md` |\n\nApply the technical rules relevant to the changed behavior.\n\n## Tripwires\n\n**Transitions** — return the complete next context (spread the old one); return `undefined` to mark an event disallowed, which is what `store.can.*()` reports.\n\n**Effects** — call `enqueue.effect`, `enqueue.emit.*`, and `enqueue.trigger.*` synchronously inside the transition; async work goes inside `enqueue.effect(async () => …)` and reports back by triggering another event.\n\n**Imports** — framework bindings come from `@xstate\u002Fstore-react` (and siblings), never `@xstate\u002Fstore\u002Freact`; extensions come from `@xstate\u002Fstore\u002Fpersist`, `\u002Fundo`, `\u002Freset`, `\u002Fvalidate`.\n\n**Schemas** — `schemas` types the store; only `.with(validateSchemas())` validates at runtime.\n\n**Atoms** — computed atoms read dependencies via `.get()`; their first parameter is the previous computed value, so annotate `createAtom\u003CT>(…)` when using it.\n\n**React** — module-scoped stores for app-wide state, `useStore(logic, input)` for component-scoped state; subscribe through `useSelector`\u002F`useAtom` rather than `getSnapshot()`.\n","# XState Store\n\nTargets `@xstate\u002Fstore` v4 and `@xstate\u002Fstore-react` v2 (TypeScript 5.4+). Read the reference matched by the API or behavior being changed. Load adjacent references only for concerns the change crosses; reuse relevant context already read.\n\n## Pick the primitive first\n\n| State | Primitive | Why |\n| --- | --- | --- |\n| Domain state updated through named events | `createStore({ context, on })` | Typed `trigger`, `can`, emitted events, replayable transitions |\n| Per-instance state built from input | `createStoreLogic({ context: (input) => … })` | One definition, many instances; `selectors` come along |\n| A single value set directly | `createAtom(value)` | No event vocabulary to justify a store |\n| A value computed from other atoms or selectors | `createAtom(() => …)` | Read-only, recomputes on dependency change |\n| Modes, guards, delays, hierarchical or parallel states | `xstate` machine | A store models data, not lifecycle |\n\n*Done when:* the primitive is chosen from this table and its justification holds.\n\n## Branches\n\n| When you are… | Reference |\n| --- | --- |\n| Creating a store, writing transitions, using `trigger`\u002F`send`\u002F`can`, or Immer | `references\u002Fstore-core.md` |\n| Enqueuing effects, emitting events, or doing async work | `references\u002Feffects-and-events.md` |\n| Declaring `schemas` or turning on runtime validation | `references\u002Fschemas-and-validation.md` |\n| Reading state with `store.select`, atoms, derived\u002Fasync\u002Freducer atoms | `references\u002Fselectors-and-atoms.md` |\n| Building reusable\u002Fper-instance stores with `createStoreLogic`, input, or `selectors` | `references\u002Fstore-logic-and-input.md` |\n| Adding `persist`, `undoRedo`, `reset`, or composing `.with(...)` | `references\u002Fextensions.md` |\n| Wiring a store into React components | `references\u002Freact.md` |\n| Testing transitions, inspecting a store, or interoperating with XState | `references\u002Ftesting-and-interop.md` |\n| Upgrading a v3 store to v4, or porting an existing Zustand store over | `references\u002Fmigration-v4.md` |\n\nApply the technical rules relevant to the changed behavior.\n\n## Tripwires\n\n**Transitions** — return the complete next context (spread the old one); return `undefined` to mark an event disallowed, which is what `store.can.*()` reports.\n\n**Effects** — call `enqueue.effect`, `enqueue.emit.*`, and `enqueue.trigger.*` synchronously inside the transition; async work goes inside `enqueue.effect(async () => …)` and reports back by triggering another event.\n\n**Imports** — framework bindings come from `@xstate\u002Fstore-react` (and siblings), never `@xstate\u002Fstore\u002Freact`; extensions come from `@xstate\u002Fstore\u002Fpersist`, `\u002Fundo`, `\u002Freset`, `\u002Fvalidate`.\n\n**Schemas** — `schemas` types the store; only `.with(validateSchemas())` validates at runtime.\n\n**Atoms** — computed atoms read dependencies via `.get()`; their first parameter is the previous computed value, so annotate `createAtom\u003CT>(…)` when using it.\n\n**React** — module-scoped stores for app-wide state, `useStore(logic, input)` for component-scoped state; subscribe through `useSelector`\u002F`useAtom` rather than `getSnapshot()`.\n",{"name":5,"description":7},"main","65613632bb94072e27fc5015d17387e28a870111",".agents\u002Fskills\u002Fxstate-store",187,"https:\u002F\u002Fgithub.com\u002Fcompozy\u002Fcompozy","https:\u002F\u002Fcompozy.com","https:\u002F\u002Fgithub.com\u002Fcompozy","An OS for AI agents","2026-11-15 03:55:11",{"source":8,"skillName":5,"commands":52,"prompt":62,"zipAvailable":63},[53,56,59],{"tool":54,"command":55},"npx","npx skills add compozy\u002Fcompozy --skill xstate-store",{"tool":57,"command":58},"bunx","bunx skills add compozy\u002Fcompozy --skill xstate-store",{"tool":60,"command":61},"pnpm","pnpm dlx skills add compozy\u002Fcompozy --skill xstate-store","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fcompozy\u002Fcompozy\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fxstate-store\u002FSKILL.md",true,[65,71,75,79,83,87,91,95,99],{"path":66,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":69,"sourceHtmlUrl":70},"references\u002Feffects-and-events.md","REFERENCE","参考文档",3568,"https:\u002F\u002Fgithub.com\u002Fcompozy\u002Fcompozy\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fxstate-store\u002Freferences\u002Feffects-and-events.md",{"path":72,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":73,"sourceHtmlUrl":74},"references\u002Fextensions.md",7906,"https:\u002F\u002Fgithub.com\u002Fcompozy\u002Fcompozy\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fxstate-store\u002Freferences\u002Fextensions.md",{"path":76,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":77,"sourceHtmlUrl":78},"references\u002Fmigration-v4.md",5544,"https:\u002F\u002Fgithub.com\u002Fcompozy\u002Fcompozy\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fxstate-store\u002Freferences\u002Fmigration-v4.md",{"path":80,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":81,"sourceHtmlUrl":82},"references\u002Freact.md",6012,"https:\u002F\u002Fgithub.com\u002Fcompozy\u002Fcompozy\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fxstate-store\u002Freferences\u002Freact.md",{"path":84,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":85,"sourceHtmlUrl":86},"references\u002Fschemas-and-validation.md",4245,"https:\u002F\u002Fgithub.com\u002Fcompozy\u002Fcompozy\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fxstate-store\u002Freferences\u002Fschemas-and-validation.md",{"path":88,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":89,"sourceHtmlUrl":90},"references\u002Fselectors-and-atoms.md",4935,"https:\u002F\u002Fgithub.com\u002Fcompozy\u002Fcompozy\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fxstate-store\u002Freferences\u002Fselectors-and-atoms.md",{"path":92,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":93,"sourceHtmlUrl":94},"references\u002Fstore-core.md",3856,"https:\u002F\u002Fgithub.com\u002Fcompozy\u002Fcompozy\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fxstate-store\u002Freferences\u002Fstore-core.md",{"path":96,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":97,"sourceHtmlUrl":98},"references\u002Fstore-logic-and-input.md",3057,"https:\u002F\u002Fgithub.com\u002Fcompozy\u002Fcompozy\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fxstate-store\u002Freferences\u002Fstore-logic-and-input.md",{"path":100,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":101,"sourceHtmlUrl":102},"references\u002Ftesting-and-interop.md",4093,"https:\u002F\u002Fgithub.com\u002Fcompozy\u002Fcompozy\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fxstate-store\u002Freferences\u002Ftesting-and-interop.md",[104,140,165,187,198,210],{"skillNo":105,"name":106,"nameZh":6,"description":107,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":108,"licenseFileUrl":109,"sourceHtmlUrl":110,"categories":111,"keywords":117,"publishedAt":37},"01M6MD7W312X49RNEJRKKVKTTD","security-review","Security code review for vulnerabilities. Use when asked to \"security review\", \"find vulnerabilities\", \"check for security issues\", \"audit security\", \"OWASP review\", or review code for injection, XSS, authentication, authorization, cryptography issues. Provides systematic review with confidence-based reporting.","CC-BY-SA-4.0","https:\u002F\u002Fgithub.com\u002Fcompozy\u002Fcompozy\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fsecurity-review\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fcompozy\u002Fcompozy\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fsecurity-review\u002FSKILL.md",[112],{"categoryNo":113,"categoryName":114,"taxonomyType":115,"taxonomyTypeDesc":116},"01JBSEEDCAT000000000000007","代码审查","SCENARIO","使用场景",[118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139],"security","security review","review","injection","authentication","code review","issues","Bash","code","xss","audit","systematic","read","reporting","cryptography","owasp","systematic review","for","use","task","when","audit security",{"skillNo":141,"name":142,"nameZh":6,"description":143,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":144,"categories":145,"keywords":151,"publishedAt":37},"01M6MD5K93G1GP8VA56V2FEPZV","lesson-learned","Extract evidence-backed engineering lessons from recent changes or incidents. Use for requested reflection, lesson updates, or retiring an obsolete workflow rule.","https:\u002F\u002Fgithub.com\u002Fcompozy\u002Fcompozy\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Flesson-learned\u002FSKILL.md",[146],{"categoryNo":147,"categoryName":148,"taxonomyType":149,"taxonomyTypeDesc":150},"01JBSEEDCAT000000000000039","教师与教育","PROFESSION","适用职业",[152,153,154,135,155,156,157,158,159,160,161,162,136,163,164],"learned","lesson learned","lesson","changes","evidence","incidents","workflow","engineering","updates","extract","rule","lessons","reflection",{"skillNo":166,"name":9,"nameZh":6,"description":167,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":168,"categories":169,"keywords":170,"publishedAt":37},"01M6MDPNH3J60VRCGTPHVTHZR8","Operate CompozyOS. Use when working with CompozyOS sessions, agents, native tools, skills, tasks, Loops, Goals, Terminal, desktops and windows, automation, extensions, or configuration. Don't use for unrelated projects.","https:\u002F\u002Fgithub.com\u002Fcompozy\u002Fcompozy\u002Fblob\u002Fmain\u002Fskills\u002Fcompozy\u002FSKILL.md",[],[9,171,172,173,174,135,175,176,136,177,178,24,179,180,181,182,183,184,185,186,138],"sessions","windows","projects","operate","runtime","true","automation","tasks","with","loops","unrelated","goals","native","terminal","configuration","Tools",{"skillNo":188,"name":189,"nameZh":6,"description":190,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":191,"categories":192,"keywords":193,"publishedAt":37},"01M6MDPHKNPQHJ1TF21E1HSFNF","remotion-upgrade","Upgrade Remotion, and related packages","https:\u002F\u002Fgithub.com\u002Fcompozy\u002Fcompozy\u002Fblob\u002Fmain\u002Fpackages\u002Flaunch-video\u002F.agents\u002Fskills\u002Fremotion-upgrade\u002FSKILL.md",[],[194,195,196,197],"remotion upgrade","upgrade","Remotion","packages",{"skillNo":199,"name":200,"nameZh":6,"description":201,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":202,"categories":203,"keywords":204,"publishedAt":37},"01M6MDPFT91ZWC7Z09MRNZPAJG","remotion-studio","Preview a Remotion video","https:\u002F\u002Fgithub.com\u002Fcompozy\u002Fcompozy\u002Fblob\u002Fmain\u002Fpackages\u002Flaunch-video\u002F.agents\u002Fskills\u002Fremotion-studio\u002FSKILL.md",[],[205,206,196,207,208,209],"studio","remotion studio","Video","preview","remotion video",{"skillNo":211,"name":212,"nameZh":6,"description":213,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":214,"categories":215,"keywords":216,"publishedAt":37},"01M6MDPD5XDZPYB5NAZGKMPXWC","remotion-saas","Build an app with Remotion","https:\u002F\u002Fgithub.com\u002Fcompozy\u002Fcompozy\u002Fblob\u002Fmain\u002Fpackages\u002Flaunch-video\u002F.agents\u002Fskills\u002Fremotion-saas\u002FSKILL.md",[],[217,218,196,179,219,22],"saas","remotion saas","app"]