.md file to compare - side-by-side diff against meeting-followup
meeting-followup
description: "Triggers on prompt mention of 'meeting-followup'."
What it does for you
Drafts follow-up emails from your meetings for you to review and send.
What it produces
A recent result, so you can see the kind of work it returns.
loading…
How to get it
These run inside the Snappy workspace. Want this working in your business? I set skills like this up with you, in one focused week.
For developers how this skill is built, graded, and how it runs
at a glance- the short version
what's inside - the parts that make up a skill 2/4 present
A skill is just a few plain-text files. Only the main one is required. The rest are optional, added as the work needs them. This is what the skill is made of; how it runs is just below.
state/skills/meeting-followup/SKILL.md
present
state/lib/meeting-followup.ts
not present
state/bin/meeting-followup/
not present
state/skills/meeting-followup/AGENTS.md
present
how it's graded - what counts as a good run 5 criteria · 3 deterministic · 2 judge
Each row is one thing a good run has to get right. deterministic means a quick check decides, pass or fail. judge means the AI reads the result and rates it. Grading each piece on its own (instead of one overall score) shows exactly where a run fell short, so the fix is obvious.
how it runs - the shared frame every skill uses 5/5 present
Every skill runs the same way. One part does the work, a separate part checks it, and a short loader hands the AI exactly what it needs for the job. Anything this skill doesn't use shows a one-line note saying why, on purpose, not by accident.
state/log/evals.ndjson what it has learned - fixes written back in over time sample
When a run hits something this skill didn't handle, the fix gets written back into the skill so it doesn't happen again. FIXED means it was corrected on the spot. LOGGED means it's queued for a bigger rewrite. Either way, the skill gets a little better and never makes the same mistake twice.
- Loading feedback rows…
how the work flows- who makes it, who checks it
what this step does
what this step does
what this step does
SKILL.md- the skill, written out in plain English
Backed by: state/lib/krisp.ts, state/lib/email.ts, state/lib/drive.ts, state/lib/knowledge.ts, state/lib/dispatch.ts, state/bin/email-send-tick.ts
meeting-followup
Fetches recent meetings from Krisp (headless HTTP, no MCP needed), filters to 1:1 and small-group calls (skips masterminds/community calls), composes a follow-up email per meeting, creates a Gmail draft, and - when the eval gate passes at score=1.0 - schedules the draft for auto-send after a 30-minute veto window so Robert can delete or edit it before it ships.
This is the trust feature: the system either sends the right email or doesn't act. Both must be safe. Partial-pass drafts (eval < 1.0) stay in the inbox for manual review and are never scheduled.
Steps
0. Pre-flight -- verify Krisp OAuth token
Before fetching anything, check that a valid Krisp token exists:
import { env } from "../lib/env.ts";
import * as fs from "fs";
const credsPath = `${process.env.HOME}/.claude/.credentials.json`;
let krispTokenPresent = false;
try {
const creds = JSON.parse(fs.readFileSync(credsPath, "utf8"));
krispTokenPresent = Object.keys(creds).some((k) => k.startsWith("mcpOAuth[\"krisp|"));
} catch (_) {}
if (!krispTokenPresent) {
// Graceful fallback: log a warning and exit without hard-failing.
console.warn("Krisp OAuth token missing from .credentials.json. Run `/mcp krisp` in Claude Code to re-authenticate (~30s browser flow). Skipping meeting-followup.");
append("chain", { run_id, skill: "meeting-followup", action: "skipped", reason: "no-krisp-token" });
score("meeting-followup", run_id, { score: 0.0, primary_issue: "no-krisp-token", drafts_created: 0, drafts_skipped: 0 });
process.exit(0);
}
Token is stored under the key pattern mcpOAuth["krisp|<id>"] in ~/.claude/.credentials.json. It expires approximately every 24 hours. The Claude Code MCP client purges the key on a 401 - headless krisp.ts cannot recover; only the browser OAuth flow restores it.
Heal: run /mcp krisp in any Claude Code session (~30s browser OAuth). Until healed, this skill exits gracefully rather than throwing.
1. Scope -- fetch and filter meetings
import { fetchMeetings, fetchMeetingDocument, type KrispMeeting } from "../lib/krisp.ts";
- Fetch meetings from last
hours_backhours (default 48). - If
fetchMeetingsthrows HTTP 502, treat it as a transient Krisp outage
(Cloudflare bad-gateway - the host mcp.krisp.ai is temporarily unreachable). Log the error, emit score: 0.0, primary_issue: "krisp-502-transient", and exit gracefully. Do NOT mark this as a recipe failure; retry on next scheduled run.
- Skip meetings matching group/community patterns: mastermind, SCC, State Change,
Agentic Building, Build with AI, workshop, webinar, course, training, Claude Meeting (solo Krisp captures), Google Chrome Meeting.
- Extract recipient name from attendees/speakers (excluding Robert). Fall back to
parsing meeting title ("X <> Y", "X and Y", "Name - Session Type").
- Only process meetings with 1-3 other people (not solo or large groups).
2. Gate
- At least one eligible meeting found (otherwise skip with reason).
- Each eligible meeting must have a parseable recipient name.
3. Act -- compose and draft
For each eligible meeting:
- Fetch full meeting document via
fetchMeetingDocument(meeting_id). - Extract key points and action items from the document markdown.
- If no key points found, extract raw transcript and dispatch to
gemini
for summarization (via state/lib/dispatch.ts).
- Look up recipient email via
resolvePerson({ name })fromstate/lib/knowledge.ts. - Search Google Drive for recording + transcript links via
state/lib/drive.ts. - Compose HTML email with: greeting, key points list, next steps list,
Drive links (recording/transcript), sign-off.
- Create Gmail draft via
createEmailDraft()fromstate/lib/email.ts.
If a draft already exists for this meeting (tracked in sent-records), check if it still exists with getEmailDraft() and update with updateEmailDraft() instead of creating a duplicate.
3a. Schedule auto-send (only when eval = 1.0)
After all drafts are created/updated AND the shape gate (Step 4 below) has passed at score=1.0 - every required AND non-required criterion green - schedule each successful draft for future send via scheduleSendDraft() from state/lib/email.ts:
import { scheduleSendDraft } from "../lib/email.ts";
// Default 30-minute veto window. Override per-run via SNAPPY_EMAIL_VETO_MINUTES.
const vetoMinutes = Number(process.env.SNAPPY_EMAIL_VETO_MINUTES ?? "30");
const sendAt = new Date(Date.now() + vetoMinutes * 60 * 1000);
await scheduleSendDraft({
draftId,
sendAt,
account: "work",
recipient: recipientEmail,
subject,
meta: { source: "meeting-followup", meeting_id: meeting.meeting_id },
});
Hard rules - do not violate:
- Only schedule send when eval = 1.0, never on partial success. If any
check failed (speaker labels leaked, missing key points, no recipient, malformed HTML, etc.), leave the draft for Robert to review manually.
- Don't double-schedule.
scheduleSendDraft()is idempotent on
(draftId, status="scheduled") - calling it twice for the same draft while a row is still scheduled returns the existing row without appending a duplicate. Reschedules require cancelScheduledSend() first.
- Veto path is Robert deleting the draft in Gmail. The consumer at
state/bin/email-send-tick.ts calls sendEmailDraft(); if Gmail returns 404 (draft gone), the row is marked status="vetoed" and no error escalates. Robert never has to remember to cancel - deleting is the cancel.
- Kill switch:
SNAPPY_EMAIL_AUTO_SEND_DISABLED=1halts ALL scheduled
sends globally (consumer-side). Use this if you ever need to pause the pipeline without ripping out the agent.
4. Log + eval
import { append } from "../lib/log.ts";
import { score } from "../lib/eval.ts";
append("chain", { run_id, skill: "meeting-followup", action: "drafted", count, skipped });
score("meeting-followup", run_id, {
score: has_key_points && no_speaker_labels ? 1.0 : 0.5,
primary_issue: !has_key_points ? "empty-key-points" : "speaker-label-leak",
drafts_created: count,
drafts_skipped: skipped,
});
Eval
Actor: Krisp HTTP client (fetches meeting data) + dispatch model (summarizes transcripts) + Gmail API (creates drafts). Auditor: Shape gate on the composed email: key points present, no "Speaker 2" labels leaked, recipient resolved, subject non-empty, HTML well-formed, Drive links are clickable <a> tags.
Score convention:
| Outcome | Score |
|---|---|
| All drafts have key points, no speaker labels, valid recipients | 1.0 |
| Some drafts missing key points or have speaker label leaks | 0.5 |
| No drafts created when eligible meetings exist | 0.0 |
| Krisp token missing - graceful skip | 0.0 (primary_issue: no-krisp-token) |
| Krisp HTTP 502 - transient outage, graceful exit | 0.0 (primary_issue: krisp-502-transient) |
Eval criteria (from kernel recipe):
| Check | Required | What it verifies |
|---|---|---|
has_key_points | yes | Email body has bullet points, not just "I'll follow up with details" |
no_speaker_2 | yes | No "Speaker 2/3/..." labels leaked into email body |
has_recipient | no | Recipient name resolved to a real person |
key_points_capped | no | Total <li> tags per email <= 17 (7 key points + 10 action items) |
has_subject | no | Subject line > 10 chars |
is_html | no | Body contains <ul> and </ul> |
drive_links_clickable | no | Drive links use <a href> tags, not raw URLs |
auto_send_scheduled | no | When eval=1.0, every created/updated draft has a row in state/log/email-send-queue.ndjson with status="scheduled" |
Gotchas
- Missing Krisp OAuth token (P0).
mcp.krisp.airequires a browser OAuth token
stored under mcpOAuth["krisp|<id>"] in ~/.claude/.credentials.json. The token expires ~24h and is silently purged by the MCP client on a 401. Symptom: recipe rejected: No Krisp OAuth token in .credentials.json. Fix: run /mcp krisp in Claude Code (~30s). The skill detects this in Step 0 and exits gracefully rather than throwing.
- Krisp HTTP 502 (transient). Krisp's Cloudflare-fronted API occasionally returns
502 Bad Gateway when the backend mcp.krisp.ai host is temporarily unreachable. This is not a skill bug - it resolves on its own within minutes. Log it as primary_issue: krisp-502-transient and rely on the next scheduled run.
- Speaker labels in transcripts. Krisp uses "Speaker 2", "Speaker 3" for
non-primary participants. The summarization step replaces these with the recipient's actual name before dispatching, but verify in the eval.
- Transcript truncation. Long transcripts are truncated to ~8000 chars
before dispatch to keep summarization fast and cheap.
- Drive time-window matching. Drive files are matched to meetings by
embedded timestamp (+/-30 min window). Falls back to name matching if time matching finds nothing.
- Duplicate draft prevention. Tracks sent records in ndjson. If a draft
already exists for a meeting_id, checks if it still exists (not already sent/deleted) before updating. Sent drafts are skipped, not re-created.
- Group call filtering. Patterns are conservative -- some 1:1s with
unusual names may slip through. The recipient-count gate (1-3 others) is the second defense.
- Veto window timing. Default 30 min. Robert deleting the draft in
Gmail before the window closes cancels the send (404-on-send → status vetoed, not error). The consumer (LaunchAgent every 60s) only acts when sendAt <= now, so a draft scheduled at T+30min is safe to delete any time before that.
- Audit trail. Every scheduled send → row in
state/log/email-send-queue.ndjson (status: scheduled / sent / vetoed / failed / cancelled). Every actual send → row in state/log/email-sent.ndjson with the Gmail message id. Transient send errors → row in state/log/email-send-errors.ndjson with retry_count; the consumer retries up to 3 times before marking the queue row failed.
- Kill switch.
SNAPPY_EMAIL_AUTO_SEND_DISABLED=1in the consumer's
environment halts ALL scheduled sends globally; queue rows stay scheduled and resume the moment the env var is unset.
Graduation
Prose until the gather/compose/deliver pipeline has been executed twice without edits. Then graduate by extracting the runner into a script under the existing state/lib/krisp.ts + state/lib/email.ts surfaces.
Rubric
criteria:
- name: krisp_token_present
kind: deterministic
check: "The log output or `~/.claude/.credentials.json` confirms the presence of a valid Krisp OAuth token or a graceful skip due to its absence."
- name: eligible_meetings_processed
kind: deterministic
check: "The skill log indicates that eligible meetings were identified and attempted to be processed, or a valid reason for skipping was logged."
- name: drafts_created_or_updated
kind: deterministic
check: "The `state/lib/log.ts` output for the skill run contains `action: \"drafted\"` with `drafts_created` > 0 or `updateEmailDraft()` was called."
- name: no_speaker_labels_leaked
kind: judge
check: "No Gmail draft created by the skill contains 'Speaker 1', 'Speaker 2', etc., identifiable as Krisp speaker labels."
- name: key_points_present_and_relevant
kind: judge
check: "Each Gmail draft contains a bulleted list of key points that accurately summarize the meeting's content."AGENTS.md- what the AI loads when this skill comes up
meeting-followup - loader
Per-turn rules for the meeting-followup skill. Full reference: state/skills/meeting-followup/SKILL.md. Do not skip these.
Backed by: state/lib/krisp.ts, state/lib/email.ts, state/lib/drive.ts, state/lib/knowledge.ts, state/lib/dispatch.ts, state/bin/email-send-tick.ts, state/bin/meeting-followup/run.ts, state/bin/meeting-followup-run.ts (cron variant).
Critical Rules
- AUTO-SEND ONLY ON EVAL = 1.0. Schedule via
scheduleSendDraft()only when every shape-gate criterion (required AND non-required) is green. Partial-pass drafts (eval < 1.0) stay in the inbox for manual review, never scheduled. - DEFAULT 30-MINUTE VETO WINDOW.
sendAt = now + (SNAPPY_EMAIL_VETO_MINUTES ?? 30) * 60_000. Robert deleting the draft in Gmail before the window closes cancels the send - the consumer marks itvetoed(Gmail 404), no error escalates. - KILL SWITCH:
SNAPPY_EMAIL_AUTO_SEND_DISABLED=1halts ALL scheduled sends globally. Set on consumer (state/bin/email-send-tick.ts) to pause without unwiring the agent. - AUDIT TRAIL is non-optional. Every scheduled send →
state/log/email-send-queue.ndjson(status: scheduled / sent / vetoed / failed / cancelled). Every actual send →state/log/email-sent.ndjsonwith the Gmailsent_message_id. - ALWAYS replace Krisp
Speaker 2 / Speaker 3labels with the recipient's actual name BEFORE the dispatch summarization step - leaked speaker labels fail theno_speaker_2shape gate (which would block auto-send). - ALWAYS skip group/community patterns:
mastermind,SCC,State Change,Agentic Building,Build with AI,workshop,webinar,course,training,Claude Meeting(solo Krisp captures),Google Chrome Meeting. - Only process meetings with 1-3 other people - solo or large group → skip.
- Idempotent draft handling: check sent-records for an existing draft per
meeting_id; ifgetEmailDraft()confirms it still exists,updateEmailDraft()rather than creating a duplicate.scheduleSendDraft()is idempotent on(draftId, status="scheduled")- calling twice returns the existing row without duplicating. - ALWAYS resolve recipient via
resolvePerson({ name })fromstate/lib/knowledge.tsbefore composing.
Commands
| ui dashboard | state/skills/meeting-followup/resources/ui.openui | |invoke (cron): npx tsx state/bin/meeting-followup-run.ts |invoke (manual): npx tsx state/bin/meeting-followup/run.ts |fetch meetings: import { fetchMeetings, fetchMeetingDocument } from "../lib/krisp.ts" |compose+draft: import { createEmailDraft, getEmailDraft, updateEmailDraft } from "../lib/email.ts" |schedule send: import { scheduleSendDraft, cancelScheduledSend, sendEmailDraft } from "../lib/email.ts" |drive links: import * as drive from "../lib/drive.ts" |summarize transcript: state/lib/dispatch.ts → gemini |consumer (cron): npx tsx state/bin/email-send-tick.ts # LaunchAgent every 60s |cancel a queued send: npx tsx state/lib/email.ts cancel-send <draftId> |send a draft NOW: npx tsx state/lib/email.ts send-draft <draftId> [account] |eval log: state/log/evals.ndjson (skill: "meeting-followup") |queue: state/log/email-send-queue.ndjson (status: scheduled/sent/vetoed/failed/cancelled) |sent log: state/log/email-sent.ndjson (one row per actual send with sent_message_id)
Pre-flight (Step 0)
Before fetching anything, verify Krisp OAuth state:
- Check
~/.claude/.credentials.jsonformcpOAuth["krisp|<id>"]. The token expires ~24h and Claude Code's MCP client purges the entry on a 401. - Token missing/expired → log a warn line, write an eval row with
score: 0.0andprimary_issue: "no-krisp-token", exit gracefully. Heal: run/mcp krispin any Claude Code session (~30s browser flow). Headlesskrisp.tscannot recover on its own. - Krisp HTTP 502 → Cloudflare bad-gateway transient. Score
0.0withprimary_issue: "krisp-502-transient", retry on next cron tick. Do not escalate to friction.
Install (LaunchAgent - once per machine)
cp state/launchd/com.snappy.email-send-tick.plist ~/Library/LaunchAgents/
launchctl load ~/Library/LaunchAgents/com.snappy.email-send-tick.plist
# Verify it's running every 60s:
launchctl list | grep email-send-tick
tail -f state/log/email-send-tick.launchd.log
OpenUI Resource
- Skill-owned OpenUI Lang resource:
state/skills/meeting-followup/resources/ui.openui. Read it before rendering or editing this skill's generated component surface. - Treat this resource as a first-class artifact of the skill, not a generic chat response. Improve it when the skill's user-facing output needs to become richer.
- System resources compose OpenUI primitives and inherit SnappyChat tokens. Use
ui_contract: brandedin SKILL.md only for deliberate platform or client visuals.
Known Pitfalls
- Long transcripts truncate to ~8000 chars before dispatch - keep summarization fast/cheap.
- Drive matches by embedded timestamp (±30 min); falls back to name match if no time hit.
- Recipient parsing falls back to title patterns
"X <> Y","X and Y","Name - Session Type"if attendees lack a non-Robert name. - Group-call filters are conservative - the 1-3-others recipient-count gate is the second defense.
- Total
<li>per email caps at 17 (7 key points + 10 action items); use clickable<a href>tags for Drive links, not raw URLs. state/bin/meeting-followup/run.tscallsscheduleSendDraftONLY whenfinalScore === 1.0ANDcreated+updated > 0. Eval < 1.0 → no schedule, draft stays in inbox.scheduleSendDraft()is idempotent on(draftId, status="scheduled"). To reschedule, callcancelScheduledSend(draftId)first, then schedule again.
Self-Test
An agent reading this should correctly:
- [ ] Schedule auto-send only when
eval === 1.0(never on partial pass)? - [ ] Use a 30-minute veto window by default (override via
SNAPPY_EMAIL_VETO_MINUTES)? - [ ] Replace
Speaker 2/Speaker 3with the resolved recipient name before summarization? - [ ] Skip a meeting matching
mastermindorBuild with AIin the title? - [ ] Treat a Gmail 404 from the consumer as a successful veto (status
vetoed), not an error?
Self-report
If this loader fell short, append a line:
echo "[$(date -u +%FT%TZ)] meeting-followup: <what was missing>" >> state/log/loader-feedback.log
Known Pitfall (manual append 2026-04-19, area=krisp-token-expired)
Claude Code's MCP client purges mcpOAuth["krisp|<id>"] from ~/.claude/.credentials.json on a 401, ~24h cycle. Headless krisp.ts cannot recover - only browser OAuth restores it. Symptom: Krisp HTTP 401 in recipe stderr, friction area=krisp-token-expired in breakage-report. Heal: run /mcp krisp in any Claude Code session (~30s browser flow). Structural fix needed: detached cron-side token store OR pre-expiry warning at expiresAt - 6h.
<!-- kernel-ok: historical attribution for the PID-loader pattern. -->
Self-correcting loader (PID feedback)
This is the rule that makes loaders learn. Ported from snappy-kernel, where it demonstrably worked: the snappy-dom-cartographer skill mapped Skool admin UI once, every later ship-agent inherited the full map for free.
Before you finish, do two things:
1. Fix gaps (P - proportional). MANDATORY. If this loader didn't cover your case - if you had to read another file, run an undocumented command, work around a wrong selector, or discover a quirk - you MUST attempt an Edit to this AGENTS.md before you log.
- Default action: edit this file. Surgical. Add the missing line, table
row, or code example where it belongs. No restructuring.
- Only
LOGGEDis allowed when: the fix needs >10 lines, spans multiple
files, or requires a structural rewrite. In that case the state/regen/drain.sh queue picks it up asynchronously.
- "I didn't have time" / "it's minor" / "the next agent will figure it out"
are NOT valid reasons. Minor gaps compound - that's the whole point of this loop.
- Concrete example of a valid P-fix: discover
agent-browser screenshot
takes path positionally not as --output <path>. One line in a table. Edit it in. Do not just log it.
- The goal: the next agent never has to leave the loader.
2. Log the result.
echo "[$(date -u +%FT%TZ)] meeting-followup: <what was missing or fixed> [FIXED|LOGGED] action_kind=<kind>" >> state/log/loader-feedback.log
<slug>MUST be the literal folder name of this loader
(state/skills/<slug>/AGENTS.md). The class token between [ts] and : is the producer slug, the writeback class, AND the grade class - they must be equal so state/lib/controller-tune.ts can pair the brief.
FIXED= you patched this loader inline (P-fix).LOGGED= too large for inline; the PostToolUse enqueue + Stop-hook drain
will rewrite the loader from scratch on next session-end.
action_kindis the SECOND pairing predicate (added 2026-04-27, task #327).
Pick the value that describes what you actually did - same slug, different action_kind means the writeback satisfies a different brief layer:
shape-ok- only frontmatter-shape verification passed (rare from
a human; usually emitted by the lint, not a loader echo)
skill-ran- the skill ran end-to-end and an eval row landed
in state/log/evals.ndjson
loader-rewritten- you EDITED this AGENTS.md inline (the FIXED case),
OR the regen drain rewrote it
pattern-elevated- you promoted a recurring failure to a Critical Rule
(rule fix or new-skill scaffold) If you LOGGED (couldn't fix inline), omit action_kind - the inferrer will pick it up from your body keywords.
Do not skip this. Every agent run must leave the system better than it found it. The loader is the setpoint; you are the sensor; the gap is the error signal; closing the gap is the correction.
api.ts- the code it can call
⚠ no api.ts - this skill has no typed action surface
scripts- helper scripts it can run
prose-only skill - 5 inline code blocks live in SKILL.md above (no state/bin/ sidecar yet).
how we check it- the checks, plus the last 10 runs
| timestamp | verb | score | primary_issue | artifact |
|---|---|---|---|---|
| 2026-05-03 16:01Z | - | 0.00 | - | - |
| 2026-05-03 08:02Z | - | 0.00 | - | - |
| 2026-05-02 20:02Z | - | 0.50 | - | - |
| 2026-05-02 16:01Z | - | 1.00 | - | - |
| 2026-05-02 08:00Z | - | 0.00 | - | - |
| 2026-05-02 04:01Z | - | 0.00 | - | - |
| 2026-05-02 04:01Z | - | 0.00 | - | - |
| 2026-05-01 20:01Z | - | 1.00 | - | - |
| 2026-05-01 16:01Z | - | 1.00 | - | - |
| 2026-05-01 08:02Z | - | 0.00 | - | - |