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 storybook-play-functionsgit 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/storybook-play-functions)<a href="https://agentmods.dev/skills/punkadillo/figma-code-composer/storybook-play-functions"><img src="https://agentmods.dev/badge/skills/punkadillo/figma-code-composer/storybook-play-functions/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/punkadillo/figma-code-composer/storybook-play-functions"><img src="https://agentmods.dev/badge/skills/punkadillo/figma-code-composer/storybook-play-functions.svg" alt="Reviewed on agentmods" width="80" 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.00031 | $0.03013 |
| Opus 5.5 | $0.00012 | $0.01205 |
| Sonnet 5.5 | $0.00006 | $0.00603 |
| Haiku 4.5 | $0.00003 | $0.00301 |
Grade A, and why
storybook-play-functions 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 3mo 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 — 467 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Storybook - Play Functions
Write automated interaction tests within stories using play functions to verify component behavior, simulate user actions, and test edge cases.
Key Concepts
Play Functions
Play functions run after a story renders, allowing you to simulate user interactions:
import { within, userEvent, expect } from '@storybook/test';
import type { Meta, StoryObj } from '@storybook/react';
import { LoginForm } from './LoginForm';
const meta = {
component: LoginForm,
} satisfies Meta<typeof LoginForm>;
export default meta;
type Story = StoryObj<typeof meta>;
export const FilledForm: Story = {
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);
await userEvent.type(canvas.getByLabelText('Email'), '[email protected]');
await userEvent.type(canvas.getByLabelText('Password'), 'password123');
await userEvent.click(canvas.getByRole('button', { name: /submit/i }));
await expect(canvas.getByText('Welcome!')).toBeInTheDocument();
},
};
Testing Library Integration
Storybook integrates with Testing Library for queries and interactions:
within(canvasElement)- Scopes queries to the storyuserEvent- Simulates realistic user interactionsexpect- Jest-compatible assertionswaitFor- Waits for async changes
Test Execution
Play functions execute:
- When viewing a story in Storybook
- During visual regression testing
- In test runners for automated testing
- On story hot-reload during development
Best Practices
1. Use Testing Library Queries
Use semantic queries to find elements:
export const SearchFlow: Story = {
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);
// Good - Semantic queries
const searchInput = canvas.getByRole('searchbox');
const submitButton = canvas.getByRole('button', { name: /search/i });
const results = canvas.getByRole('list', { name: /results/i });
await userEvent.type(searchInput, 'storybook');
await userEvent.click(submitButton);
await expect(results).toBeInTheDocument();
},
};
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.
- 3mo ago First seen · 467 lines · 31 tokens per session scan A d5cf5338a49e
storybook-play-functions is a skill published in the GitHub repository punkadillo/figma-code-composer (3 stars, last pushed 3mo ago), licensed MIT. It adds 31 tokens to every session and 3,013 once invoked, about $0.0001 per session on Opus 5.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-09-03.
storybook-play-functions compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| storybook-play-functionspunkadillo/figma-code-composer | Skill | 3 | 3mo ago | MIT | A | 31 | Claude Code |
| next-cache-components-optimizervercel/next.js | Skill | 144k | today | MIT | A | 123 | Claude Code |
| next-partial-prefetching-optimizervercel/next.js | Skill | 144k | today | MIT | A | 82 | Claude Code |
| agent-production-validatorruvnet/ruflo | Skill | 83k | yesterday | MIT | A | 16 | Claude Code |
| nexent-daily-testModelEngine-Group/nexent | Skill | 6.3k | today | MIT | A | 78 | Claude Code, Codex |
| moai-design-toolsmodu-ai/moai-adk | Skill | 1.3k | today | Apache-2.0 | A | 45 | Claude Code |
| moai-ref-testing-pyramidmodu-ai/moai-adk | Skill | 1.3k | today | Apache-2.0 | A | 61 | Claude Code |