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/khan/wonder-blocks/unit-testsnpx skills add Khan/wonder-blocks --skill unit-testsgit clone --depth 1 https://github.com/Khan/wonder-blocksWrote 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/khan/wonder-blocks/unit-tests)<a href="https://agentmods.dev/skills/khan/wonder-blocks/unit-tests"><img src="https://agentmods.dev/badge/skills/khan/wonder-blocks/unit-tests.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.00034 | $0.03941 |
| Opus 5 | $0.00017 | $0.01971 |
| Sonnet 5 | $0.00007 | $0.00788 |
| Haiku 4.5 | $0.00003 | $0.00394 |
Grade A, and why
unit-tests 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 5d 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.
How it starts
The opening of the file, as written. The whole thing — 486 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Jest Testing Best Practices
This guide covers testing patterns and best practices for Jest and React Testing Library in the Wonder Blocks codebase.
Core Testing Principles
⚠️ Critical Setup Rules
Test Workflow Priority:
- ✅ ALWAYS fix failing tests BEFORE fixing linting errors
- ✅ Focus on underlying errors, not
Unhandled console.error callmessages - ⚠️ When tests fail with
Unhandled console.error call, look for the root cause error (e.g.,ReferenceError: window is not defined) - ⚠️ The console.error messages are symptoms, not the actual problem - fix the underlying issue
File Structure:
- ✅ Name test files with
.test.tsor.test.tsxsuffix - ✅ Place in
__tests__/directory OR colocate with source files (follow local conventions)
Test Framework Setup:
- ✅ Additional matchers from React Testing Library (RTL) and
jest-extendedare available - ✅ Use
describe/itpattern for test organization - ✅ Use
globalThisprefix when accessing global objects - ✅ Prioritize testing non-trivial business logic over trivial implementations
Arrange-Act-Assert Pattern
⚠️ ALWAYS use this three-section structure:
describe("Calculator", () => {
it("should add two numbers correctly", () => {
// Arrange
const a = 5;
const b = 3;
// Act
const result = add(a, b);
// Assert
expect(result).toBe(8);
});
});
Rules:
- ✅ ALWAYS divide tests into Arrange, Act, Assert sections with comments
- ✅ Each section gets exactly one comment label (
// Arrange,// Act,// Assert) — no additional comments within a section - ❌ NEVER combine sections (e.g., don't write
// Act & Assert) - ❌ NEVER use multiple Act or Assert sections in a single test (split into separate tests instead)
- ❌ NEVER remove Arrange, Act, Assert comments
Exception - Testing Thrown Errors:
When testing errors, use an underTest variable in the Act section:
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.
- 5d ago First seen · 486 lines · 34 tokens per session scan A 3e75ef5ee47b
unit-tests is a skill published in the GitHub repository Khan/wonder-blocks (163 stars, last pushed yesterday), licensed MIT. It adds 34 tokens to every session and 3,941 once invoked, about $0.0002 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.
Other skills, from other repositories
material-ui-nextjs
Integrates Material UI with Next.js App and Pages routers using @mui/material-nextjs, Emotion cache providers, next/font, CSS layers with Tailwind/CSS Modules, Link component prop patterns, CSS theme variables SSR notes, and App Router useSearchParams + Suspense. Use when setting up or debugging MUI in a Next.js app.
material-ui-styling
Chooses the right Material UI styling approach (sx, styled, theme overrides, global CSS) from official MUI guidance. Use when styling @mui/material components, customizing themes, overriding slots, or comparing sx vs styled.
material-ui-tailwind
Integrates Material UI with Tailwind CSS v4 using cascade layers (enableCssLayer, @layer order) and documents Tailwind v3 interoperability (preflight, important, injectFirst, portals). Use when combining MUI with Tailwind utilities, slotProps className, or theme token bridges.
material-ui-theming
Guides Material UI theming and design tokens (createTheme, ThemeProvider, palette, colorSchemes, cssVariables, theme.vars, dark mode, TypeScript augmentation). Use when building or extending a theme, toggling light/dark, or aligning tokens across an app.
tamagui
Universal React UI framework for web and native. Use when building cross-platform apps with Tamagui, creating styled components with styled(), configuring design tokens/themes, using Tamagui UI components, or working with animations. Triggers: "tamagui", "styled()", "$token", "XStack/YStack", "useTheme", "@tamagui/"…
beui
Pick and install beUI (@beui) animated React components from the shadcn registry. Use when building motion UI, agent/chat interfaces, toasts, docks, bottom sheets, drawers, popovers, sliders, loaders, 404 pages, or any beui.dev component. Maps user intent to exact @beui install slugs instead of inventing custom…