Agent skill

Ask Sonner

by leepokai in leepokai/Codync

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…

MITAuto-check: warningsFrontend & Design

Install Ask Sonner

The automated check flagged lines worth reading first. See the safety section below.

skills CLI
$ npx skills add leepokai/Codync --skill ask-sonner -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install leepokai/Codync ask-sonner --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/leepokai/Codync.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/ask-sonner .claude/skills/ask-sonner && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
ask-sonner
GitHub stars
177
Used in
4 other repos
Token cost
~1.8k tokens
SKILL.md length
879 words
Files
2
Skills in repo
2
Repo updated
First seen
Licence
MIT

At a glance

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…

  • Works in 2 steps: One , mounted once, as close to the root… → toast() called from client code — event…
  • Working with Sonner
  • SKILL.md covers Initial Response, Setup, Picking the right call and Recipes, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Ask Sonner is an agent skill from leepokai/Codync. 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.

Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file (for example `API.md`).

It sits in Frontend & Design, covering Theming and dark mode and CSS and styling. It works with React, Tailwind CSS, Google Gemini and SwiftUI. The repository describes itself as: The open-source Grok Bot alternative: message Claude Code, Codex, Cursor, Gemini and 40+ AI agents as bots on your own computer, from iPhone, Mac, Windows, Linux or terminal… The licence is MIT.

When your agent uses it

  • Working with Sonner
  • Troubleshooting it — toasts that dont appear
  • Lose their styles
  • Ignore Tailwind classes

Example prompts

  • “/ask-sonner”

Workflow steps

2 steps, taken from the first numbered list in SKILL.md.

  1. One , mounted once, as close to the root as possible (in Next.js: layout.tsx` — it works inside server components). Never render it…
  2. toast() called from client code — event handlers, effects, callbacks. It's a plain function, no hook or provider needed, but it does…

What it can do on your machine

Read from SKILL.md and the folder at commit c7790a4. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are javascript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • sonner.emilkowal.ski

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Ask Sonner loads about 1.8k tokens when it runs. Until then it costs about 109 tokens; SKILL.md has 879 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~109
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: warnings

The automated check found patterns that need a careful read before installing.

  • WarningMentions a paste, webhook or tunnelling service often used to send data outSKILL.md:37
    g → success/error tied to a promise | `toast.promise(promise, { loading, success, error })` — success/error accept funct
  • WarningMentions a paste, webhook or tunnelling service often used to send data outSKILL.md:44
    loading → success flows work without `toast.promise`:
  • WarningMentions a paste, webhook or tunnelling service often used to send data outSKILL.md:84
    Infinity`, `dismissible: false`, or a `toast.promise` whose promise never settles — the loading toast waits forever. |
  • WarningMentions a paste, webhook or tunnelling service often used to send data outSKILL.md:85
    | `toast.promise` stuck on loading | It needs a promise (or a function returning one) as its first argument, and the pro

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from leepokai/Codync at commit c7790a4, republished under its MIT licence (© leepokai). 879 words, ~1,787 tokens.

Download SKILL.mdSave it as .claude/skills/ask-sonner/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
ask-sonner
description
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.

Working With Sonner

Initial Response

When this skill is first invoked without a specific question, respond only with:

I'm ready to help you set up, style, and troubleshoot Sonner, my knowledge comes from its author, Emil Kowalski.

Do not provide any other information until the user asks a question.

A guide skill for Sonner, 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; read it when you need an exact prop name, type, or default.

Setup

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.
jsx
import { Toaster } from 'sonner'; // once, in layout
import { toast } from 'sonner';   // anywhere client-side

Picking the right call

You wantCall
Plain messagetoast('Title') — add { description } for a second line
Success / error / info / warning icontoast.success('…'), toast.error('…'), etc.
Spinner while you manage state yourselftoast.loading('…'), then update it by id
Loading → success/error tied to a promisetoast.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 shelltoast(<jsx />)
Custom JSX, no styles at alltoast.custom((t) => <jsx />) — headless, t gives you the id to dismiss

Recipes

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:

jsx
const id = toast.loading('Uploading…');
toast.success('Uploaded', { id });

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>).

Multiple toasters — give each an id and target with toast('…', { toasterId: 'canvas' }). Without toasterId, every toaster renders the toast.

Close callbacks — onDismiss fires on close button or swipe; onAutoClose fires on timeout. They are separate; there is no single "closed" callback.

Styling — the escalation ladder

Climb 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.

  1. Defaults — plus richColors on the Toaster for colorful success/error, invert to flip against the theme.
  2. Inline tweaks — toastOptions={{ style: {…} }} on the Toaster for all toasts, or style per toast() call.
  3. 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.
  4. 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.)

Icons — swap defaults per-type with the Toaster's icons prop, per-toast with icon, remove with null.

Theme — theme defaults to 'light' and does not track the OS. Pass theme="system", or wire your theme provider: <Toaster theme={resolvedTheme} /> from next-themes.

Show full SKILL.md (314 more words)Show less

Troubleshooting

SymptomCause → fix
Toast never appearsNo <Toaster /> 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.
Same toast appears twiceTwo 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.
Tailwind/CSS classes have no effectDefault styles override them. Mark them !important, or use unstyled / headless (see the ladder above).
Toasts render completely unstyled (common in Astro, view transitions)Sonner's injected stylesheet was lost — import it explicitly in a layout: import 'sonner/dist/styles.css'.
Unstyled inside Shadow DOMStyles land in document.head, not the shadow root. Copy the style tag whose text includes [data-sonner-toaster] into the shadow root.
Toast behind a modal/overlay, or clippedAn ancestor creates a stacking context (transform, filter, overflow) or the overlay out-z-indexes the toaster. Move <Toaster /> to the document root, outside any dialog/portal container.
Dark mode ignoredtheme defaults to 'light' — set theme="system" or pass the resolved theme (see Theme above).
Success/error look gray, not green/redThat's the default. Add richColors to the Toaster.
Toast never closesduration: Infinity, dismissible: false, or a toast.promise whose promise never settles — the loading toast waits forever.
toast.promise stuck on loadingIt needs a promise (or a function returning one) as its first argument, and the promise must actually resolve/reject.
Swipe-to-dismiss goes the wrong way / doesn't workDirections derive from position. Override with swipeDirections on the Toaster.
Toast shows up in every toasterMultiple toasters need targeting: give each Toaster an id and pass toasterId in the toast() call.
Toasts too close to the screen edge on mobileoffset (desktop, default 32px) and mobileOffset (<600px, default 16px) — numbers, CSS strings, or per-side objects.

© leepokai, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in .claude/skills/ask-sonner of leepokai/Codync.

  • SKILL.md
  • API.md

Open the folder on GitHubat commit c7790a4

Used in 4 other repositories

We found 7 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 4 other GitHub owners. This page covers the copy in leepokai/Codync, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Ask Sonner next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Ask Sonner compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Ask Sonner this skillleepokai/Codync1774 repos~1.8kAutomated safety check: WarnMIT
Frontend DesignAnastasiyaW/codex-claude-code-config154—~1.1kAutomated safety check: PassMIT
Tailwind CSS Patternsever-works/ever-works1583 repos~1.6kAutomated safety check: NotesAGPL-3.0
Tailwind V4 Shadcnever-works/ever-works1582 repos~3.8kAutomated safety check: PassMIT
Bryl Minimal Designbryllim/bryl-minimal-design114—~2.9kAutomated safety check: PassMIT
UI UX Pro Maxshobcoder/shob577—~3.7kAutomated safety check: PassMIT

Similar skills

  • Frontend Design

    AnastasiyaW/codex-claude-code-config

    Создание высококачественных, визуально выдающихся фронтенд-интерфейсов.

    154 GitHub stars~1.1k tokensUpdated yesterday
    Frontend & DesignAuto-check passed
  • Tailwind CSS Patterns

    ever-works/ever-works

    Provides comprehensive Tailwind CSS utility-first styling patterns including responsive design, layout utilities, flexbox, grid, spacing, typography, colors, and modern CSS best practices.

    158 GitHub starsUsed in 3 repos~1.6k tokens
    Frontend & DesignAuto-check: notes
  • Tailwind V4 Shadcn

    ever-works/ever-works

    Production-tested setup for Tailwind CSS v4 with shadcn/ui, Vite, and React.

    158 GitHub starsUsed in 2 repos~3.8k tokens
    Frontend & DesignAuto-check passed
  • Bryl Minimal Design

    bryllim/bryl-minimal-design

    Apply the bryl-minimal design language — a monochrome, typography-driven minimal aesthetic with halftone dot textures, pixel-font display headings, tiny uppercase monospace labels, soft large-radius…

    114 GitHub stars~2.9k tokensUpdated 2 mo ago
    Frontend & DesignAuto-check passed
  • UI UX Pro Max

    shobcoder/shob

    UI/UX design intelligence expert for web and mobile applications.

    577 GitHub stars~3.7k tokensUpdated 20 days ago
    Frontend & DesignAuto-check passed
  • Frontend UI Foundry

    jiushiwon/wg-skills

    A skill your agent uses when generating UI for a specific scenario (mobile/PC/官网/管理端/营销页/文档/金融/原生/3D), when refactoring an existing HTML/Vue/React project to a unified design system, when extracting…

    112 GitHub stars~1.4k tokensUpdated yesterday
    Frontend & DesignAuto-check passed

More from leepokai/Codync

  • Mobile Native

    leepokai/Codync

    Make a web app feel native on a phone — the small CSS and meta-tag fixes that separate "a website in a browser" from something that feels installed.

    177 GitHub starsUsed in 1 repo~4.2k tokens
    Auto-check passed

Questions about Ask Sonner

What does Ask Sonner do?

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…. Ask Sonner is an agent skill from leepokai/Codync. 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.

When should I use Ask Sonner?

Ask Sonner fits situations like: working with Sonner; troubleshooting it — toasts that dont appear; lose their styles; ignore Tailwind classes.

How do I install Ask Sonner in Claude Code?

Run `npx skills add leepokai/Codync --skill ask-sonner -a claude-code`. Or copy the skill folder (.claude/skills/ask-sonner in leepokai/Codync) into .claude/skills/ask-sonner in your project. Claude Code loads it when a task matches its description.

How do I install Ask Sonner in Codex?

Run `npx skills add leepokai/Codync --skill ask-sonner -a codex`. Or copy the skill folder (.claude/skills/ask-sonner in leepokai/Codync) into .agents/skills/ask-sonner in your project. Codex loads it when a task matches its description.

Can I use Ask Sonner in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add leepokai/Codync --skill ask-sonner -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/ask-sonner, .gemini/skills/ask-sonner, .github/skills/ask-sonner and .opencode/skills/ask-sonner in your project.

What does Ask Sonner need to run?

SKILL.md names no scripts, command-line tools or credentials: Ask Sonner is instructions for the agent only.

Does Ask Sonner access the network?

SKILL.md names 1 domain. As links in the text: sonner.emilkowal.ski. This is read from the text; nothing was executed.

Is Ask Sonner safe to install?

Our automated static check of SKILL.md flagged 4 warning(s): mentions a paste, webhook or tunnelling service often used to send data out. Read the flagged lines before installing; the check is not a guarantee either way.

What licence does Ask Sonner use?

Ask Sonner is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Ask Sonner use?

About 1.8k tokens (SKILL.md is roughly 7.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Ask Sonner?

Skills that share tags, products or a category with Ask Sonner: Frontend Design (AnastasiyaW/codex-claude-code-config, 154 stars), Tailwind CSS Patterns (ever-works/ever-works, 158 stars), Tailwind V4 Shadcn (ever-works/ever-works, 158 stars) and Bryl Minimal Design (bryllim/bryl-minimal-design, 114 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Ask Sonner?

leepokai (a GitHub user) maintains it in leepokai/Codync, which has 177 GitHub stars. The repository holds 2 skills in this directory. The repository was last updated on October 7, 2026.

Source: leepokai/Codync on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.