ask-sonner

ask-sonner is a skill for Claude Code, Codex from ericrisco/rsc-harness. It costs 71 tokens per session (2,059 once invoked), scanned A, original, MIT.

A guide to Sonner, a React library for temporary on-screen messages called toast notifications. It covers the notification container and the code that displays, updates, styles, and dismisses messages.

In plain words
What is it for?
Use it to add success, error, loading, promise-based, and themed toast notifications to a React or Next.js application.
Why use it?
It helps when notifications do not appear, appear twice, are hidden behind dialogs, ignore styling, or fail when triggered by server actions.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is **no approved spec + plan** under `02-DOCS/wiki/sdd/`, hand off to `../specify/SKILL.md` first —.

Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/ericrisco/rsc-harness
agentmods
npx agentmods add skills/ericrisco/rsc-harness/ask-sonner

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ask-sonner

README.md
[![agentmods](https://agentmods.dev/badge/skills/ericrisco/rsc-harness/ask-sonner.svg)](https://agentmods.dev/skills/ericrisco/rsc-harness/ask-sonner)
Your own site
<a href="https://agentmods.dev/skills/ericrisco/rsc-harness/ask-sonner"><img src="https://agentmods.dev/badge/skills/ericrisco/rsc-harness/ask-sonner.svg" alt="Measured on agentmods" height="20"></a>
Per session 71 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,059 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00071 $0.02059
Opus 5 $0.00036 $0.01030
Sonnet 5 $0.00014 $0.00412
Haiku 4.5 $0.00007 $0.00206

Measured 6d ago against content hash a4751de49b08, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

ask-sonner scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/ask-sonner/SKILL.md · 105 lines

How it starts

The opening of the file, as written. The whole thing — 105 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Working With Sonner

SDD gate. If this fired on a new, non-trivial feature or behaviour change and there is no approved spec + plan under 02-DOCS/wiki/sdd/, hand off to ../specify/SKILL.md first — it runs brainstorm → spec → plan → tasks before any code, then routes back here once the plan is approved. Build straight from here only for a genuinely one-line / low-risk change, or a bug fix restoring intended behaviour. Method: ../sdd/SKILL.md.

Hand-offs. Choosing between libraries at all is ../pick-ui-library/SKILL.md's (its answer for toasts is this one). Customising the toast's motion beyond the props here is ../animate/SKILL.md's. App wiring is ../react/SKILL.md's and ../nextjs/SKILL.md's.

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

Picking the right call

You want Call
Plain message toast('Title') — add { description } for a second line
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

Read the full file on GitHub · 105 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 105 lines · 71 tokens per session scan A a4751de49b08

Subscribe to this mod's changes

ask-sonner is a skill published in the GitHub repository ericrisco/rsc-harness (65 stars, last pushed yesterday), licensed MIT. It adds 71 tokens to every session and 2,059 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

moai-design-tools

Design tool integration specialist covering Figma MCP, Pencil renderer, and Pencil-to-code export. Use when fetching design context from Figma, rendering Pencil designs, or exporting to React/Tailwind code.

modu-ai/moai-adk · 45 tokens

moai-ref-react-patterns

React/Next.js component design patterns, state management strategies, and project structure reference for frontend development. Agent-extending skill that amplifies frontend domain work (spawned via Agent(general-purpose) with frontend instructions) with production-grade React patterns. NOT for: backend API design…

modu-ai/moai-adk · 72 tokens

moai-domain-uiux

UI/UX design systems specialist covering accessibility, icons, theming, design tokens, and user experience patterns. Use when working on design systems, WCAG compliance, ARIA patterns, or dark mode theming.

modu-ai/moai-adk · 49 tokens

moai-domain-frontend

Frontend development specialist covering React 19, Next.js 16, Vue 3.5, and modern UI/UX patterns with component architecture. Use when building web UIs, implementing components, optimizing frontend performance, or integrating state management.

modu-ai/moai-adk · 54 tokens

frontend-ux-engineer

Use for frontend features, Next.js/React/Vue/Svelte UI, accessibility, responsive layout, design polish, state handling, forms, visual QA, or product workflow improvements.

DominikTobureto/awesome-grok-build · 42 tokens

nextjs-fullstack

Use for Next.js App Router, React Server Components, server actions, API routes, auth, database integration, caching, deployment, or full-stack product features.

DominikTobureto/awesome-grok-build · 37 tokens