[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7ENDEFDVRX7Q4JS30S06JFW":3,"skill-same:01M7ENDEFDVRX7Q4JS30S06JFW":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":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":30,"ownerDescription":6,"updatedAt":31,"install":32,"resources":45},"01M7ENDEFDVRX7Q4JS30S06JFW","ask-sonner",null,"Guide to Sonner, the React toast library — install and wire up the Toaster, pick the right toast() call, promise and loading toasts, updating, dismissing and persisting toasts, styling, theming and icons, positioning and multiple toasters. Use when working with Sonner or troubleshooting it — toasts that don't appear, appear twice, lose their styles, ignore Tailwind classes, sit behind a modal, or don't follow dark mode.","TanNhatCMS\u002Fjarvis","TanNhatCMS","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F113796420?v=4","01M753MV17KG5CD3152G3WQEQY","KietNT","01M7EKEDYVYQ6PWVJJMZ911VMX",0,"MIT","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fams-imp-ask-sonner\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: ask-sonner\ndescription: Guide to Sonner, the React toast library — install and wire up the Toaster, pick the right toast() call, promise and loading toasts, updating, dismissing and persisting toasts, styling, theming and icons, positioning and multiple toasters. Use when working with Sonner or troubleshooting it — toasts that don't appear, appear twice, lose their styles, ignore Tailwind classes, sit behind a modal, or don't follow dark mode.\n---\n\n# Working With Sonner\n\n## Initial Response\n\nWhen this skill is first invoked without a specific question, respond only with:\n\n> I'm ready to help you set up, style, and troubleshoot Sonner, my knowledge comes from its author, Emil Kowalski.\n\nDo not provide any other information until the user asks a question.\n\nA guide skill for [Sonner](https:\u002F\u002Fsonner.emilkowal.ski), the toast library. When a task involves Sonner — wiring it up, rendering toasts, styling them, or fixing them — answer from this file first. Full prop tables for `\u003CToaster \u002F>` and `toast()` live in [API.md](API.md); read it when you need an exact prop name, type, or default.\n\n## Setup\n\nTwo pieces, and only two:\n\n1. **One `\u003CToaster \u002F>`, mounted once**, as close to the root as possible (in Next.js: `layout.tsx` — it works inside server components). Never render it per-page or conditionally; a second mounted Toaster duplicates every toast.\n2. **`toast()` called from client code** — event handlers, effects, callbacks. It's a plain function, no hook or provider needed, but it does nothing on the server: in a server action, return the result and call `toast()` in the client code that receives it.\n\n```jsx\nimport { Toaster } from 'sonner'; \u002F\u002F once, in layout\nimport { toast } from 'sonner';   \u002F\u002F anywhere client-side\n```\n\n## Picking the right call\n\n| You want | Call |\n| --- | --- |\n| Plain message | `toast('Title')` — add `{ description }` for a second line |\n| Success \u002F error \u002F info \u002F warning icon | `toast.success('…')`, `toast.error('…')`, etc. |\n| Spinner while you manage state yourself | `toast.loading('…')`, then update it by id |\n| Loading → success\u002Ferror tied to a promise | `toast.promise(promise, { loading, success, error })` — success\u002Ferror accept functions receiving the resolved value\u002Ferror |\n| Button that does something | `{ action: { label, onClick } }` — closes the toast unless `onClick` calls `event.preventDefault()`; `cancel` is the secondary variant |\n| Custom JSX, default toast shell | `toast(\u003Cjsx \u002F>)` |\n| Custom JSX, no styles at all | `toast.custom((t) => \u003Cjsx \u002F>)` — headless, `t` gives you the id to dismiss |\n\n## Recipes\n\n**Update a toast** — call `toast()` again with the same `id`; only the props you pass change. Switching to `toast.success(…, { id })` changes the type. This is how loading → success flows work without `toast.promise`:\n\n```jsx\nconst id = toast.loading('Uploading…');\ntoast.success('Uploaded', { id });\n```\n\n**Persist** — `{ duration: Infinity }`. **Dismiss** — `toast.dismiss(id)`, or `toast.dismiss()` for all. **Read active toasts** — `useSonner()` in React, `toast.getActiveToasts()` outside it.\n\n**Links or components in the text** — pass a function for the title or description: `toast(() => \u003Ca href=\"…\">View\u003C\u002Fa>)`.\n\n**Multiple toasters** — give each an `id` and target with `toast('…', { toasterId: 'canvas' })`. Without `toasterId`, every toaster renders the toast.\n\n**Close callbacks** — `onDismiss` fires on close button or swipe; `onAutoClose` fires on timeout. They are separate; there is no single \"closed\" callback.\n\n## Styling — the escalation ladder\n\nClimb only as far as the change requires; jumping to the top rung too early is fine (it's the recommended end state), lingering in the middle is not.\n\n1. **Defaults** — plus `richColors` on the Toaster for colorful success\u002Ferror, `invert` to flip against the theme.\n2. **Inline tweaks** — `toastOptions={{ style: {…} }}` on the Toaster for all toasts, or `style` per `toast()` call.\n3. **Classes on parts** — `toastOptions={{ classNames: { toast, title, description, actionButton, cancelButton, closeButton } }}`. Sonner's injected styles win the cascade, so every class needs `!important` (Tailwind: `!text-red-900`). If you're marking more than a few things important, stop — go headless.\n4. **Headless** — `toast.custom()` with your own JSX, keeping Sonner's positioning, stacking, and swipe. The recommended approach for a design-system toast: wrap it in your own `toast()` abstraction. (`unstyled: true` exists as a halfway house, but headless gives more control for the same effort.)\n\n**Icons** — swap defaults per-type with the Toaster's `icons` prop, per-toast with `icon`, remove with `null`.\n\n**Theme** — `theme` defaults to `'light'` and does not track the OS. Pass `theme=\"system\"`, or wire your theme provider: `\u003CToaster theme={resolvedTheme} \u002F>` from `next-themes`.\n\n## Troubleshooting\n\n| Symptom | Cause → fix |\n| --- | --- |\n| Toast never appears | No `\u003CToaster \u002F>` mounted, or it unmounted (conditional render, per-page placement). Mount one at the root. If calling from a server action: `toast()` is client-only — call it with the action's result on the client. |\n| Same toast appears twice | Two Toasters mounted (layout **and** page) — keep one. Or `toast()` fired in an effect under React StrictMode's dev double-invoke — fire from the event handler instead, or pass a stable `id` so the second call updates rather than duplicates. |\n| Tailwind\u002FCSS classes have no effect | Default styles override them. Mark them `!important`, or use `unstyled` \u002F headless (see the ladder above). |\n| Toasts render completely unstyled (common in Astro, view transitions) | Sonner's injected stylesheet was lost — import it explicitly in a layout: `import 'sonner\u002Fdist\u002Fstyles.css'`. |\n| Unstyled inside Shadow DOM | Styles land in `document.head`, not the shadow root. Copy the style tag whose text includes `[data-sonner-toaster]` into the shadow root. |\n| Toast behind a modal\u002Foverlay, or clipped | An ancestor creates a stacking context (`transform`, `filter`, `overflow`) or the overlay out-z-indexes the toaster. Move `\u003CToaster \u002F>` to the document root, outside any dialog\u002Fportal container. |\n| Dark mode ignored | `theme` defaults to `'light'` — set `theme=\"system\"` or pass the resolved theme (see Theme above). |\n| Success\u002Ferror look gray, not green\u002Fred | That's the default. Add `richColors` to the Toaster. |\n| Toast never closes | `duration: Infinity`, `dismissible: false`, or a `toast.promise` whose promise never settles — the loading toast waits forever. |\n| `toast.promise` stuck on loading | It needs a promise (or a function returning one) as its first argument, and the promise must actually resolve\u002Freject. |\n| Swipe-to-dismiss goes the wrong way \u002F doesn't work | Directions derive from `position`. Override with `swipeDirections` on the Toaster. |\n| Toast shows up in every toaster | Multiple toasters need targeting: give each Toaster an `id` and pass `toasterId` in the `toast()` call. |\n| Toasts too close to the screen edge on mobile | `offset` (desktop, default 32px) and `mobileOffset` (\u003C600px, default 16px) — numbers, CSS strings, or per-side objects. |\n","# Working With Sonner\n\n## Initial Response\n\nWhen this skill is first invoked without a specific question, respond only with:\n\n> I'm ready to help you set up, style, and troubleshoot Sonner, my knowledge comes from its author, Emil Kowalski.\n\nDo not provide any other information until the user asks a question.\n\nA guide skill for [Sonner](https:\u002F\u002Fsonner.emilkowal.ski), the toast library. When a task involves Sonner — wiring it up, rendering toasts, styling them, or fixing them — answer from this file first. Full prop tables for `\u003CToaster \u002F>` and `toast()` live in [API.md](API.md); read it when you need an exact prop name, type, or default.\n\n## Setup\n\nTwo pieces, and only two:\n\n1. **One `\u003CToaster \u002F>`, mounted once**, as close to the root as possible (in Next.js: `layout.tsx` — it works inside server components). Never render it per-page or conditionally; a second mounted Toaster duplicates every toast.\n2. **`toast()` called from client code** — event handlers, effects, callbacks. It's a plain function, no hook or provider needed, but it does nothing on the server: in a server action, return the result and call `toast()` in the client code that receives it.\n\n```jsx\nimport { Toaster } from 'sonner'; \u002F\u002F once, in layout\nimport { toast } from 'sonner';   \u002F\u002F anywhere client-side\n```\n\n## Picking the right call\n\n| You want | Call |\n| --- | --- |\n| Plain message | `toast('Title')` — add `{ description }` for a second line |\n| Success \u002F error \u002F info \u002F warning icon | `toast.success('…')`, `toast.error('…')`, etc. |\n| Spinner while you manage state yourself | `toast.loading('…')`, then update it by id |\n| Loading → success\u002Ferror tied to a promise | `toast.promise(promise, { loading, success, error })` — success\u002Ferror accept functions receiving the resolved value\u002Ferror |\n| Button that does something | `{ action: { label, onClick } }` — closes the toast unless `onClick` calls `event.preventDefault()`; `cancel` is the secondary variant |\n| Custom JSX, default toast shell | `toast(\u003Cjsx \u002F>)` |\n| Custom JSX, no styles at all | `toast.custom((t) => \u003Cjsx \u002F>)` — headless, `t` gives you the id to dismiss |\n\n## Recipes\n\n**Update a toast** — call `toast()` again with the same `id`; only the props you pass change. Switching to `toast.success(…, { id })` changes the type. This is how loading → success flows work without `toast.promise`:\n\n```jsx\nconst id = toast.loading('Uploading…');\ntoast.success('Uploaded', { id });\n```\n\n**Persist** — `{ duration: Infinity }`. **Dismiss** — `toast.dismiss(id)`, or `toast.dismiss()` for all. **Read active toasts** — `useSonner()` in React, `toast.getActiveToasts()` outside it.\n\n**Links or components in the text** — pass a function for the title or description: `toast(() => \u003Ca href=\"…\">View\u003C\u002Fa>)`.\n\n**Multiple toasters** — give each an `id` and target with `toast('…', { toasterId: 'canvas' })`. Without `toasterId`, every toaster renders the toast.\n\n**Close callbacks** — `onDismiss` fires on close button or swipe; `onAutoClose` fires on timeout. They are separate; there is no single \"closed\" callback.\n\n## Styling — the escalation ladder\n\nClimb only as far as the change requires; jumping to the top rung too early is fine (it's the recommended end state), lingering in the middle is not.\n\n1. **Defaults** — plus `richColors` on the Toaster for colorful success\u002Ferror, `invert` to flip against the theme.\n2. **Inline tweaks** — `toastOptions={{ style: {…} }}` on the Toaster for all toasts, or `style` per `toast()` call.\n3. **Classes on parts** — `toastOptions={{ classNames: { toast, title, description, actionButton, cancelButton, closeButton } }}`. Sonner's injected styles win the cascade, so every class needs `!important` (Tailwind: `!text-red-900`). If you're marking more than a few things important, stop — go headless.\n4. **Headless** — `toast.custom()` with your own JSX, keeping Sonner's positioning, stacking, and swipe. The recommended approach for a design-system toast: wrap it in your own `toast()` abstraction. (`unstyled: true` exists as a halfway house, but headless gives more control for the same effort.)\n\n**Icons** — swap defaults per-type with the Toaster's `icons` prop, per-toast with `icon`, remove with `null`.\n\n**Theme** — `theme` defaults to `'light'` and does not track the OS. Pass `theme=\"system\"`, or wire your theme provider: `\u003CToaster theme={resolvedTheme} \u002F>` from `next-themes`.\n\n## Troubleshooting\n\n| Symptom | Cause → fix |\n| --- | --- |\n| Toast never appears | No `\u003CToaster \u002F>` mounted, or it unmounted (conditional render, per-page placement). Mount one at the root. If calling from a server action: `toast()` is client-only — call it with the action's result on the client. |\n| Same toast appears twice | Two Toasters mounted (layout **and** page) — keep one. Or `toast()` fired in an effect under React StrictMode's dev double-invoke — fire from the event handler instead, or pass a stable `id` so the second call updates rather than duplicates. |\n| Tailwind\u002FCSS classes have no effect | Default styles override them. Mark them `!important`, or use `unstyled` \u002F headless (see the ladder above). |\n| Toasts render completely unstyled (common in Astro, view transitions) | Sonner's injected stylesheet was lost — import it explicitly in a layout: `import 'sonner\u002Fdist\u002Fstyles.css'`. |\n| Unstyled inside Shadow DOM | Styles land in `document.head`, not the shadow root. Copy the style tag whose text includes `[data-sonner-toaster]` into the shadow root. |\n| Toast behind a modal\u002Foverlay, or clipped | An ancestor creates a stacking context (`transform`, `filter`, `overflow`) or the overlay out-z-indexes the toaster. Move `\u003CToaster \u002F>` to the document root, outside any dialog\u002Fportal container. |\n| Dark mode ignored | `theme` defaults to `'light'` — set `theme=\"system\"` or pass the resolved theme (see Theme above). |\n| Success\u002Ferror look gray, not green\u002Fred | That's the default. Add `richColors` to the Toaster. |\n| Toast never closes | `duration: Infinity`, `dismissible: false`, or a `toast.promise` whose promise never settles — the loading toast waits forever. |\n| `toast.promise` stuck on loading | It needs a promise (or a function returning one) as its first argument, and the promise must actually resolve\u002Freject. |\n| Swipe-to-dismiss goes the wrong way \u002F doesn't work | Directions derive from `position`. Override with `swipeDirections` on the Toaster. |\n| Toast shows up in every toaster | Multiple toasters need targeting: give each Toaster an `id` and pass `toasterId` in the `toast()` call. |\n| Toasts too close to the screen edge on mobile | `offset` (desktop, default 32px) and `mobileOffset` (\u003C600px, default 16px) — numbers, CSS strings, or per-side objects. |\n",{"name":5,"description":7},"main","af388a77c2fe5e0b4fd879cca4300a0ffa9a6579","skills\u002Fams-imp-ask-sonner",1,"https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis","https:\u002F\u002Fgithub.com\u002FTanNhatCMS","https:\u002F\u002Fmrkiet.name.vn","2026-11-07 14:23:08",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add TanNhatCMS\u002Fjarvis --skill ask-sonner",{"tool":38,"command":39},"bunx","bunx skills add TanNhatCMS\u002Fjarvis --skill ask-sonner",{"tool":41,"command":42},"pnpm","pnpm dlx skills add TanNhatCMS\u002Fjarvis --skill ask-sonner","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fams-imp-ask-sonner\u002FSKILL.md",true,[46],{"path":47,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":50,"sourceHtmlUrl":51},"API.md","REFERENCE","参考文档",4545,"https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fams-imp-ask-sonner\u002FAPI.md",[53,60,68,75,82,89],{"skillNo":54,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":57,"categories":58,"keywords":59,"publishedAt":19},"01M7EWYJR0J8DARY7E59Z6Y9MV","web-scrape","Turn web pages into LLM-ready markdown via the Firecrawl API (renders JS, anti-bot handling). Use when browser_open\u002Ffetch fails on JS-heavy pages, or when you need clean markdown\u002Fstructured extraction from a site. Requires FIRECRAWL_API_KEY.","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fweb-scrape\u002FSKILL.md",[],[],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":64,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":19},"01M7EWYBN5P6F2AJG3FR24T9BP","design-taste-frontend","tasteskill v2, the anti-slop frontend skill. Art direction for websites, distilled from a study of 247 curated gallery sites (One Page Love, Awwwards Sites of the Day). Deals researched directions (idea, composition, type, palette, photographs, section blueprints) from a library, enforces a strict no-slop house style with a real-browser inspector, and runs a look-and-fix loop on screenshots. Use this whenever you build, design, redesign, restyle, polish or review a landing page, marketing site, portfolio, product page, one-pager, hero or any public-facing web page, in any stack (HTML\u002FCSS, React, Next.js, Vue, Svelte, Astro, Tailwind) — also when the user says a page looks generic, templated, \"AI-made\", sloppy, or asks to make it look designed, premium, award-level or less like every other site. Not for dashboards or app screens.","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Ftaste-design\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Ftaste-design\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M7EWY8FQFNQ2GB7NZZWGSSDX","test-driven-development","Use when implementing any feature or bugfix, before writing implementation code","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-tdd\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M7EWY5SHBFRH1HDHVWM9K7TV","systematic-debugging","Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-debugging\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M7EWY3NM0Z0JAKS7HDZ24K66","requesting-code-review","Use when completing tasks, implementing major features, or before merging to verify work meets requirements","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-code-review\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":19},"01M7EWY0WRMWX4M9ZFY0WKC593","brainstorming","You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-brainstorming\u002FSKILL.md",[],[]]