new-component
Skill0 starsChanged 5 months agoMITView on GitHub
Scaffolds a new React component following project conventions. Use when user asks to "create a component", "add a new component", or "/new-component".
8 other projects use a version of this.
Adopted by
Most recently taken up by
- codechup/claude-code-labtheir own version, first seen Nov 8, 2026
- robritacca-dotcom/rift-dstheir own version, first seen Nov 1, 2026
- Crawford-Young/claude-configtheir own version, first seen Oct 25, 2026
- ricci-labs/twisetheir own version, first seen Oct 20, 2026
- violacase/Nuxt4-testtheir own version, first seen Oct 13, 2026
- fangyuting/skillstheir own version, first seen Oct 11, 2026
Other versions8 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 8
- harunkurtdev/ros2-claude-code-template★ 214same name
- robritacca-dotcom/rift-ds★ 9same name
- kartikmanimuthu/agentfork★ 5same name
- fangyuting/skills★ 1same name
- codechup/claude-code-lab★ 0same name
- Crawford-Young/claude-config★ 0same name
- ricci-labs/twise★ 0same name
- violacase/Nuxt4-test★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository11 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- add-server-actionSkill
- brainstormingSkill
- buf-bumpSkill
- e2e-test-fixtureSkill
- frontend-testingSkill
- new-pageSkill
- proto-migrationSkill
- receiving-code-reviewSkill
- systematic-debugSkill
The file
We split this skill into the rules it gives an agent
8 rules. 0 are common, 2 are distinctive, and 6 are very specific to this project.
0
Common
Most of the 7 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 26
If a close match exists, extend or compose it instead of starting from scratch.
- Distinctive: line 28
Create the component file:
- Very specific: line 29
Add 'use client' directive only if it uses hooks, event handlers, or browser APIs
- Very specific: line 30
Import UI primitives from @hadrian-mtv/ui-toolkit/*
- Very specific: line 31
Use @hadrian-mtv/classname-variants for variant styling
- Very specific: line 32
Use cnMerge from @hadrian-mtv/ui-toolkit for conditional classes
- Very specific: line 33
Use Tailwind design tokens (surface-*, content-*, border-*) not hardcoded neutrals
- Very specific: line 39
Create a types file in _lib/ if the component has non-trivial props
“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
/new-component
Scaffold a new React component following project conventions.
Steps
- Ask the user:
- Component name
- Which app:
flow-factoryorflow-global(or a shared package inpackages/) - Feature directory (e.g.,
app/orders/_lib/components/)
- Before creating anything, search for something to reuse or extend. Hand-rolling a
primitive that already exists is the most-flagged review defect. Search the full shared tier,
not just one package:
packages/ui-toolkit/src/— primitives (Button, Alert, Link, inputs)packages/shared-utils/,packages/part-utils/and other domain*-utilspackages- any domain toolkit/UI package matching the feature (e.g.
part-toolkit,factory-execution-ui— list them withls packages/) - the target package's source directly — its
package.jsonexportsmap and thesrc/files it points to show what already exists. If a close match exists, extend or compose it instead of starting from scratch.
- Create the component file:
- Add
'use client'directive only if it uses hooks, event handlers, or browser APIs - Import UI primitives from
@hadrian-mtv/ui-toolkit/* - Use
@hadrian-mtv/classname-variantsfor variant styling - Use
cnMergefrom@hadrian-mtv/ui-toolkitfor conditional classes - Use Tailwind design tokens (
surface-*,content-*,border-*) not hardcoded neutrals - Export with a named export (not default)
- Prefer composition over boolean-prop accretion. A handful of
isX/showY/hideZbooleans that combine into impossible states is a design smell — acceptchildrenor slot props (e.g.header,actions) so callers compose what they need.
- Add
- Create a types file in
_lib/if the component has non-trivial props - Create a co-located
.test.tsxby default. Skip it only if the user explicitly opts out. The test must assert rendered DOM or behavior — not that a helper returned a value:@testing-library/reactto render,@testing-library/user-eventfor interactions- Assert what the user sees: queried text/roles are present, the right state shows after an interaction. A test that renders without asserting anything is not a test.
- Reuse mocks from
@hadrian-mtv/vitest-utilswhere available
Gotchas
- flow-frontend has no per-package
SKILL.mdindexes. Read package sources (package.jsonexports and thesrc/files behind them) — don't assume index files exist.
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.

