Coding task · Vibe coding with Claude Code course · Module 15: Advanced Claude Code
Practice: Component generator
Keep the name in a variable, e.g. NAME=$1, and put it into the prompt. Save the files with the > redirect (a separate claude -p call per file) or add --permission-mode acceptEdits so that Claude writes them on its own. Lines starting with # are comments.
Task
In commands.sh write the generate-component.sh script: take the component name from $1 and ask claude -p for three files in src/components: <Name>.tsx, <Name>.test.tsx and <Name>.stories.tsx (Storybook).