Advanced
Let Claude do the wiring
Everything on the cron and webhooks pages is small scripts that send email. You don't have to write those scripts yourself — Claude is good at this exact shape of work.
This page shows two ways to use Claude to set up and run Deck context flows: a skill that wraps the send pattern, and a scheduled Claude agent that runs the whole loop for you.
1. A Claude skill that wraps the pattern
The cleanest path is a skill — a small markdown file that teaches Claude how to compose and send the email. Skills work the same way across Claude Code, Claude Desktop, and Claude.ai (web), so the same file gets you the same behavior wherever you talk to Claude.
Save the file below verbatim at ~/.claude/skills/deck-send.md, swap in your assistant address and the project names you use, and Claude will pick it up the next time it runs.
---
name: deck-send
description: Compose and send a message to my Deck assistant. Use when the user
asks to "send to deck", "file in deck", or "ask deck about X". Routes to the
right project via subject prefix.
---
You send email to my Deck assistant at your-name@agent.hellodeck.ai.
Inputs the user will give you (or you'll infer):
- **project** — Brain, Pipeline, Product, Fundraising, or "cross" for all
- **intent** — "store" (file a snapshot/event) or "ask" (question)
- **body** — what to file, or what to ask
Subject conventions:
- Storing in a project: "<Project> — <short description> <date>"
- Asking one project: "<Project> — <question summary>"
- Cross-project: "Daily Brief — <date>" or "Weekly Summary — <date>"
If intent is "store", include this line in the body:
"Please store this in my <Project> project. It replaces any previous <kind>."
Send via the user's local Gmail OAuth token at ~/.deck/token.json using the
Gmail send API. Confirm to the user once sent — do not narrate the call.
Once you've saved that as a skill, you can say things like:
- "deck-send: file the latest calendar in Brain"
- "deck-send: ask Pipeline who's gone quiet in the last two weeks"
- "deck-send: file this meeting transcript I just pasted"
…and Claude handles the routing, subject, body, and send.
2. A scheduled Claude agent
If you want the entire loop to be Claude — fetch, digest, send — and you'd rather not host a script yourself, you can run a remote Claude agent on a schedule. The Anthropic Agent SDK and Claude Code's scheduled triggers both fit this shape.
A schedule entry might look like:
schedule: "0 7 * * 1-5" # weekdays at 7 AM
agent: deck-daily-brief
instructions: |
Fetch my Google Calendar for today and tomorrow, pull anything new in my
Newsletters/Today Gmail label, and email a one-page brief to my Deck
assistant. Subject: "Daily Brief — {{date}}". Body should be markdown,
bullets only, three sections: calendar, news, top 3 focuses.
You write the instructions once; the agent does the same loop forever. The Deck-facing part is unchanged — it's still a subject prefix + a Markdown body delivered to your assistant address.
When to use which
| You want… | Use |
|---|---|
| Quick, conversational sends from anywhere you use Claude | A Claude skill (option 1) |
| The whole loop hosted, no local infra | A scheduled Claude agent (option 2) |
| The simplest possible thing | A Pipedream workflow (see Webhooks) |
Tips for working with Claude on these flows
- Show Claude one good example. Paste an existing snapshot email (subject + body) and say "make me one of these for X". Faster than describing from scratch.
- Have Claude verify the OAuth scopes.
gmail.sendis enough to send;calendar.readonly,gmail.readonly, etc. as needed for each source. Wrong scopes are the most common failure mode. - Ask Claude to dry-run. "Print the email you would send instead of sending it" — useful when you're iterating on a digest prompt.
- Keep secrets out of the prompt. Tokens live on disk or in env vars, not in the Markdown.
Common questions
Can Claude reply to Deck's reply?
It can — but it usually shouldn't. Deck's replies are for you to read. If you want a back-and-forth loop, design it deliberately (e.g. a Claude agent that reads its own inbox), and only after you've watched a few runs by hand.
Does any of this leak my data to Anthropic?
Only the parts you send through Claude. Snapshot pipelines that fetch from Google and email Deck (no Claude in the loop) don't go through Anthropic at all.
Do I have to use Claude Code for the skill recipe?
No. Skills are a Claude-wide format, not a Claude Code feature — the same ~/.claude/skills/*.md file works across Claude Code, Claude Desktop, and Claude.ai (web). Save the skill once and call it from whichever surface you talk to Claude in. If you'd rather not use any Claude app, the Anthropic Agent SDK and the Claude API can wrap the same send pattern.
Next
- Scheduled snapshots — the underlying cron pattern Claude generates code for.
- Webhook-driven context — the event pattern.
- Project structure — how to set the projects up so all this lands cleanly.