--skip for automation while keeping the analysis read-only.
The Script
How It Works
Model Selection: Sonnet
- Better than Haiku for code understanding and technical analysis
- Cheaper than Opus - you don’t need the most capable model for analysis
- Fast enough for real-time exploration
The --skip Flag
--dangerously-skip-permissions. It allows the AI to:
- Read files without prompting you for each one
- Use tools automatically
- Explore the codebase freely
The Prompt
- Main entry points - where execution starts
- Key modules - important components
- Data flow - how information moves through the system
Running the Script
Analyze any codebase
- Explore the directory structure
- Read key files (package.json, main entry points, etc.)
- Analyze the architecture
- Summarize findings
Override the provider
Save output to file
Real-World Usage
Quick Project Overview
When joining a new codebase:Compare Multiple Projects
CI/CD Documentation
Generate architecture docs automatically:Customizing the Analysis
Focus on Specific Aspects
Security analysis:Limit Scope
Why --skip Works Here
This script uses --skip even though it’s read-only because:
- Automation - No permission prompts when reading files
- Speed - The AI explores freely without asking
- Safe prompt - The prompt never asks to modify anything
--skip is safe.
For production scripts, prefer explicit tool allowlists:This prevents accidents if someone modifies your prompt later.
Next Steps
Test Automation
Run commands and report results
Code Review
Automated security and quality scanning
CI/CD Integration
Run AIRun in GitHub Actions and GitLab CI
Scripting Guide
Permission modes and security patterns