Scaffold component
Skill nanocodana/nanocodana/packages/cli/example-skills/scaffold-component
Scaffold a new React component (tsx + test + index) from a nameFrom its SKILL.md
npx -y skills add nanocodana/nanocodana --skill scaffold-componentAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
1.5 KB, 348 tokens by cl100k_base, as published. Nobody here has run it
Scaffold Component Skill
Create a new React component with a consistent file layout, instead of writing each file by hand.
This skill ships a helper script alongside it. When this skill is loaded, the
note (This skill's files are at: <dir>) tells you the absolute directory the
script lives in — use that path to run it.
Steps
-
Ask the user (or infer) the component name in PascalCase, e.g.
UserCard, and the target directory (default:src/components). -
Run the bundled scaffolder with host Bash:
node "<skill-dir>/scaffold.mjs" <ComponentName> [targetDir]<skill-dir>is the path from the load note above. Example:node "/Users/me/.claude/skills/scaffold-component/scaffold.mjs" UserCard src/components -
The script creates three files and prints what it wrote:
<targetDir>/<Name>/<Name>.tsx— the component<targetDir>/<Name>/<Name>.test.tsx— a starter test<targetDir>/<Name>/index.ts— a re-export barrel
-
Read back the generated
.tsxand adjust props/markup to the user's request.
Rules
- Never overwrite an existing component directory — the script exits with an
error if
<targetDir>/<Name>already exists; report that to the user instead of forcing it. - Keep the component a function component with typed props.
- After scaffolding, summarize the created files as relative paths.
What ships with it: 1 file
2.0 KB alongside SKILL.md, 1 of them executable
- scaffold.mjsruns2.0 KB