Coding task · Vibe coding with Claude Code course · Module 15: Advanced Claude Code
Practice: Plain-language code search
Example: ./ai-search.sh "where do we check the user's password". In -p mode Claude may read and search the project files without asking, so you need neither grep nor regular expressions. Lines starting with # are comments.
Task
In commands.sh write the ai-search.sh script: take the query from the script arguments ($1 or "$*") and pass it to claude -p so that Claude finds the matching code itself and lists files and line numbers.