[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EBJXMEZ5JE98H7W6TQ6CB8":3,"skill-same:01M7EBJXMEZ5JE98H7W6TQ6CB8":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":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":14,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":29,"install":30,"resources":43},"01M7EBJXMEZ5JE98H7W6TQ6CB8","gestures",null,"Web gestures: drag, swipe, fling, hold, and dismiss that track the finger 1:1 and stay interruptible. Use when building a drawer, sheet, swipe-to-dismiss, drag-to-reorder, pull-to-refresh, or hold-to-confirm, or when a gesture lags the finger, jumps on release, or can't be caught mid-animation.","joaodavidsilva\u002Fskills","joaodavidsilva","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F7389336?v=4","01M7EBJ7HADRG745ZRNHB763EW","João David Silva","01M7EBJ7HYJE4BVXESTBNW1BJ1",0,"MIT","https:\u002F\u002Fgithub.com\u002Fjoaodavidsilva\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fdesign\u002Fgestures\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: gestures\ndescription: \"Web gestures: drag, swipe, fling, hold, and dismiss that track the finger 1:1 and stay interruptible. Use when building a drawer, sheet, swipe-to-dismiss, drag-to-reorder, pull-to-refresh, or hold-to-confirm, or when a gesture lags the finger, jumps on release, or can't be caught mid-animation.\"\n---\n\n# Gesture-Driven UI\n\nA gesture is direct manipulation: while the finger is down the element _is_ the finger; the moment it lifts, physics takes over. Every rule below follows from that split. For React Native and Expo, call the Skill tool with `\"animate-expo\"` instead.\n\nCall the Skill tool with `\"interface-polish\"`. Its `reference\u002FANIMATIONS.md` section \"Gestures & Drag Interactions\" owns the shared formulas (grab-offset tracking, velocity handoff, `project()`, `rubberband()`, flick dismissal, hold-to-confirm timing); this skill points there instead of repeating them.\n\n## 1. Build or adopt\n\n| Interaction | Use |\n| --- | --- |\n| Bottom sheet, drawer, snap points | A drawer library: momentum, overlay sync, velocity-aware dismissal, focus trapping, and Escape-to-close are weeks of edge cases |\n| Swipe card or toast, drag-to-reorder, pull-to-refresh, hold-to-confirm, bespoke drag | Build it with this skill |\n\nCheck `package.json` first and reuse the drag library already installed (Motion, dnd-kit) rather than adding a second. A library covers the gesture itself; steps 2 to 6 still govern everything you wire around it.\n\n**Done when:** the interaction is mapped to a library or a build, with the existing dependency named.\n\n## 2. Split every gesture into track and release\n\n```\nIs the pointer currently down?\n├── Yes → TRACK:   position maps 1:1 to the pointer, driven by transform writes alone.\n└── No  → RELEASE: a spring seeded with the release velocity finishes the motion.\n```\n\n### Track\n\n- **1:1 means 1:1.** Drive position from a `useMotionValue` or direct `transform` writes. A spring or transition here makes the element trail the finger, like dragging through syrup.\n- **Write `transform` on the dragged element.** Per-move React state and parent CSS variables both cost frames; `interface-polish` `reference\u002FPERFORMANCE.md` has the details.\n- **Rubber-band at the edges.** Past a boundary the element moves a fraction of the distance (Motion: `dragElastic`, which defaults to a loose tug), because resistance says \"nothing further\" physically.\n\n### Release\n\n- **Spring seeded with the gesture's velocity.** The element leaves the finger at the speed it was moving; a fixed-duration ease makes every fling land identically, which reads as fake.\n- **Dismiss on distance OR velocity.** Crossing a distance threshold dismisses, and so does a fast flick over a short distance. Start near a quarter of the travel and tune by feel; the flick check is in `reference\u002FANIMATIONS.md`.\n- **Bounce only after a drag.** A drag applies force, so a slight bounce on release feels physical. The same element closed by a button gets zero bounce, because no force was applied. Smaller elements need slightly more bounce to read the same.\n- **Snap-back is fast.** A gesture that misses the threshold returns quickly; a slow snap-back reads as the UI disagreeing in slow motion.\n\n**Done when:** every gesture names its TRACK driver and its RELEASE spring with the velocity source, and the TRACK path is pointer-driven `transform` writes alone.\n\n## 3. Keep it interruptible\n\nThe user must be able to catch a sheet mid-close and drag it back. A spring retargeted mid-flight keeps its velocity, so the redirect is seamless. A CSS `@keyframes` animation restarts from zero and cannot be caught: a keyframe enter makes a toast jump when a second toast arrives.\n\n**Done when:** every element a gesture can touch animates by spring or CSS transition.\n\n## 4. Link dependent values to drag progress\n\nAn overlay fades and the page behind scales as the sheet moves. Derive them from one source so they never drift apart, including mid-gesture and on reversal:\n\n```jsx\nconst y = useMotionValue(0);\nconst overlayOpacity = useTransform(y, [0, drawerHeight], [1, 0]);\n```\n\n## 5. Motion drag props\n\n```jsx\n\u003Cmotion.div\n  drag=\"y\"\n  dragConstraints={{ top: 0 }}\n  dragElastic={0.2}\n  onDragEnd={(e, info) => {\n    if (info.offset.y > distanceThreshold || info.velocity.y > velocityThreshold) dismiss();\n  }}\n\u002F>\n```\n\n`dragMomentum` defaults to on: right for a flung card, wrong for a simple reposition, where it goes `false` so the element stops where the finger stops. `dragConstraints` takes a ref or a bounds object. Spec: [Motion drag docs](https:\u002F\u002Fmotion.dev\u002Fdocs\u002Freact-drag).\n\n## 6. Direction, hold, and touch\n\n- **Spatial consistency.** An element dismisses in the direction it entered: a toast that slides up from the bottom dismisses with a swipe down. Entry and exit share one axis, so the gesture is felt rather than learned.\n- **Hold gestures are asymmetric.** The deliberate hold is slow and `linear` (it visualizes time passing); an early release is a fast `ease-out` cancel. Values in `reference\u002FANIMATIONS.md`.\n- **Touch.** `interface-polish` `reference\u002FMOBILE-WEB.md` owns `touch-action` per drag axis, hit areas, hover gating, and real-device testing. A gesture ships tested on a real phone by local IP.\n- **Reduced motion.** Tracking is direct manipulation, so it stays under `prefers-reduced-motion: reduce`. Momentum flings, bounce, and decorative motion around the gesture reduce; release settles with a short opacity or position change instead of a bouncy spring.\n\n## 7. Sheets\n\nFor a sheet or drawer curve, a small floating drawer, or one-entity timing, read [reference\u002FSHEETS.md](reference\u002FSHEETS.md).\n\n## When it still feels wrong\n\n| Symptom | Fix |\n| --- | --- |\n| Spring feels weird | Raise `damping` |\n| Gesture stutters | A performance problem: re-check the TRACK rules, then `reference\u002FPERFORMANCE.md` |\n| A feel you cannot name | Record the gesture and scrub it frame by frame; for the term, call the Skill tool with `\"animation-vocabulary\"` |\n\n## Done\n\nWhen building, done when every step above has been checked against every gesture you changed.\n","# Gesture-Driven UI\n\nA gesture is direct manipulation: while the finger is down the element _is_ the finger; the moment it lifts, physics takes over. Every rule below follows from that split. For React Native and Expo, call the Skill tool with `\"animate-expo\"` instead.\n\nCall the Skill tool with `\"interface-polish\"`. Its `reference\u002FANIMATIONS.md` section \"Gestures & Drag Interactions\" owns the shared formulas (grab-offset tracking, velocity handoff, `project()`, `rubberband()`, flick dismissal, hold-to-confirm timing); this skill points there instead of repeating them.\n\n## 1. Build or adopt\n\n| Interaction | Use |\n| --- | --- |\n| Bottom sheet, drawer, snap points | A drawer library: momentum, overlay sync, velocity-aware dismissal, focus trapping, and Escape-to-close are weeks of edge cases |\n| Swipe card or toast, drag-to-reorder, pull-to-refresh, hold-to-confirm, bespoke drag | Build it with this skill |\n\nCheck `package.json` first and reuse the drag library already installed (Motion, dnd-kit) rather than adding a second. A library covers the gesture itself; steps 2 to 6 still govern everything you wire around it.\n\n**Done when:** the interaction is mapped to a library or a build, with the existing dependency named.\n\n## 2. Split every gesture into track and release\n\n```\nIs the pointer currently down?\n├── Yes → TRACK:   position maps 1:1 to the pointer, driven by transform writes alone.\n└── No  → RELEASE: a spring seeded with the release velocity finishes the motion.\n```\n\n### Track\n\n- **1:1 means 1:1.** Drive position from a `useMotionValue` or direct `transform` writes. A spring or transition here makes the element trail the finger, like dragging through syrup.\n- **Write `transform` on the dragged element.** Per-move React state and parent CSS variables both cost frames; `interface-polish` `reference\u002FPERFORMANCE.md` has the details.\n- **Rubber-band at the edges.** Past a boundary the element moves a fraction of the distance (Motion: `dragElastic`, which defaults to a loose tug), because resistance says \"nothing further\" physically.\n\n### Release\n\n- **Spring seeded with the gesture's velocity.** The element leaves the finger at the speed it was moving; a fixed-duration ease makes every fling land identically, which reads as fake.\n- **Dismiss on distance OR velocity.** Crossing a distance threshold dismisses, and so does a fast flick over a short distance. Start near a quarter of the travel and tune by feel; the flick check is in `reference\u002FANIMATIONS.md`.\n- **Bounce only after a drag.** A drag applies force, so a slight bounce on release feels physical. The same element closed by a button gets zero bounce, because no force was applied. Smaller elements need slightly more bounce to read the same.\n- **Snap-back is fast.** A gesture that misses the threshold returns quickly; a slow snap-back reads as the UI disagreeing in slow motion.\n\n**Done when:** every gesture names its TRACK driver and its RELEASE spring with the velocity source, and the TRACK path is pointer-driven `transform` writes alone.\n\n## 3. Keep it interruptible\n\nThe user must be able to catch a sheet mid-close and drag it back. A spring retargeted mid-flight keeps its velocity, so the redirect is seamless. A CSS `@keyframes` animation restarts from zero and cannot be caught: a keyframe enter makes a toast jump when a second toast arrives.\n\n**Done when:** every element a gesture can touch animates by spring or CSS transition.\n\n## 4. Link dependent values to drag progress\n\nAn overlay fades and the page behind scales as the sheet moves. Derive them from one source so they never drift apart, including mid-gesture and on reversal:\n\n```jsx\nconst y = useMotionValue(0);\nconst overlayOpacity = useTransform(y, [0, drawerHeight], [1, 0]);\n```\n\n## 5. Motion drag props\n\n```jsx\n\u003Cmotion.div\n  drag=\"y\"\n  dragConstraints={{ top: 0 }}\n  dragElastic={0.2}\n  onDragEnd={(e, info) => {\n    if (info.offset.y > distanceThreshold || info.velocity.y > velocityThreshold) dismiss();\n  }}\n\u002F>\n```\n\n`dragMomentum` defaults to on: right for a flung card, wrong for a simple reposition, where it goes `false` so the element stops where the finger stops. `dragConstraints` takes a ref or a bounds object. Spec: [Motion drag docs](https:\u002F\u002Fmotion.dev\u002Fdocs\u002Freact-drag).\n\n## 6. Direction, hold, and touch\n\n- **Spatial consistency.** An element dismisses in the direction it entered: a toast that slides up from the bottom dismisses with a swipe down. Entry and exit share one axis, so the gesture is felt rather than learned.\n- **Hold gestures are asymmetric.** The deliberate hold is slow and `linear` (it visualizes time passing); an early release is a fast `ease-out` cancel. Values in `reference\u002FANIMATIONS.md`.\n- **Touch.** `interface-polish` `reference\u002FMOBILE-WEB.md` owns `touch-action` per drag axis, hit areas, hover gating, and real-device testing. A gesture ships tested on a real phone by local IP.\n- **Reduced motion.** Tracking is direct manipulation, so it stays under `prefers-reduced-motion: reduce`. Momentum flings, bounce, and decorative motion around the gesture reduce; release settles with a short opacity or position change instead of a bouncy spring.\n\n## 7. Sheets\n\nFor a sheet or drawer curve, a small floating drawer, or one-entity timing, read [reference\u002FSHEETS.md](reference\u002FSHEETS.md).\n\n## When it still feels wrong\n\n| Symptom | Fix |\n| --- | --- |\n| Spring feels weird | Raise `damping` |\n| Gesture stutters | A performance problem: re-check the TRACK rules, then `reference\u002FPERFORMANCE.md` |\n| A feel you cannot name | Record the gesture and scrub it frame by frame; for the term, call the Skill tool with `\"animation-vocabulary\"` |\n\n## Done\n\nWhen building, done when every step above has been checked against every gesture you changed.\n",{"name":5,"description":7},"main","43f20093cbb9c7c6c53205d079f1a6ed38e8f409","skills\u002Fdesign\u002Fgestures","https:\u002F\u002Fgithub.com\u002Fjoaodavidsilva\u002Fskills","https:\u002F\u002Fgithub.com\u002Fjoaodavidsilva","2026-11-13 00:08:54",{"source":8,"skillName":5,"commands":31,"prompt":41,"zipAvailable":42},[32,35,38],{"tool":33,"command":34},"npx","npx skills add joaodavidsilva\u002Fskills --skill gestures",{"tool":36,"command":37},"bunx","bunx skills add joaodavidsilva\u002Fskills --skill gestures",{"tool":39,"command":40},"pnpm","pnpm dlx skills add joaodavidsilva\u002Fskills --skill gestures","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjoaodavidsilva\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fdesign\u002Fgestures\u002FSKILL.md",true,[44,50],{"path":45,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":48,"sourceHtmlUrl":49},"agents\u002Fopenai.yaml","REFERENCE","参考文档",146,"https:\u002F\u002Fgithub.com\u002Fjoaodavidsilva\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fdesign\u002Fgestures\u002Fagents\u002Fopenai.yaml",{"path":51,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":52,"sourceHtmlUrl":53},"reference\u002FSHEETS.md",1245,"https:\u002F\u002Fgithub.com\u002Fjoaodavidsilva\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fdesign\u002Fgestures\u002Freference\u002FSHEETS.md",[55,62,69,76,83,90],{"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":61,"publishedAt":19},"01M7EBP8DHWNBT1JDGBE3F1C4E","wait-what","Stop. That last message did not land: re-pitch it.","https:\u002F\u002Fgithub.com\u002Fjoaodavidsilva\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fthinking\u002Fwait-what\u002FSKILL.md",[],[],{"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":68,"publishedAt":19},"01M7EBP6K4KE65Y6SHNXF6DZR9","to-questionnaire","Turn a decision you can't fully answer into a questionnaire for someone else to fill in.","https:\u002F\u002Fgithub.com\u002Fjoaodavidsilva\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fthinking\u002Fto-questionnaire\u002FSKILL.md",[],[],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M7EBP4SF3TXCPYD5VCFHFYB9","teach","Teach the user a new skill or concept, within this workspace.","https:\u002F\u002Fgithub.com\u002Fjoaodavidsilva\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fthinking\u002Fteach\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M7EBP2HG07RF956W8SEK006K","research","Investigate a question against high-trust primary sources and capture the findings as a Markdown file in the repo. Use when the user wants a topic researched, docs or API facts gathered, or reading legwork delegated to a background agent.","https:\u002F\u002Fgithub.com\u002Fjoaodavidsilva\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fthinking\u002Fresearch\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":19},"01M7EBNYSRH90G1HJDSJS5KD41","prototype","Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.","https:\u002F\u002Fgithub.com\u002Fjoaodavidsilva\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fthinking\u002Fprototype\u002FSKILL.md",[],[],{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":19},"01M7EBNWZY0J8K21XPS21RFGNF","grilling","Grill the user relentlessly about a plan, decision, or idea. Use when the user wants to stress-test their thinking, or uses any 'grill' trigger phrases.","https:\u002F\u002Fgithub.com\u002Fjoaodavidsilva\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fthinking\u002Fgrilling\u002FSKILL.md",[],[]]