Sixty minutes from now, you'll have a real autonomous agent running on a schedule, pulling data from your actual Gmail and Google Calendar, and producing a useful daily digest every morning. This isn't a demo. The code you write here is the code you'd ship. Eight steps, about five minutes each. Open a terminal; let's go.
A daily-digest agent that runs at 6:30am every weekday and:
npm install -g @anthropic-ai/claude-code
claude
First run triggers auth. Sign in with an Anthropic account (or enter an API key for headless use later).
You need two MCPs: Google Calendar and Gmail. Both are first-party claude.ai connectors, easiest path is:
/mcp list, you should see both listedIn Claude Code, try:
Using Gmail, search for emails from my boss in the last week.
Claude should use the Gmail MCP. Accept the tool-use prompt. Verify the results look right. Repeat with Calendar.
Create ~/.claude/skills/daily-digest/SKILL.md:
---
name: daily-digest
description: Produce a daily digest from email + calendar
---
You are producing the user's daily digest. Keep it under 150 words.
Steps:
1. Use Google Calendar to list events for today
2. Use Gmail to find emails received since yesterday at 6pm with importance flags or from senders marked as important
3. Synthesize into one paragraph, covering:
- The 3 most important meetings today
- Any action-required emails from last night/this morning
- A one-sentence priority recommendation
Format:
<digest>
(your paragraph here)
</digest>
Edit ~/.claude/settings.json:
{
"permissions": {
"defaultMode": "auto",
"allow": [
"mcp__claude_ai_Gmail__*",
"mcp__claude_ai_Google_Calendar__*",
"Write",
"Read"
]
}
}
This auto-approves Gmail + Calendar tool calls and file operations. No other tools are auto-approved.
Launch Claude Code. Type /daily-digest. Watch it run. Verify the output.
Tune the skill if needed, shorten the summary, change the priority logic, whatever.
Create ~/bin/daily-digest.sh:
#!/bin/bash
cd ~
claude --headless --print --max-turns 10 <<'EOF' >> ~/daily-digest.log 2>&1
/daily-digest
EOF
Make it executable:
chmod +x ~/bin/daily-digest.sh
Run it manually. Check the log.
# crontab -e
30 6 * * 1-5 ~/bin/daily-digest.sh
Runs at 6:30 AM weekdays. Output appends to ~/daily-digest.log.
Take a second and appreciate this. What's running on your machine now is a full autonomous agent. On a schedule (Level 4 on the autonomy spectrum). With tools it can actually use (MCP). With a permission list (safety). With a defined skill (your digest). No babysitting. Just tomorrow morning, it writes something useful, you read it over coffee.
Everything else in this framework is variations on this pattern. Different tools. Different skills. More sophisticated safety. But the shape is the same: Claude + MCPs + skill + schedule + permissions. You now have that shape working.
The framework from here is extensions of what you just built. You've crossed the hard line: not talking about autonomous AI, actually running some.