School Action Extractor
Uses Claude AI to intelligently extract parent actions from school emails, classify urgency, and identify deadlines.
Invocation
code
school:extract-actions --email-data <json>
Process
- •Receive email data (body + attachment text)
- •Build prompt with context (child, school, date)
- •Call Claude Sonnet to extract actions
- •Parse JSON response
- •Classify urgency (HIGH/MEDIUM/LOW)
- •Return structured action list
Action Structure
Each extracted action contains:
json
{
"description": "What needs to be done",
"child": "Elodie",
"deadline": "2026-02-08",
"urgency": "MEDIUM",
"type": "PERMISSION",
"source_text": "Quote from email"
}
Urgency Classification
- •HIGH: Deadline within 48 hours OR explicit urgent language
- •MEDIUM: Deadline 3-7 days away OR requires action (forms, payments)
- •LOW: Deadline > 7 days OR informational
Action Types
- •FORM - Form to fill out
- •PAYMENT - Payment required
- •PERMISSION - Permission slip
- •REPLY - Response needed
- •EVENT - Calendar event
- •INFO - Informational only
- •OTHER - Other action type
AI Prompt
The AI is given:
- •Email metadata (from, subject, date, child)
- •Email body text
- •Attachment text (from PDFs)
- •Today's date for deadline context
- •List of urgent keywords
It returns ONLY valid JSON array of actions.
Usage
This skill is typically called automatically by the email processor. For testing:
bash
cd ~/clawd/projects/school-email-automation python -m school_automation.action_extractor.extractor --test
Requirements
- •ANTHROPIC_API_KEY environment variable
- •anthropic library installed