Ask Sonner Skill Security Audit
What the author says it does (original text)
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
No obvious risks found in this check
- Files checked
- 2
- Risks found
- 0
Inside this skill
This Skill is a usage guide for the Sonner React notification library. It directs users to mount one Toaster near the application root and call toast only from client code; the supplied source contains no installation script, command execution, or credential-handling steps.
View source
Two pieces, and only two:1. **One `<Toaster />`, 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.2. **`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.The guide documents in-app UI behavior such as button callbacks, custom JSX, persistent notifications, and dismissal. Application code using the guide can define these behaviors, but the text does not direct data to an external service or perform unauthorized account actions.
View source
| Success / error / info / warning icon | `toast.success('…')`, `toast.error('…')`, etc. || Spinner while you manage state yourself | `toast.loading('…')`, then update it by id || Loading → success/error tied to a promise | `toast.promise(promise, { loading, success, error })` — success/error accept functions receiving the resolved value/error || Button that does something | `{ action: { label, onClick } }` — closes the toast unless `onClick` calls `event.preventDefault()`; `cancel` is the secondary variant || Custom JSX, default toast shell | `toast(<jsx />)` || Custom JSX, no styles at all | `toast.custom((t) => <jsx />)` — headless, `t` gives you the id to dismiss |**Persist** — `{ duration: Infinity }`. **Dismiss** — `toast.dismiss(id)`, or `toast.dismiss()` for all. **Read active toasts** — `useSonner()` in React, `toast.getActiveToasts()` outside it.**Links or components in the text** — pass a function for the title or description: `toast(() => <a href="…">View</a>)`.SKILL.md refers to the bundled API.md for exact properties. The referenced file is present and contains parameter and function documentation for Toaster and toast.
View source
A guide skill for [Sonner](https://sonner.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 `<Toaster />` and `toast()` live in [API.md](API.md); read it when you need an exact prop name, type, or default.## `toast()` options`toast(message, options)` — message is a string, JSX, or a function returning JSX. Returns the toast's id.File reference map
References: 1Files and check records2 files
Coverage and gaps
Content covered in each file
These are the source ranges included in this check, not a guarantee that every issue has been resolved.
SKILL.mdFull text includedAPI.mdFull text included
This report is for the version above. We read the available code and instructions without running the skill or checking extra packages it installs. This is not a promise of safety: a different version or setup may behave differently.
API.mdSupporting fileSKILL.mdInstructions
Operations mentioned in code and instructions
Connect to websites
A guide skill for [Sonner](https://sonner.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 `<Toaster />` and `toast()` live in [API.md](API.md); read it when you need an exact prop name, type, or default.- Lines read
- 146
- File checksum (to compare versions)
- 159762a73cf36e1f5745db57b7d8495bac20adc0d0a344b4419b855f96159999