invariants-hunt
Skill92k starsChanged 5 days agoMITView on GitHub
Adversarial hunt for broken invariants in the changes since a fixed point. A subagent writes inputs that try to break each property the design promises, and a finding counts only with a test that fails on this head. Use when the user asks for an invariants hunt, to break or stress a change, or to prove that a design holds.
Trending
More talk lately.about the whole repository
Who's talking about storybookjs/storybook
- Fireship“Storybook in 100 Seconds”YouTube · Jun 27, 2022 · 576k views
- Chromatic“Build better UIs with Storybook Args | 5min Tutorial”YouTube · Feb 16, 2023 · 65k views
- Chromatic“How to Test UI AUTOMATICALLY — Storybook and Chromatic”YouTube · May 3, 2023 · 40k views
- Chromatic“How to write Storybook stories | Component Story Format”YouTube · Feb 3, 2023 · 37k views
- Chromatic“These tests use NO CODE | component testing in Storybook”YouTube · Dec 1, 2022 · 16k views
The biggest 5 of 89 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 89
Talked about on Stack Overflow, YouTube, GitHub, Bluesky and Hacker News (89 times).
On Stack Overflow · 30
- Aug 31, 2020How do I get dropdown in controls addon for Storybook?41 votes
- May 6, 2021How to dynamically mutate "args" in Storybook v6 from the component's action?35 votes
- Mar 30, 2022How to add typescript paths to storybook33 votes
- Aug 14, 2020@storybook/addon-controls: howto not auto-generate control for a certain prop27 votes
- Feb 8, 2022Storybook error when using Webpack5 with Next.JS app + Typescript21 votes
25 more on Stack Overflow
- Nov 4, 2019How to include Fonts package and CSS frameworks in Angular Story Book?20 votes
- Jan 26, 2021How disable eslint-loader of storybook's webpack?17 votes
- Aug 23, 2021Storybook - Addon value should end in /register OR it should be a valid preset16 votes
- May 1, 2024Cannnot open Rnw file after R update to 4.4.0 - (TypeError): Cannot read properties of undefined (reading `count`)11 votes · 2 answers
- May 28, 2021Disable canvas per story in storybook 611 votes
- Jan 31, 2022ngOnChanges not triggered in Angular when using controls in Storybook to change a value in a variable in a component8 votes · 1 answer
- Jan 25, 2021difference between knobs and controls in Storybook?8 votes
- Sep 4, 2024Expected a JavaScript module script but the server responded with a MIME type of "application/octet-stream". when upgrade react pdf to 9.x6 votes
- Jan 5, 2022Chakra UI is not loading when used with Storybook5 votes
- Feb 14, 2020Error: Invariant failed: You should not use <Link> outside a <Router> (storybookjs)5 votes
- Oct 22, 2019@storybook/angular cannot load scss file on stories index5 votes
- Sep 12, 2023Hot reload broken with StencilJS and Storybook 74 votes · 1 answer
- Jul 1, 2022Import scss file is not working inside storybook file4 votes
- May 21, 2022Angular 12 Storybook 'this' context transform fields to string4 votes
- Oct 27, 2021Storybook Addon StoryShots for Angular 124 votes
- Jul 14, 2020Angular9 + NX + Storybook : Why are my Scss styles getting ignored in Storybook ? No errors4 votes · 1 answer
- Mar 5, 2020Wrapping a story using decorator in storybook 5.2 - typescript / angular4 votes
- Jan 23, 2020Create React App with Storybook creating webpack issue4 votes
- Nov 15, 2022Error: e does not have a module def (ɵmod property)3 votes · 2 answers
- May 4, 2022Use global Vue 3 plugins in Storybook stories?3 votes
- Jan 28, 2021Not able to create documentation in MDX for Angular Component(Storybook)3 votes
- Jun 23, 2020How do i disable docs for a storybook page3 votes
- Feb 4, 2020Storybook does not seem to be working on node 10.15.33 votes
- Jan 31, 2020TypeError: Converting circular structure to JSON with StorybookJS on React Native3 votes
- Oct 9, 2019Storyshots testing with all the knobs optionssays it tested it3 votes
On YouTube · 25
- Jun 27, 2022Storybook in 100 Seconds — Fireship576k views · 425 comments
- Feb 16, 2023Build better UIs with Storybook Args | 5min Tutorial — Chromatic65k views · 30 comments
- May 3, 2023How to Test UI AUTOMATICALLY — Storybook and Chromatic — Chromatic40k views · 13 comments
- Feb 3, 2023How to write Storybook stories | Component Story Format — Chromatic37k views · 28 comments
- Dec 1, 2022These tests use NO CODE | component testing in Storybook — Chromaticsays it tested it16k views · 21 comments
20 more on YouTube
- Jun 20, 2023INSTANT documentation with Storybook 7 AUTODOCS | Quick Tips — Chromatic12k views · 28 comments
- Mar 30, 2023Storybook Decorators Crash Course | 5min tutorial — Chromatic9.9k views · 33 comments
- Mar 9, 2023Build Better Storybooks with Parameters | 3min tutorial — Chromatic9.6k views · 12 comments
- Jun 1, 2023How to Configure the Sidebar | Storybook Quick Tip — Chromatic6.6k views · 16 comments
- Oct 13, 2022Your Storybook EVERYWHERE | Embeds with Chromatic — Chromatic5.7k views · 4 comments
- Jul 24, 2023Naming components in Storybook — Chromatic1.8k views · 1 comment
- Mar 27, 2023How Teams Use Storybook by Lisa Chinn | Storybook Day 2023 — Chromatic1.6k views
- Mar 27, 2023How Monday.com uses Storybook for UI development by Orr Gottlieb | Storybook Day 2023 — Chromatic1.4k views
- Nov 29, 2021Sveltekit and Storybook Installation — David Kontorovsky1.1k views · 4 comments
- Mar 27, 20232x faster feature development with Storybook, mirage and interactions by Chris Webb | Storybook Day — Chromaticsays it tested it982 views · 1 comment
- Feb 17, 2023Storybook Args — Chromatic680 views · 2 comments
- May 24, 2026Storybook: The 90K Star Frontend Workshop Just Got AI Setup — AwesomeFOSS463 views
- May 24, 2026Storybook 10 — The UI Component Workshop Every Frontend Team Uses — Prism Labs432 views
- Mar 27, 2023Compatibility in Storybook 7 by Kyle Gach | Storybook Day 2023 — Chromatic381 views · 1 comment
- Aug 7, 2021storybookjs/storybook | 📓 The UI component explorer | Github #Shorts — TECH_ED335 views
- Mar 27, 2023Updates to the Storybook Ecosystem by Shaun Evening | Storybook Day 2023 — Chromatic225 views
- Oct 22, 2024GitHub - storybookjs/storybook: Storybook is the industry standard workshop for building, documen... — GitHub Daily Trend AI Podcast59 views
- Oct 19, 2026Storybook: Instantly explore and test UI components — Cherry Picked36 views · 1 comment
- Nov 4, 2026Storybook dev server bug: a website could edit your files — MatrixGard5 views
- Sep 23, 202690K⭐ tool that REVOLUTIONIZES UI component workshop 🚀 — The Mr. Ozz4 views
On GitHub · 19
- Nov 8, 2024feat(angular): add support for angular v19 — nrwl/nx65 reactions · 16 comments
- Dec 3, 2020Create official Chakra UI Storybook addon — chakra-ui/chakra-ui38 reactions · 9 comments
- Nov 20, 2024State of the project — nuxt-modules/storybook37 reactions · 13 comments
- Mar 19, 2024[bug] preVisit accesses the story store before the index is ready — storybookjs/test-runner29 reactions · 33 comments
- Apr 27, 2022Add nuxt3 + vite support — nuxt-modules/storybook28 reactions · 27 comments
14 more on GitHub
- Dec 3, 2020find const name if we can — styleguidist/react-docgen-typescript28 reactions · 4 comments
- May 28, 2025feat(angular): support angular v20 — nrwl/nx25 reactions · 8 comments
- Feb 26, 2025[Bug]: package is incompatible with Storybook 8.6.0 — nuxt-modules/storybook25 reactions · 15 comments
- Jun 28, 2023[Bug?]: Error [ERR_REQUIRE_ESM]: require() of ES Module string-width/index.js — yarnpkg/yarn25 reactions · 22 comments
- Aug 12, 2024fix: story ComponentAnnotations['subcomponents'] to correctly use its own type for subcomponents rather than attempt to inherit from the component — ComponentDriven/csf23 reactions · 5 comments
- Jun 26, 2019Riot 4 support — storybook-eol/riot23 reactions · 20 comments
- Apr 13, 2025Fix recursion with react elements — algolia/react-element-to-jsx-string17 reactions · 8 comments
- Mar 21, 2025fix: Use standard PostCSS configuration in create-next-app format for ecosystem compatibility — vercel/next.js16 reactions · 3 comments
- Mar 28, 2024feat: support flat config and eslint v9 — storybookjs/eslint-plugin-storybook11 reactions · 5 comments
- Sep 22, 2021Remove dependency pinning — react/create-react-app11 reactions · 8 comments
- Jun 18, 2025[Feature]Support storybook v9 — storybook-community/addon-queryparams8 reactions · 11 comments
- Apr 2, 2022feat(react): Upgrade to React 18 — redwoodjs/graphql8 reactions · 18 comments
- Jul 24, 2023[FEATURE] :sparkles: Upgrade storybook to v7.1.0 — 1024pix/pix-ui7 reactions · 1 comment
- Sep 20, 2019fix/undefined-value — storybookjs/telejson7 reactions
On Bluesky · 13
- Oct 19, 2026UI workshop you can explore instantly Storybook lets you build, test, and document UI components in isolation with live preview and… — @cherrypickedhq.bsky.social3 likes and reposts
- Nov 22, 2024Mine: github.com/storybookjs/... github.com/analogjs/ana... github.com/spartan-ng/s... — @dominik.pieper.io3 likes and reposts
- Oct 19, 2025🔥 Hot Repo! 🔥 (100+ new stars) 📦 storybookjs / storybook ⭐ 88,144 (+166) 🗒 TypeScript Storybook is the industry standard workshop for… — @github-trending-js.bsky.social2 likes and reposts
- Jan 25, 2025🔥 Hot Repo! 🔥 (100+ new stars) 📦 storybookjs / storybook ⭐ 85,408 (+186) 🗒 TypeScript Storybook is the industry standard workshop for… — @github-trending-js.bsky.social2 likes and reposts
- Aug 24, 2023📦 storybookjs / storybook ⭐ 79,927 (+50) 🗒 TypeScript Storybook is a frontend workshop for building UI components and pages in isolation.… — @github-trending-js.bsky.social2 likes and reposts
8 more on Bluesky
- Oct 31, 2025🚀 Skyrocketing! 🚀 (200+ new stars) 📦 storybookjs / storybook ⭐ 88,489 (+237) 🗒 TypeScript Storybook is the industry standard workshop… — @github-trending-js.bsky.social1 likes and repost
- Oct 18, 2025📦 storybookjs / storybook ⭐ 87,987 (+11) 🗒 TypeScript Storybook is the industry standard workshop for building, documenting, and testing… — @github-trending.bsky.social1 likes and repost
- Jan 24, 2025📦 storybookjs / storybook ⭐ 85,217 (+11) 🗒 TypeScript Storybook is the industry standard workshop for building, documenting, and testing… — @github-trending.bsky.socialsays it tested it1 likes and repost
- Oct 20, 2024🔥 Hot Repo! 🔥 (100+ new stars) 📦 storybookjs / storybook ⭐ 84,385 (+125) 🗒 TypeScript Storybook is the industry standard workshop for… — @github-trending-js.bsky.social1 likes and repost · 1 reply
- Oct 19, 2024📦 storybookjs / storybook ⭐ 84,272 (+13) 🗒 TypeScript Storybook is the industry standard workshop for building, documenting, and testing… — @github-trending.bsky.socialsays it tested it1 likes and repost
- Mar 1, 2024📦 storybookjs / storybook ⭐ 82,158 (+41) 🗒 TypeScript Storybook is a frontend workshop for building UI components and pages in isolation.… — @github-trending-js.bsky.social1 likes and repost
- Feb 6, 2024github.com/storyboo... yug1224 starred storybookjs/storybook — @yug1224.com1 likes and repost
- Jun 2, 20252️⃣ storybook Storybook is the industry standard workshop for building, documenting, and testing UI components in isolation.… — @devshorts.in0 likes and reposts · 1 reply
On Hacker News · 2
- Apr 10, 2020Storybook – a development environment for UI components3 points
- Jan 14, 2021Storybook is a development environment for UI components2 points
In this repository23 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .cursor/rules/cursor-cloud.mdcCursor rule
- .cursor/rules/spy-mocking.mdcCursor rule
- build-itSkill
- canarySkill
- check-prSkill
- code-reviewSkill
- docs-reviewSkill
- fix-linting-types-on-prSkill
- github-qa-labelsSkill
- handle-pr-commentsSkill
- minor-releaseSkill
- open-prSkill
- principle-encode-lessons-in-structureSkill
- prSkill
- ready-for-reviewSkill
- real-world-qaSkill
- rebuild-restart-storybookSkill
- second-opinionSkill
- storybook-startup-benchmarkSkill
- storybook-upgradeSkill
- update-browser-supportSkill
- update-pr-descriptionSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 12
Run it after code-review is quiet: fixes from that review change the code the hunt runs against.
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Invariants hunt
A review of the diff asks whether the code follows the rules. The hunt asks whether the rules hold: code can implement a rule faithfully and still break a property the design promises, and a reader of the diff will not see it. So the hunt reads the invariants, not the diff, and a finding counts only after it fails on this head.
Run it after code-review is quiet: fixes from that review change the code the hunt runs against.
Steps
- Pin the target. The fixed point the user gave, or the merge-base with
origin/next, confirmed withgit rev-parse, and the commit listgit log --oneline <fixed-point>..HEAD. The working tree is clean, and nothing else runs against it: no dev server, no E2E, no compile. The hunt edits files and runs tests, and anything else that shares the tree corrupts both. - Write the invariants. From the spec, the design notes and the PR body, write the properties the design promises as claims that a test can falsify. Each one names what stays true and the "regardless of" clause it must survive: input order, timing, failure, concurrency, partial state. Four to eight lines. Add each deferral from earlier reviews of this change as its own line: a deferral is a claim nobody has tested. When the tracker's discussion overrules the spec, save the spec to a file with a dated "Later decisions that supersede lines in this spec" section at the top, one decision per line. The subagent cannot read the tracker, and a stale spec makes it defend a rule that is already gone. Show the list to the user: a wrong invariant is cheaper to correct now than after the hunt.
- Dispatch the hunt. One subagent, on the strongest model available, in the background, with the brief below filled in. Nothing else touches the tree until it reports.
- Gate on evidence. A finding enters judgement only with all five parts: the invariant, the minimal input, the observed state on this head, the expected state, and a test that fails on this head. Send anything less back with "reproduce or drop". Judge each survivor:
- Valid: fix it.
- No producer: the finding names no producer of its input. Judge it with the whole repo in view, as "Edge cases and guards" in the code-review rules says: fix it when you find a producer, and otherwise say why you leave it.
- Design-level: the fix changes a rule the spec states. That is the user's decision: keep it out of the commits, and present it in one paragraph with a recommendation and the reproduction.
- Wrong: say why.
- Apply. Apply the accepted hunks from the saved patch by hand, without the held ones. Run the focused suites. Commit them as the
prskill "Commit history" section says. - Record. Add a dated note for each accepted rule change, and for each held design decision, marked open: as a comment on the tracker issue when the spec has one, else in the spec file. The next hunt on this change takes the deferrals as invariants in step 2.
Done when every finding has a verdict, the accepted fixes are committed, and the focused suites pass.
Brief
Replace the angle-bracket fields. Keep the rest.
You are reviewing <repo> at commit <sha> on branch <branch>, checked out at <path>. The change
under review is `git log --oneline <fixed-point>..HEAD`. The code lives in <directories>. Read
<design docs> and <spec file> first; the spec file's "Later decisions" section supersedes the body
where they disagree.
Do NOT review the diff for style, naming, comments, or spec conformance. Other reviewers do that.
Your job is to break the design's invariants and to prove each break by executing it.
The design rests on these invariants. Treat each as a claim to falsify:
<numbered invariants, each with its "regardless of" clause>
For each invariant, construct concrete adversarial inputs: <the domain's concrete knobs: specific
values, orderings, sizes, failure injections, concurrency>. Run them, against the unit under test
directly (<pattern file>) or through <harness / integration path>. Try EVERY ordering of small
input sets, not one ordering; write a permutation loop. Read the spec's own rules as suspects: a
rule the code implements faithfully can still break an invariant. Pay particular attention to rules
that landed in separate changes acting together.
Practical rules:
- Focused tests: <command>. Never run the full suite or a type check in parallel with another heavy
process. Run the full relevant directory at most once, at the end.
- You may add probe tests and edit source to apply your fixes, but at the end the working tree must
be exactly as you found it: `git status --short` shows <expected output>. Save your changes as
<patch path> (git diff plus new files via `git add -N`) before reverting. Do not commit, push, or
touch branches. Do not touch <off-limits paths>.
Explore what can reach the changed code before you decide what is impossible: user files and config,
CLI arguments, channel messages, a file system left behind by an interrupted run, events that arrive
out of order, concurrent runs, rejected promises. For each break, name its producer: the user action,
editor, build tool, framework or earlier Storybook run that creates the input. When you cannot name
a producer, keep the finding, say so, and rank it last.
Report only what you reproduced. For each finding: the invariant, the minimal input and its producer, the observed
state on this head, the expected state, and a test that fails on this head. Propose the source fix,
apply all fixes together, confirm the focused suites pass with them and that exactly your new tests
fail without them. List what you tried that held under "Held", one line each. Report nothing you
could not make fail; nothing about style, naming, or comments. Finish with a two-line verdict:
number of confirmed breaks, and whether the change is safe to merge as-is.Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

