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 skills add punkadillo/figma-code-composer --skill jest-testing-patternsgit clone --depth 1 https://github.com/punkadillo/figma-code-composerWrote 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/punkadillo/figma-code-composer/jest-testing-patterns)<a href="https://agentmods.dev/skills/punkadillo/figma-code-composer/jest-testing-patterns"><img src="https://agentmods.dev/badge/skills/punkadillo/figma-code-composer/jest-testing-patterns.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.1 | $0.00028 | $0.03911 |
| Opus 5 | $0.00014 | $0.01956 |
| Sonnet 5 | $0.00006 | $0.00782 |
| Haiku 4.5 | $0.00003 | $0.00391 |
Grade A, and why
jest-testing-patterns 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.
// __mocks__/axios.js How it starts
The opening of the file, as written. The whole thing — 601 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Jest Testing Patterns
Master Jest testing patterns including unit tests, mocks, spies, snapshots, and assertion techniques for comprehensive test coverage. This skill covers the fundamental patterns and practices for writing effective, maintainable tests using Jest.
Basic Test Structure
Test Suite Organization
describe('Calculator', () => {
describe('add', () => {
it('should add two positive numbers', () => {
expect(add(2, 3)).toBe(5);
});
it('should add negative numbers', () => {
expect(add(-2, -3)).toBe(-5);
});
it('should handle zero', () => {
expect(add(0, 5)).toBe(5);
});
});
describe('subtract', () => {
it('should subtract two numbers', () => {
expect(subtract(5, 3)).toBe(2);
});
});
});
Setup and Teardown
describe('Database operations', () => {
let db;
// Runs once before all tests in this describe block
beforeAll(async () => {
db = await initializeDatabase();
});
// Runs once after all tests in this describe block
afterAll(async () => {
await db.close();
});
// Runs before each test
beforeEach(() => {
db.clear();
});
// Runs after each test
afterEach(() => {
db.resetMocks();
});
it('should insert a record', async () => {
const result = await db.insert({ name: 'John' });
expect(result.id).toBeDefined();
});
it('should find a record', async () => {
await db.insert({ id: 1, name: 'John' });
const result = await db.findById(1);
expect(result.name).toBe('John');
});
});
Matchers and Assertions
Common Matchers
describe('Matchers', () => {
it('should test equality', () => {
expect(2 + 2).toBe(4); // Strict equality
expect({ a: 1 }).toEqual({ a: 1 }); // Deep equality
expect([1, 2, 3]).toStrictEqual([1, 2, 3]); // Strict deep equality
});
it('should test truthiness', () => {
expect(true).toBeTruthy();
expect(false).toBeFalsy();
expect(null).toBeNull();
expect(undefined).toBeUndefined();
expect('value').toBeDefined();
});
it('should test numbers', () => {
expect(4).toBeGreaterThan(3);
expect(4).toBeGreaterThanOrEqual(4);
expect(3).toBeLessThan(4);
expect(3).toBeLessThanOrEqual(3);
expect(0.1 + 0.2).toBeCloseTo(0.3, 5);
});
it('should test strings', () => {
expect('team').not.toMatch(/I/);
expect('Christoph').toMatch(/stop/);
expect('hello world').toContain('world');
});
it('should test arrays and iterables', () => {
const list = ['apple', 'banana', 'cherry'];
expect(list).toContain('banana');
expect(list).toHaveLength(3);
expect(new Set(list)).toContain('apple');
});
it('should test objects', () => {
expect({ a: 1, b: 2 }).toHaveProperty('a');
expect({ a: 1, b: 2 }).toHaveProperty('a', 1);
expect({ a: { b: { c: 1 } } }).toHaveProperty('a.b.c', 1);
});
it('should test exceptions', () => {
expect(() => {
throw new Error('error');
}).toThrow();
expect(() => {
throw new Error('Invalid input');
}).toThrow('Invalid input');
expect(() => {
throw new Error('Invalid input');
}).toThrow(/Invalid/);
});
});
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 · 601 lines · 28 tokens per session scan A b0aad68be270
jest-testing-patterns is a skill published in the GitHub repository punkadillo/figma-code-composer (3 stars, last pushed 19d ago), licensed MIT. It adds 28 tokens to every session and 3,911 once invoked, about $0.0001 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-09-03.
Other skills, from other repositories
agent-tester
Agent skill for tester - invoke with $agent-tester.
spec-execution
6-phase iterative specification execution workflow covering implementation, testing, review, improvement, commit, and progress tracking with quality-gated convergence.
quality-checklist
Validate implementation quality through custom checklists, scoring against constitution standards, specification coverage, and producing remediation recommendations.
test-automation
Execute Vitest and Playwright test suites with result collection and failure analysis.
test-enforcement
Automated test validation, coverage checking, and quality metrics with aggressive defaults.
test-generator
Automatically suggest tests for new functions and components. Use when new code is written, functions added, or user mentions testing. Creates test scaffolding with Jest, Vitest, Pytest patterns. Triggers on new functions, components, test requests, testing mentions.