Automations
Automations are reusable workflows that combine multiple actions: running commands, analyzing with AI, and creating files. They can run manually or on a schedule (daily, hourly, etc.).
Think of them as recipes for tasks you repeat regularly.
What Is an Automation?
An automation strings together steps that execute one after another. Each step can:
- Run a shell command —
npm test,git push, etc. - Analyze with AI — review code, summarize logs, etc.
- Create or modify files — generate reports, update docs, etc.
Steps can pass results to each other, so the output of one step becomes input for the next.
Two Ways to Run Automations
Manual Trigger
Click a button whenever you need it. Great for:
- One-off code reviews
- Emergency cleanup tasks
- On-demand report generation
Scheduled Trigger
Runs automatically on a schedule. Great for:
- Daily test reports (every morning at 9 AM)
- Weekly code quality checks
- Hourly backup operations
Types of Steps
Run a Command
Execute any shell command from your project.
Run: npm test
In folder: /projectCommands can reference results from earlier steps:
Run: echo "Previous step found: {step-1-result}"AI Analysis
Ask Claude to analyze files or results with specific capabilities.
Analyze these test results and suggest which tests to focus on
Available tools: read files, edit files, run commandsThe AI gets full context from your files and can suggest fixes, improvements, or summaries.
Write Files
Create or update files, including results from earlier steps.
File: REPORT.md
Mode: write (create new) / append (add to end) / prepend (add to start)
Content: {AI analysis from previous step}Creating an Automation
Define What You Want
Think about your workflow:
- What commands need to run?
- What analysis should happen?
- What files should be generated?
Set Up the Steps
Add steps in order. Each step can use results from earlier steps.
Choose a Trigger
- Manual — Run whenever you click the button
- Scheduled — Set a schedule (9 AM daily, every 2 hours, etc.)
Save & Run
Your automation is ready. Run it manually or let the schedule take care of it.
Real-World Examples
Daily Test Report
- Run
npm test - AI analyzes test output — "Which tests failed? Why?"
- Save summary to
TEST_REPORT.md - Schedule: Every day at 9 AM
Result: Automated test reports every morning.
Code Review Automation
- Run
git diff(get recent changes) - AI reviews the code — "Any issues? Security problems?"
- Save review to
REVIEW.md - Trigger: Manual (run when you need a review)
Result: Get instant code reviews without waiting for a teammate.
Documentation Generator
- Run
grep -r "TODO" .(find all TODO comments) - AI organizes them — "Create a prioritized list"
- Write to
TODOS.md - Schedule: Weekly on Monday morning
Result: Your TODO list auto-updates every week.
How Automations Work
Execution Flow
- Trigger fires (manual button or scheduled time)
- Steps run in order, one after another
- Each step completes before the next starts
- Output from each step is captured
- Final results are saved and available for review
Passing Data Between Steps
Reference earlier step results:
Step 1: npm test (output: 5 passed, 2 failed)
Step 2: echo "Test results: {step-1-result}"
Step 3: AI analyzes "{step-2-result}"Safety & Reliability
- Automatic timeouts — Commands that hang get stopped automatically
- Error tracking — See exactly what failed and why
- Run history — Review past automation runs anytime
- Easy debugging — Each step shows its output and any errors
- Simple activation — Turn automations on/off without deleting them
Managing Your Automations
| Action | How to do it |
|---|---|
| View all | Go to Automations view |
| Create new | Use /automation slash command |
| Edit | Click Edit on any automation |
| Run now | Click Run manually button |
| Change schedule | Edit the automation details |
| View history | See all past runs and results |
| Delete | Remove automations you no longer need |
Tips
- Start simple — Begin with a single command, then add AI analysis
- Chain results — Use outputs from one step as input to the next
- Schedule wisely — Don't run automations too frequently (saves resources)
- Test first — Run manually before setting up a schedule
- Review results — Check automation run history to catch issues early