[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7E8Z627GW7JSASA815BHXBG":3,"skill-same:01M7E8Z627GW7JSASA815BHXBG":53},{"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":29,"ownerHtmlUrl":30,"ownerBlogUrl":29,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M7E8Z627GW7JSASA815BHXBG","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.","caudra\u002Fcaudra","caudra","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F323451438?v=4","01M7E8TXZKWCW4S2EPW520718N","Caudra","01M7E8TY09J7AVFRE6S2179890",11,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fcaudra\u002Fcaudra\u002Fblob\u002Fmain\u002Fcaudra-emil\u002Fupstream\u002Fskills\u002Fask-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","0f03370f86af943c19c2069f7e1d5d43e73ffbd2","caudra-emil\u002Fupstream\u002Fskills\u002Fask-sonner",1,"https:\u002F\u002Fgithub.com\u002Fcaudra\u002Fcaudra","https:\u002F\u002Fcaudra.ai","https:\u002F\u002Fgithub.com\u002Fcaudra","The complete coding agent for your terminal.","2026-11-04 22:18:53",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add caudra\u002Fcaudra --skill ask-sonner",{"tool":39,"command":40},"bunx","bunx skills add caudra\u002Fcaudra --skill ask-sonner",{"tool":42,"command":43},"pnpm","pnpm dlx skills add caudra\u002Fcaudra --skill ask-sonner","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fcaudra\u002Fcaudra\u002Fblob\u002Fmain\u002Fcaudra-emil\u002Fupstream\u002Fskills\u002Fask-sonner\u002FSKILL.md",true,[47],{"path":48,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":51,"sourceHtmlUrl":52},"API.md","REFERENCE","参考文档",4545,"https:\u002F\u002Fgithub.com\u002Fcaudra\u002Fcaudra\u002Fblob\u002Fmain\u002Fcaudra-emil\u002Fupstream\u002Fskills\u002Fask-sonner\u002FAPI.md",[54,61,68,75,82,89],{"skillNo":55,"name":56,"nameZh":6,"description":57,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":19},"01M7E9CBRVDFYTA5GBY8F1XQQE","caudra-workflow-dev","Write, validate, run, and debug Caudra workflows. A workflow is a durable Rhai script that fans work out to subagents in phases, checks what comes back, and keeps a journal so it can resume. Load this before writing a workflow file, before calling the workflow tool, or when a repeatable multi-agent plan would serve the user better than doing the steps by hand.","https:\u002F\u002Fgithub.com\u002Fcaudra\u002Fcaudra\u002Fblob\u002Fmain\u002Fcaudra-workflow\u002Fskill\u002FSKILL.md",[],[],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":19},"01M7E9C6YC8R09DS8DP8XZ23YN","why","Use for 'why does X work this way', 'why we picked Y', design rationale, regressions, postmortems, or data-backed thresholds. Discovers available MCPs and queries each evidence category (source control, issue tracker, long-form docs, real-time chat, infrastructure observability, error tracking, product analytics warehouse) in parallel, then returns a cited read on decisions and tradeoffs. Use how for runtime behavior.","https:\u002F\u002Fgithub.com\u002Fcaudra\u002Fcaudra\u002Fblob\u002Fmain\u002Fcaudra-pstack\u002Fupstream\u002Fpstack\u002Fskills\u002Fwhy\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},"01M7E9C5KHAJY5TY81E04XMJBN","unslop","Cut AI tells from any writing.","https:\u002F\u002Fgithub.com\u002Fcaudra\u002Fcaudra\u002Fblob\u002Fmain\u002Fcaudra-pstack\u002Fupstream\u002Fpstack\u002Fskills\u002Funslop\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},"01M7E9C3TZ3KJS5HE7PQPQ70DF","typescript-best-practices","TypeScript best practices. Use when reading or editing any .ts or .tsx file.","https:\u002F\u002Fgithub.com\u002Fcaudra\u002Fcaudra\u002Fblob\u002Fmain\u002Fcaudra-pstack\u002Fupstream\u002Fpstack\u002Fskills\u002Ftypescript-best-practices\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},"01M7E9C0FK9PPRYWRM7451053P","technical-writing","Layered technical-writing standard: Diátaxis structure, Google developer style sentences, STE instruction rules, Global English syntax. Use for \u002Ftechnical-writing or when writing or reviewing docs, RFCs, readmes, PR descriptions, or commit messages.","https:\u002F\u002Fgithub.com\u002Fcaudra\u002Fcaudra\u002Fblob\u002Fmain\u002Fcaudra-pstack\u002Fupstream\u002Fpstack\u002Fskills\u002Ftechnical-writing\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},"01M7E9BWAVMA3BD4B63QV635RQ","teach","Explain a body of work plainly so a person actually understands it. Runs the `how` and `why` skills and weaves what they find into one clear explanation. Use for 'teach me this', 'help me really understand X', 'explain this change or subsystem to me'.","https:\u002F\u002Fgithub.com\u002Fcaudra\u002Fcaudra\u002Fblob\u002Fmain\u002Fcaudra-pstack\u002Fupstream\u002Fpstack\u002Fskills\u002Fteach\u002FSKILL.md",[],[]]