Coding task · Vibe coding with Claude Code course · Module 15: Advanced Claude Code
Practice: Docs generator
In -p mode nobody can approve a file write, so by default Claude will not create the file on its own. Ask for the Markdown only and redirect it: claude -p "..." > docs/API.md. The other way is the --permission-mode acceptEdits flag, which lets Claude write the files on its own. Lines starting with # are comments.
Task
In commands.sh write the generate-docs.sh script that uses claude -p to create three files: docs/API.md, docs/COMPONENTS.md and README.md. Save each answer to its file with the > redirect.