new-variant
Skill117 starsChanged 10 days agoMITView on GitHub
Create a new design variant or alternative for a page using the built-in feature/variant system. USE WHEN: a designer wants to try a different layout, create an "option B" or "version 2", compare designs side by side, add an A/B alternative, or explore an alternate version. Do NOT build a custom toggle solution.
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 3 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 30
If the request is unclear, ask one focused question.
- Very specific: line 34
Read app/routes.ts to discover the current route structure.
- Very specific: line 38
Read app/features.json and check if a feature already exists for this route.
- Very specific: line 40
If a feature exists: Add a new variant to the existing feature.
- Very specific: line 41
If no feature exists: Create a new feature. Follow the "Creating a New Feature" section in the features-variants skill.
- Very specific: line 45
Update app/features.json following the schema in the features-variants skill.
- Distinctive: line 46
Read the route component file identified in Step 2 — understand its structure before editing.
- Very specific: line 47
Import useFeature from ~/features/FeatureContext and add conditional rendering to the route component, following the patterns in the …
- Very specific: line 57
If the dev server is not already running, invoke the start-app skill.
- Distinctive: line 59
Use the repository's browser validation workflow to:
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 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
New Design Variant
You are helping a designer create a new design variant using CoreAI Sandbox's built-in feature/variant system. The designer may have no coding knowledge — they will describe what they want in plain language.
Paths below are relative to this app's directory.
Before You Start
- Invoke the
features-variantsskill — it is the definitive guide to the feature system (schemas, code patterns, field references, anti-patterns). Do not duplicate that information here — refer to it. - Read
app/features.json— understand what features already exist. - Invoke the
react-componentsskill — you will need to write.tsxcode. - Invoke the
css-stylingskill — if you need to write styles.
Workflow
Step 1: Understand the Designer's Request
Identify from the user's message:
- What page or feature they want to change (e.g., "the playground", "the homepage hero", "the agent list")
- What they want to try (e.g., "a different layout", "move the config panel to a dialog", "bigger hero text")
- How it differs from the current design (the "current" design is always the first variant)
If the request is unclear, ask one focused question. Do not ask multiple questions — infer reasonable defaults.
Step 2: Determine the Route
Read app/routes.ts to discover the current route structure. Map the designer's description to a route file and its URL pattern. Routes are defined using React Router v7 config — index(), route(), and layout() calls show the path segments and corresponding file paths.
Step 3: Check for Existing Features
Read app/features.json and check if a feature already exists for this route.
- If a feature exists: Add a new variant to the existing feature. Follow the "Adding a New Variant to an Existing Feature" section in the
features-variantsskill. - If no feature exists: Create a new feature. Follow the "Creating a New Feature" section in the
features-variantsskill.
Step 4: Implement
- Update
app/features.jsonfollowing the schema in thefeatures-variantsskill. - Read the route component file identified in Step 2 — understand its structure before editing.
- Import
useFeaturefrom~/features/FeatureContextand add conditional rendering to the route component, following the patterns in thefeatures-variantsskill.
Implementation sizing guidance:
- For small changes (text, colors, visibility) — use inline conditionals within the existing JSX
- For medium changes (rearranging sections, swapping a panel) — extract the variant-specific section into a local component or conditional block
- For large changes (completely different page layout) — create the new layout inline in the same file or as a separate component in the same route folder
Step 5: Start the App and Verify
If the dev server is not already running, invoke the start-app skill.
Use the repository's browser validation workflow to:
- Navigate to the page
- Confirm the floating feature strip appears with the correct feature name and variant tab links; if hidden, enable Show feature selector in the Prototype menu
- Click each variant to verify switching works
- Take a screenshot to show the designer the result
Step 6: Report to the Designer
Tell the designer:
- What you built and which variant it is
- The URL they can use to see each variant (include
?variant=feature-id--variant-id) - How to switch between variants using the elevated tab links in the draggable floating strip (bottom-center by default)
In this repository34 other files it gives its agents.
- AGENTS.mdAGENTS.md
- hub/AGENTS.mdAGENTS.md
- starters/coreai/AGENTS.mdAGENTS.md
- starters/minimal/AGENTS.mdAGENTS.md
- replica-pick-and-polishSkill
- replica-publish-prototypeSkill
- review-hub-feedbackSkill
- code-reviewSkill
- write-testsSkill
- coreai-ds-fluentui-reactSkill
- css-stylingSkill
- features-variantsSkill
- iconsSkill
- interpreting-htmlSkill
- lintSkill
- react-componentsSkill
- routingSkill
- start-appSkill
- state-managementSkill
- context-templatesSkill
- accessibility-auditSkill
- add-seed-dataSkill
- agent-browserSkill
- browser-canvas-validationSkill
- component-design-system-reviewSkill
- create-prototypeSkill
- developer-handoffSkill
- prepare-feedback-proposalsSkill
- product-designSkill
- prototype-controlsSkill
- responsive-auditSkill
- review-hub-feedbackSkill
- setup-skillsSkill
- visual-design-reviewSkill
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.

