Esta página ainda está em inglês. A tradução para português está em andamento.
Routine Examples
Walkthrough of two real routines showing how all the pieces fit together.Example 1: Community Pulse
What it does: Reads Discord and WhatsApp messages from the last 24 hours, analyzes activity, sentiment, and support questions, then generates an HTML report. Agent: Pulse (pulse-community)
Skill: pulse-daily
Schedule: Daily at 20:00
The script
ADWs/routines/examples/community_daily.py:
How it flows
- Runner calls
claude --print --agent pulse-communitywith a prompt to execute/pulse-daily - Claude loads the Pulse agent system prompt
- Pulse reads the
pulse-dailySKILL.md instructions - The skill tells Pulse to:
- Fetch Discord messages via the Discord API
- Fetch WhatsApp messages via the Evolution API
- Analyze activity, sentiment, top topics, support questions
- Read the HTML template from
.claude/templates/html/ - Fill the template with collected data
- Save to
workspace/community/reports/daily/ - Send a Telegram notification with the summary
- Runner logs the result and updates metrics
The schedule entry
Inconfig/routines.yaml:
Output
An HTML report saved to:Example 2: Financial Pulse
What it does: Queries Stripe for MRR, charges, churn, and failures. Queries Omie for payables, receivables, and invoices. Generates an HTML financial snapshot. Agent: Flux (flux-finance)
Skill: fin-daily-pulse
Schedule: Daily at 19:00
The script
ADWs/routines/examples/financial_pulse.py:
What the skill does (step by step)
Thefin-daily-pulse SKILL.md instructs Flux to:
- Collect Stripe data — MRR from active subscriptions, today’s charges (succeeded vs failed), 30-day churn rate, 7-day refunds, new customers
- Collect Omie data — overdue receivables, payables due in 7 days, pending invoices
- Consolidate transactions — all financial movements for the day
- Classify health — green (healthy), yellow (warning), or red (risk) based on churn rate, overdue amounts, and MRR trend
- Generate alerts — payment failures, overdue accounts, missing invoices, anomalies
- Fill HTML template — reads
.claude/templates/html/custom/financial-pulse.htmland replaces placeholders - Save to
workspace/finance/reports/daily/[C] YYYY-MM-DD-financial-pulse.html - Notify via Telegram — sends a short summary with MRR and alert count
Adapting an Example for Your Use Case
To create a routine similar to these:1. Identify the components
2. Create or reuse a skill
If an existing skill covers your use case, reuse it. Otherwise create a new SKILL.md in.claude/skills/my-skill/SKILL.md with step-by-step instructions.
3. Create the routine script
Copy one of the examples above and change:- The skill name in
run_skill() - The agent name
- The log name
- The banner text
4. Register the schedule
Add an entry toconfig/routines.yaml and optionally add a Makefile target:
5. Test manually
make logs and make metrics to verify it ran correctly.
Using the create-routine skill
Instead of doing this manually, run/create-routine in Claude Code. It generates the script, Makefile target, and schedule entry for you.