CtrlK
BlogDocsLog inGet started
Tessl Logo

setting-feature-flags-in-storybook

Use when writing a Storybook story for a component gated on a feature flag — boolean flags or multivariate/experiment-arm variants. Covers the `featureFlags` story parameter and why imperatively setting flags renders the flag-off branch in visual-regression snapshots while passing in jest.

70

Quality

85%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide

SecuritybySnyk

Passed

No findings from the security scan

SKILL.md
Quality
Evals
Security

Quality

Content

82%Weight 40%Scale 1-5

Reviews the quality of instructions and guidance provided to agents. Good implementation is clear, handles edge cases, and produces reliable results.

A tight, highly actionable skill body with executable code and explicit gotchas guarding the common failure modes. The only soft spot is the optional implementation-detail section, which adds tokens beyond the stable contract.

Suggestions

Consider moving the 'Under the hood (implementation detail — may drift)' section into a separate reference file so the SKILL.md body stays at the stable-contract level, improving both conciseness and progressive_disclosure.

Add a one-line note clarifying meta-level vs per-story `parameters.featureFlags` placement directly in the 'How to use it' intro, since the shallow-merge replacement warning depends on that distinction.

DimensionReasoningScore

Conciseness

Mostly lean with copy-paste code and minimal padding, assuming Claude knows TS/Storybook; the 'Under the hood (may drift)' implementation section is some extra detail that could be trimmed, though it is explicitly flagged and justified.

4 / 5

Actionability

Fully executable, copy-paste-ready TypeScript examples covering the common cases — boolean array form, meta-level and per-story record form, and mixed boolean/variant records — with the exact `parameters.featureFlags` syntax.

5 / 5

Workflow Clarity

Clear, well-sequenced guidance distinguishing boolean vs multivariate and meta vs per-story, with explicit cautions (never call setFeatureFlags; re-list meta flags after shallow-merge replacement) standing in as checkpoints; no formal validate/retry loop is needed for this non-destructive single-purpose task.

4 / 5

Progressive Disclosure

Single self-contained file with clear section headers (How to use it, Why the obvious approach fails, Under the hood, See also) and no nested references; well-organized, though slightly over the simple-skill line count and the 'Under the hood' detail could arguably live separately.

4 / 5

Total

17

/

20

Passed

Description

87%Weight 40%Scale 1-5

Based on the skill's description, can an agent find and select it at the right time? Clear, specific descriptions lead to better discovery.

A focused, well-targeted description that clearly states both capability and trigger conditions with concrete, domain-specific language. Minor room to add file-extension synonyms and the meta/per-story distinction.

DimensionReasoningScore

Specificity

Names the domain (Storybook stories gated on feature flags) and several concrete capabilities — the `featureFlags` parameter, boolean and multivariate/experiment-arm variants — with only minor coverage gaps (no mention of per-story vs meta-level distinction).

4 / 5

Completeness

Explicitly answers both 'what' (covers the `featureFlags` story parameter and the imperative-set gotcha) and 'when' with a concrete 'Use when writing a Storybook story for a component gated on a feature flag' trigger phrase plus variant qualifiers.

5 / 5

Trigger Term Quality

Strong natural keywords a user would actually say ('Storybook story', 'feature flag', 'component gated on a feature flag', 'boolean flags', 'multivariate/experiment-arm variants'), with a few synonyms/extensions absent (e.g. `.stories.tsx`, 'experiment').

4 / 5

Distinctiveness Conflict Risk

Occupies a clear niche (Storybook feature-flag stories) with distinct, specific triggers and minimal overlap risk with other skills.

5 / 5

Total

18

/

20

Passed

Validation

100%

Checks the skill against the spec for correct structure and formatting. All validation checks must pass before discovery and implementation can be scored.

Validation16 / 16 Passed

Validation for skill structure

No warnings or errors.

Repository
PostHog/posthog
Reviewed

Table of Contents

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.