[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M69B83GRCYFGQBCXTFW4TT8N":3,"skill-same:01M69B83GRCYFGQBCXTFW4TT8N":52},{"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":24,"linkOnly":25,"markdownContent":26,"markdownBody":27,"frontMatter":28,"refName":29,"commitSha":30,"skillDirectory":31,"forksCount":32,"repositoryHtmlUrl":33,"repositoryHomepageUrl":6,"ownerHtmlUrl":34,"ownerBlogUrl":35,"ownerDescription":36,"updatedAt":37,"install":38,"resources":51},"01M69B83GRCYFGQBCXTFW4TT8N","reactor-advanced",null,"Reactor.Advanced Win2D canvases — choosing Win2DCanvas, Win2DAnimatedCanvas, or Win2DVirtualCanvas; using UseDrawState, UseCanvasResources, UseDrawCommand; and following threading\u002Fdevice-loss rules.","microsoft\u002Fmicrosoft-ui-reactor","microsoft","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F6154722?v=4","01M698VYDXZ6JW5WH3CRV650R8","Microsoft","01M69B6EF21X2GHARCXN2BH1K1",896,"MIT","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fmicrosoft-ui-reactor\u002Fblob\u002Fmain\u002Fplugins\u002Freactor\u002Fskills\u002Freactor-advanced\u002FSKILL.md",[],[19,20,21,22,23],"reactor advanced","advanced","Rules","device","threading","2026-11-10 10:12:30",false,"---\nname: reactor-advanced\ndescription: \"Reactor.Advanced Win2D canvases — choosing Win2DCanvas, Win2DAnimatedCanvas, or Win2DVirtualCanvas; using UseDrawState, UseCanvasResources, UseDrawCommand; and following threading\u002Fdevice-loss rules.\"\n---\n\n# Reactor Advanced\n\nUse this skill when adding immediate-mode Win2D drawing through `Microsoft.UI.Reactor.Advanced`. The full guide is `docs\u002Fguide\u002Fwin2d-canvas.md`; the performance sample is `samples\u002Fapps\u002Fparticle-storm\u002F`.\n\n## Pick the right canvas\n\n| Workload | Use | Why |\n|---|---|---|\n| Static or data-driven drawing that changes after state updates | `Win2DCanvas.Of(onDraw, redrawKey)` | Manual invalidation; pass a changing `RedrawKey` for every value the draw callback reads. |\n| Game loop, physics, particles, visualizers, steady FPS | `Win2DAnimatedCanvas.Of(onUpdate, onDraw, drawState, isPaused)` | Win2D owns the tick and calls update\u002Fdraw on the game thread. |\n| Huge scrollable or tiled surfaces | `Win2DVirtualCanvas.Of(onRegionDraw, contentSize)` | Draws only invalidated visible regions; update tiles by changing `InvalidateRegions`. |\n\n## Threading cheat sheet\n\n| Callback | Thread | Rule |\n|---|---|---|\n| `Win2DCanvas.OnDraw` | UI thread | Safe to read Reactor state captured by render. |\n| `Win2DAnimatedCanvas.OnUpdate` \u002F `.OnDraw` | Win2D game thread | Do **not** touch WinUI controls. Use thread-safe data or `UseState(threadSafe: true)` for UI handoff. |\n| `Win2DVirtualCanvas.OnRegionDraw` | UI thread | Keep work bounded to the invalidated region. |\n| `UseCanvasResources` factory | Worker\u002Fgame thread | Create device resources and return a disposable\u002Frecreatable object. |\n\nTreat `Ref.Current` from `UseDrawState` like a volatile field. Re-read it and make the referenced object safe for any cross-thread mutation. Debug builds add a sentinel that appends `docs\u002Fguide\u002Fwin2d-canvas.md#threading` to likely WinUI thread-affinity exceptions from animated callbacks.\n\n## Reference graph model\n\nElement refs are reactive cells. `.Ref(cell)` writes the mounted\n`FrameworkElement` into the cell and writes `null` on unmount.\nReference properties (`TeachingTip.Target`, `.LabeledBy`, `.DescribedBy`,\n`.FlowsTo`, `.FlowsFrom`, `.XYFocus*`, and custom descriptor\n`.Reference` \u002F `.ReferenceList`) subscribe to those cells instead of\nsampling `.Current`.\n\nResolution is one-way and push-based: cells enqueue dirty reference\nedges during commit, then Reactor flushes the dirty set after the tree is\nstable. Cycles are allowed because each property slot is a one-way edge.\nList references preserve author declaration order and omit unresolved\ntargets. Advanced authors should use `descriptor.Reference` for regular\ncontrols and `binding.Reference` only as the bridge for hand-coded\nhandlers.\n\n## Hooks and recipes\n\n```csharp\nvar state = ctx.UseDrawState(() => new ParticleField(20_000));\n\nvar sprite = ctx.UseCanvasResources\u003CCanvasBitmap>(async device =>\n    await CanvasBitmap.LoadAsync(device, \"Assets\u002Fparticle.png\"));\n\nvar draw = ctx.UseDrawCommand(model, static (session, args, m) =>\n    m.Render(session), deps: [model.Version]);\n```\n\n`UseCanvasResources` is the device-loss recipe: allocate from the supplied `CanvasDevice`, draw only when the returned ref is non-null, and let the hook dispose\u002Frecreate after `CanvasDevice.DeviceLost`.\n\n## Performance proof\n\nThe Particle Storm sample (`samples\u002Fapps\u002Fparticle-storm\u002F`) is the canonical pattern: pure Reactor chrome controls parameters; `Win2DAnimatedCanvas` renders the hot particle path; `UseDrawState` holds the particle buffers; `UseCanvasResources` owns sprites and other device resources.\n","# Reactor Advanced\n\nUse this skill when adding immediate-mode Win2D drawing through `Microsoft.UI.Reactor.Advanced`. The full guide is `docs\u002Fguide\u002Fwin2d-canvas.md`; the performance sample is `samples\u002Fapps\u002Fparticle-storm\u002F`.\n\n## Pick the right canvas\n\n| Workload | Use | Why |\n|---|---|---|\n| Static or data-driven drawing that changes after state updates | `Win2DCanvas.Of(onDraw, redrawKey)` | Manual invalidation; pass a changing `RedrawKey` for every value the draw callback reads. |\n| Game loop, physics, particles, visualizers, steady FPS | `Win2DAnimatedCanvas.Of(onUpdate, onDraw, drawState, isPaused)` | Win2D owns the tick and calls update\u002Fdraw on the game thread. |\n| Huge scrollable or tiled surfaces | `Win2DVirtualCanvas.Of(onRegionDraw, contentSize)` | Draws only invalidated visible regions; update tiles by changing `InvalidateRegions`. |\n\n## Threading cheat sheet\n\n| Callback | Thread | Rule |\n|---|---|---|\n| `Win2DCanvas.OnDraw` | UI thread | Safe to read Reactor state captured by render. |\n| `Win2DAnimatedCanvas.OnUpdate` \u002F `.OnDraw` | Win2D game thread | Do **not** touch WinUI controls. Use thread-safe data or `UseState(threadSafe: true)` for UI handoff. |\n| `Win2DVirtualCanvas.OnRegionDraw` | UI thread | Keep work bounded to the invalidated region. |\n| `UseCanvasResources` factory | Worker\u002Fgame thread | Create device resources and return a disposable\u002Frecreatable object. |\n\nTreat `Ref.Current` from `UseDrawState` like a volatile field. Re-read it and make the referenced object safe for any cross-thread mutation. Debug builds add a sentinel that appends `docs\u002Fguide\u002Fwin2d-canvas.md#threading` to likely WinUI thread-affinity exceptions from animated callbacks.\n\n## Reference graph model\n\nElement refs are reactive cells. `.Ref(cell)` writes the mounted\n`FrameworkElement` into the cell and writes `null` on unmount.\nReference properties (`TeachingTip.Target`, `.LabeledBy`, `.DescribedBy`,\n`.FlowsTo`, `.FlowsFrom`, `.XYFocus*`, and custom descriptor\n`.Reference` \u002F `.ReferenceList`) subscribe to those cells instead of\nsampling `.Current`.\n\nResolution is one-way and push-based: cells enqueue dirty reference\nedges during commit, then Reactor flushes the dirty set after the tree is\nstable. Cycles are allowed because each property slot is a one-way edge.\nList references preserve author declaration order and omit unresolved\ntargets. Advanced authors should use `descriptor.Reference` for regular\ncontrols and `binding.Reference` only as the bridge for hand-coded\nhandlers.\n\n## Hooks and recipes\n\n```csharp\nvar state = ctx.UseDrawState(() => new ParticleField(20_000));\n\nvar sprite = ctx.UseCanvasResources\u003CCanvasBitmap>(async device =>\n    await CanvasBitmap.LoadAsync(device, \"Assets\u002Fparticle.png\"));\n\nvar draw = ctx.UseDrawCommand(model, static (session, args, m) =>\n    m.Render(session), deps: [model.Version]);\n```\n\n`UseCanvasResources` is the device-loss recipe: allocate from the supplied `CanvasDevice`, draw only when the returned ref is non-null, and let the hook dispose\u002Frecreate after `CanvasDevice.DeviceLost`.\n\n## Performance proof\n\nThe Particle Storm sample (`samples\u002Fapps\u002Fparticle-storm\u002F`) is the canonical pattern: pure Reactor chrome controls parameters; `Win2DAnimatedCanvas` renders the hot particle path; `UseDrawState` holds the particle buffers; `UseCanvasResources` owns sprites and other device resources.\n",{"name":5,"description":7},"main","74791562c11792f7c0e2dd875f1e82b94d70b397","plugins\u002Freactor\u002Fskills\u002Freactor-advanced",67,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fmicrosoft-ui-reactor","https:\u002F\u002Fgithub.com\u002Fmicrosoft","https:\u002F\u002Fopensource.microsoft.com","Open source projects and samples from Microsoft","2026-11-15 01:08:04",{"source":8,"skillName":5,"commands":39,"prompt":49,"zipAvailable":50},[40,43,46],{"tool":41,"command":42},"npx","npx skills add microsoft\u002Fmicrosoft-ui-reactor --skill reactor-advanced",{"tool":44,"command":45},"bunx","bunx skills add microsoft\u002Fmicrosoft-ui-reactor --skill reactor-advanced",{"tool":47,"command":48},"pnpm","pnpm dlx skills add microsoft\u002Fmicrosoft-ui-reactor --skill reactor-advanced","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fmicrosoft-ui-reactor\u002Fblob\u002Fmain\u002Fplugins\u002Freactor\u002Fskills\u002Freactor-advanced\u002FSKILL.md",true,[],[53,59,88,113,138,161],{"skillNo":54,"name":55,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":56,"categories":57,"keywords":58,"publishedAt":24},"01M69B94E15PYYWXAGFV832MRK","Charting","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fmicrosoft-ui-reactor\u002Fblob\u002Fmain\u002Fsrc\u002FReactor.Advanced\u002FCharting\u002Fskill.md",[],[55],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":24},"01M69B92C846XMSNJ4PZGVYY3C","reactor-wrapping","Turn ANY WinUI control — a vendor\u002Fthird-party control, your own custom Control, or a Windows Community Toolkit one — into a first-class declarative Reactor element with the [GenerateReactorWrapper] source generator, zero hand-written wrapper code. Covers auto-inference (props, content, two-way pairs, panel\u002Fitems children, events), the [Wrap*] annotation cheat-sheet, imperative-lifecycle controls, diagnostics, and when to fall back to a hand-written ControlDescriptor.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fmicrosoft-ui-reactor\u002Fblob\u002Fmain\u002Fplugins\u002Freactor\u002Fskills\u002Freactor-wrapping\u002FSKILL.md",[],[66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87],"reactor wrapping","declarative","with","hand","code","cheat","generator","when","auto","controls","custom","element","lifecycle","winui","ZeRO","panel","community","back","inference","diagnostics","toolkit","windows",{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":24},"01M69B90PW92BQ4YNZYTP4SERB","reactor-windowing","Reactor top-level windowing cookbook: WindowSpec, OpenWindow, draggable windows, borderless\u002Ftool windows, placement persistence, taskbar visibility, z-order, aspect ratio, SizeToContent, displays, taskbar integration, and owner-window file\u002Ffolder pickers.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fmicrosoft-ui-reactor\u002Fblob\u002Fmain\u002Fplugins\u002Freactor\u002Fskills\u002Freactor-windowing\u002FSKILL.md",[],[95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,87,110,111,112],"reactor windowing","progress","persistence","cookbook","integration","folder","command","command palette","top","window","palette","file","restore","open","tool","remember","position","make",{"skillNo":114,"name":115,"nameZh":6,"description":116,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":117,"categories":118,"keywords":119,"publishedAt":24},"01M69B8Y5Y0VKXADXCN3W1NK89","reactor-recipes","Paste-ready single-file Reactor recipes indexed by intent — list with add\u002Fdelete\u002Ftoggle, sidebar navigation between pages, form with validation + submit gating, async fetch with loading\u002Ferror\u002Fdata states, themed Win11 card surface. Use a recipe instead of synthesizing from prose: copy, adjust, ship.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fmicrosoft-ui-reactor\u002Fblob\u002Fmain\u002Fplugins\u002Freactor\u002Fskills\u002Freactor-recipes\u002FSKILL.md",[],[120,121,106,122,68,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137],"reactor recipes","recipes","recipe","form","use","adjust","single","pages","async","card","submit","loading","states","fetch","gating","single-file","ready","error",{"skillNo":139,"name":140,"nameZh":6,"description":141,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":142,"categories":143,"keywords":144,"publishedAt":24},"01M69B8WNYS31M4P012P2QTX6R","reactor-navigation","Reactor navigation — `UseNavigation` hook, `NavigationHost` renderer, `NavigationView` sidebar, `TabView` tabs, route params, stack operations, page lifecycle, deep linking, transitions, caching. Use when building multi-page apps or wiring sidebar\u002Ftab navigation.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fmicrosoft-ui-reactor\u002Fblob\u002Fmain\u002Fplugins\u002Freactor\u002Fskills\u002Freactor-navigation\u002FSKILL.md",[],[145,146,147,73,148,124,78,149,150,151,152,153,154,155,156,157,158,159,160],"navigation","reactor navigation","caching","apps","renderer","multi-page","page","deep","wiring","hook","operations","transitions","linking","stack","route","multi",{"skillNo":162,"name":163,"nameZh":6,"description":164,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":165,"categories":166,"keywords":167,"publishedAt":24},"01M69B8TGJA43N8X6BFVWTXC1H","reactor-input","Reactor input — gestures (`OnPan`, `OnPinch`, `OnRotate`), pointer events, drag-and-drop (`OnDragStarting`), focus management (`UseElementFocus`, `UseFocus`, `UseFocusTrap`). Use when implementing direct manipulation or custom focus behavior.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fmicrosoft-ui-reactor\u002Fblob\u002Fmain\u002Fplugins\u002Freactor\u002Fskills\u002Freactor-input\u002FSKILL.md",[],[168,169,170,171,172,173,174,175,73,124,76,176,177,178],"input","reactor input","direct","events","management","behavior","focus","drop","implementing","drag","gestures"]