Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/iliaal/whetstone/react-frontendnpx skills add iliaal/whetstone --skill react-frontendgit clone --depth 1 https://github.com/iliaal/whetstoneWrote 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.
[](https://agentmods.dev/skills/iliaal/whetstone/react-frontend)<a href="https://agentmods.dev/skills/iliaal/whetstone/react-frontend"><img src="https://agentmods.dev/badge/skills/iliaal/whetstone/react-frontend.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00057 | $0.01585 |
| Opus 5 | $0.00028 | $0.00792 |
| Sonnet 5 | $0.00011 | $0.00317 |
| Haiku 4.5 | $0.00006 | $0.00159 |
Grade A, and why
react-frontend scanned grade A with 1 finding 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 4d 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
- `fetch(url, { cache: 'force-cache' })` — static How it starts
The opening of the file, as written. The whole thing — 122 lines — stays where its author put it; the contents beside it link to each section on GitHub.
React Frontend
Component TypeScript
- Extend native elements with
ComponentPropsWithoutRef<'button'>, add custom props via intersection - Use
React.ReactNodefor children,React.ReactElementfor single element, render prop(data: T) => ReactNode - Discriminated unions for variant props — TypeScript narrows automatically in branches
- Generic components:
<T>withkeyof Tfor column keys,T extends { id: string }for constraints - Event types:
React.MouseEvent<HTMLButtonElement>,FormEvent<HTMLFormElement>,ChangeEvent<HTMLInputElement> as constfor custom hook tuple returnsuseRef<HTMLInputElement>(null)for DOM (use?.),useRef<number>(0)for mutable values- Explicit
useState<User | null>(null)for unions/null - useReducer actions as discriminated unions:
{ type: 'set'; payload: number } | { type: 'reset' } - useContext null guard: throw in custom
useX()hook if context is null
Effects Decision Tree
Effects are escape hatches — most logic should NOT use effects.
| Need | Solution |
|---|---|
| Derived value from props/state | Calculate during render (useMemo if expensive) |
| Reset state on prop change | key prop on component |
| Respond to user event | Event handler |
| Notify parent of state change | Call onChange in event handler, or fully controlled component |
| Chain of state updates | Calculate all next state in one event handler |
| Sync with external system | Effect with cleanup |
Effect rules:
- Never suppress the linter — fix the code instead
- Use updater functions (
setItems(prev => [...prev, item])) to remove state dependencies - Move objects/functions inside effects to stabilize dependencies
useEffectEventfor non-reactive values (e.g., theme in a connection effect)- Always return cleanup for subscriptions, connections, listeners
- Data fetching: use
ignoreflag pattern or React Query
State Management
Local UI state → useState, useReducer
Shared client state → Zustand (simple) | Redux Toolkit (complex)
Atomic/granular → Jotai
Server/remote data → React Query (TanStack Query)
URL state → nuqs, router search params
Form state → React Hook Form
What ships with it
1 file 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.
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.
- 4d ago First seen · 122 lines · 57 tokens per session scan A ad24a6a3942e
react-frontend is a skill published in the GitHub repository iliaal/whetstone (32 stars, last pushed 5d ago), licensed MIT. It adds 57 tokens to every session and 1,585 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
tanstack-form-composition
Migrate a React @tanstack/react-form codebase from the prop-drilled useForm + erased-form-type pattern to the official createFormHook composition API (useAppForm / withForm / field.X). Use when a project threads a form object (often cast to an any-erased type like ReactFormExtendedApi ) through field-wrapper…
stitch-nextjs-components
Converts a Stitch screen, a local HTML file, or a URL into production-ready Next.js 15 App Router components — Server vs Client split, dark mode via CSS variables, TypeScript strict, ARIA, and responsive mobile-first layout. Only the Stitch route needs an API key.
frontend
Use when building React components, optimizing performance, analyzing bundle sizes, scaffolding projects, implementing accessibility, reviewing frontend code quality, performing visual overhauls, or designing UI/UX systems.
react-application-structure
Establishes or reviews the directory layout, feature boundaries, state design, routing approach, and data-fetching conventions for a React 18+ TypeScript application. Invoked when the user asks to structure a React app, set up a scalable architecture, or review React project organization.
next-application-structure
Establishes or reviews directory layout, server/client boundaries, routing, data-fetching strategy, and testing structure for Next.js 14+ App Router TypeScript applications. Invoked when the user asks to structure a Next app, set App Router conventions, or review architecture for React parity.
react-component-design
Designs or reviews React component APIs. Handles prop drilling decisions, composition patterns, controlled/uncontrolled contracts, and minimal public API surfaces for React 18+ TypeScript components. Invoked when creating new components, refactoring existing ones, or reviewing component contracts.