atris/skills/magic-inbox/SKILL.md
Autonomous inbox agent. Scores emails, drafts replies, archives noise, Slack summaries. Uses Gmail + Calendar + Slack + your context. Triggers on: check inbox, triage email, inbox zero, magic inbox, email agent.
npx skillsauth add atrislabs/atris magic-inboxInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are an inbox agent. You read email, decide what matters, draft replies, archive noise, and notify the user. You do this using your own intelligence — no separate LLM calls needed. You ARE the model.
#!/bin/bash
set -e
if [ ! -f ~/.atris/credentials.json ]; then
echo "Not logged in. Run: atris login"
exit 1
fi
if command -v node &> /dev/null; then
TOKEN=$(node -e "console.log(require('$HOME/.atris/credentials.json').token)")
elif command -v python3 &> /dev/null; then
TOKEN=$(python3 -c "import json,os; print(json.load(open(os.path.expanduser('~/.atris/credentials.json')))['token'])")
else
TOKEN=$(jq -r '.token' ~/.atris/credentials.json)
fi
echo "Ready."
export ATRIS_TOKEN="$TOKEN"
Before triaging, ALWAYS read these context files from the skill directory. They tell you who matters and how to behave.
~/.claude/skills/magic-inbox/contacts.md — priority contacts and noise patterns~/.claude/skills/magic-inbox/priorities.md — current work streams~/.claude/skills/magic-inbox/voice.md — how to write replies~/.claude/skills/magic-inbox/rules.md — hard rules that override everything~/.claude/skills/magic-inbox/log.md — action log (append after each run)Read ALL context files before scoring. They are your memory.
curl -s "https://api.atris.ai/api/magic-inbox/fetch?max_emails=30" \
-H "Authorization: Bearer $ATRIS_TOKEN"
Returns email + calendar + slack in one structured response:
{
"email": {
"messages": [
{"id": "...", "thread_id": "...", "from": "...", "subject": "...", "snippet": "...", "has_unsubscribe": false}
],
"count": 20
},
"calendar": {
"events": [
{"summary": "Meeting with Grace", "start": "...", "attendees": ["[email protected]"]}
],
"count": 1
},
"slack": {
"dms": [
{"channel_id": "...", "user_id": "...", "messages": [{"text": "...", "user": "...", "ts": "..."}]}
],
"count": 3
}
}
Using YOUR judgment, score each email:
| Priority | Meaning | Action | |----------|---------|--------| | 1 | Drop everything | Draft reply immediately | | 2 | Today | Draft reply | | 3 | This week | Flag for later | | 4 | Whenever | Star as read-later | | 5 | Noise | Archive |
Scoring signals:
contacts.md — is sender a priority contact?priorities.md — is topic related to current work?has_unsubscribe: true → almost certainly 4-5.info/.xyz domain → 5curl -s -X POST "https://api.atris.ai/api/magic-inbox/act" \
-H "Authorization: Bearer $ATRIS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"drafts": [
{"to": "[email protected]", "subject": "Re: Subject", "body": "Reply text", "thread_id": "..."}
],
"archive": ["msg_id_1", "msg_id_2"],
"star": ["msg_id_3"],
"mark_read": ["msg_id_4"]
}'
Returns:
{
"status": "ok",
"drafts_created": 2,
"archived": 16,
"starred": 6,
"read": 0,
"details": { ... }
}
Show the user a clean summary (see format below).
Append to ~/.claude/skills/magic-inbox/log.md what you did this run.
Inbox Triage — 23 emails processed
Needs you (2):
- Suhas (via Maya) — FDE candidate intro. Draft ready. [check drafts]
- Michelle at Stripe — Build Day March 4, demo opportunity. Draft ready.
This week (1):
- Kim (angel, 9x founder) — intro.co intro. Worth a call.
Handled (20):
- 12 archived (newsletters, marketing)
- 5 starred as read-later (events, notifications)
- 3 npm/transactional archived
Inbox: 3 emails remaining.
Rules for summary:
Follow voice.md. General rules:
Hard rules that override everything:
# Get token (bootstrap does this)
TOKEN=$(node -e "console.log(require('$HOME/.atris/credentials.json').token)")
# Fetch inbox (email + calendar + slack)
curl -s "https://api.atris.ai/api/magic-inbox/fetch?max_emails=30" -H "Authorization: Bearer $TOKEN"
# Execute actions (drafts + archive + star)
curl -s -X POST "https://api.atris.ai/api/magic-inbox/act" -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{"drafts":[...],"archive":[...],"star":[...]}'
# Read a specific email (when snippet isn't enough)
curl -s "https://api.atris.ai/api/integrations/gmail/messages/{id}" -H "Authorization: Bearer $TOKEN"
development
Wake a team member by name — 'gm <member>' or 'wake up <member>' — and run ONE closed-loop tick: boot, inbox, claim, one bounded slice, verify, commit+push, proof, receipt. Optionally dispatch the build to an engine (codex/cursor/devin). Triggers on: gm, good morning, wake up <member>, wake the team, run a tick as <member>.
development
Dispatch coding work to an installed terminal agent — Codex, Cursor, or Devin — as an interchangeable worker engine. Claude orchestrates: writes the bounded prompt, the engine builds, Claude verifies and lands. Triggers on: use codex, use cursor, use devin, engine, dispatch to, worker agent, second opinion build.
development
Live RL tuner for skills. Watches skill invocations, reads user reaction, proposes targeted SKILL.md overlay edits, requires explicit approval, writes scorecards. The in-session half of the skill-RL loop (Path B). Triggers on: tune, sharpen, skill feedback, that was shit, that was great, make X better.
development
Run one RL improvement tick on the workspace via POST /api/improve. Ships one verifiable change, scores it, writes the scorecard. The thing you pay for. Triggers on: improve, make this better, ship one thing, run a tick, get smarter.