primitives: Skill for Claude Code

.claude/skills/storybook-story/SKILL.md

storybook-story is a skill for Claude Code from radix-ng/primitives. It costs 90 tokens per session (3,712 once invoked), scanned A, original, MIT.

A guide for writing Storybook examples and documentation in MDX for Radix NG components. Storybook is a tool for developing and displaying UI components in isolation.

In plain words
What is it for?
It helps add or update component stories, interactive variants, source-code examples and MDX documentation.
Why use it?
It prevents stories from breaking when embedded in documentation and keeps files and examples consistent with the project's conventions.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is radix-ng/primitives's own configuration. It tells Claude Code how to work on primitives itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything primitives configures →

Reuse

Borrowing it

Nothing to install: this file belongs to radix-ng/primitives. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/radix-ng/primitives/main/.claude/skills/storybook-story/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/radix-ng/primitives

Made for: Claude Code.

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 storybook-story

README.md
[![agentmods](https://agentmods.dev/badge/skills/radix-ng/primitives/storybook-story/github.svg)](https://agentmods.dev/skills/radix-ng/primitives/storybook-story)
Your own site
<a href="https://agentmods.dev/skills/radix-ng/primitives/storybook-story"><img src="https://agentmods.dev/badge/skills/radix-ng/primitives/storybook-story/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.

agentmods 80×15 button for storybook-story

Your own site · 80×15
<a href="https://agentmods.dev/skills/radix-ng/primitives/storybook-story"><img src="https://agentmods.dev/badge/skills/radix-ng/primitives/storybook-story.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 90 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,712 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00090 $0.03712
Opus 5 $0.00045 $0.01856
Sonnet 5 $0.00018 $0.00742
Haiku 4.5 $0.00009 $0.00371

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

Security

Grade A, and why

storybook-story 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 12d 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.

.claude/skills/storybook-story/SKILL.md · 231 lines

How it starts

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

Writing Storybook Stories for Radix NG Primitives

Checklist — run through this before writing any story file

  1. Any story embedded via <Canvas of={X}> must be a standalone component — props do not survive a Canvas embed. The exception is the primary Default story, which may be a small inline template using props + args, provided it is surfaced in the MDX via <Primary /> / <Controls /> (never <Canvas of={Default}>). This matches the button and checkbox references.

    // ✅ Default — small inline template with props/args, shown via <Primary/> in MDX
    export const Default: Story = {
      args: { disabled: false },
      render: (args) => ({
        props: { ...args, b: demoButton },
        template: html`
          <button rdxButton ${argsToTemplate(args)} [class]="b.base">Button</button>
        `
      })
    };
    
    // ✅ Named example — standalone component, safe to embed via <Canvas of={X}>
    export const Variants: Story = {
      parameters: source(variantsSource),
      render: () => ({
        template: html`
          <button-variants-example />
        `
      })
    };
    
    // ❌ wrong — a props-based story embedded via <Canvas of={WithScroll}> renders blank
    export const WithScroll: Story = {
      render: () => ({ props: { r: demoRadio }, template: `<div [class]="r.group">...` })
    };
    

    In the MDX: surface Default with <Primary /> (+ <Controls />) and add of={Stories} to <Meta>; embed every other example with <Canvas of={Stories.X} />.

  2. One component → one file. Every standalone story component gets its own file: stories/select-default.ts, stories/select-with-scroll.ts, etc. Never put multiple story components in a single stories/<name>.ts.

    Reason: ?raw imports the entire file, so a shared file shows all source for every story.

  3. ?raw import per story file. In <name>.stories.ts:

    import defaultSource from './select-default?raw';
    export const Default: Story = {
      parameters: source(defaultSource),
      render: () => ({
        template: html`
          <select-default />
        `
      })
    };
    

Read the full file on GitHub · 231 lines

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. 12d ago First seen · 231 lines · 90 tokens per session scan A 5b4e0b19f4e4

Subscribe to this mod's changes

storybook-story is a skill published in the GitHub repository radix-ng/primitives (270 stars, last pushed yesterday), licensed MIT. It adds 90 tokens to every session and 3,712 once invoked, about $0.0005 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.