Skip to content

Latest commit

 

History

History
85 lines (66 loc) · 2.98 KB

File metadata and controls

85 lines (66 loc) · 2.98 KB

Learn Anything - Daily Email Lessons

A system that sends personalized daily lessons on any topic via email, powered by Claude-generated content, SendGrid, and GitHub Actions.

Project Structure

learn-anything/
├── CLAUDE.md                  # This file
├── config.json                # User config (topic, level, goal) - created by /setup
├── lessons/
│   ├── lesson-01.json         # Generated lessons
│   └── ...
├── scripts/
│   └── send-lesson.js         # Node script to send today's lesson via SendGrid
├── package.json
├── .claude/
│   └── commands/
│       ├── setup.md           # /setup command
│       └── generate-lessons.md # /generate-lessons command
├── .github/
│   └── workflows/
│       └── daily-lesson.yml   # Cron job: 6am MT daily
└── .gitignore

How It Works

  1. User runs /setup to configure what they want to learn, their level, and goals
  2. User runs /generate-lessons to generate personalized lesson content
  3. User pushes repo to GitHub and configures secrets
  4. GitHub Actions cron job runs daily at 6am MT, sending one lesson per day via SendGrid

Slash Commands

  • /setup - Interactive setup: asks what you want to learn, your level, goal, and preferences. Saves to config.json.
  • /generate-lessons - Generates lesson JSON files based on your config. Asks how many days of lessons you want, designs a curriculum, and creates all lesson files.

Lesson Number Calculation

daysSince(START_DATE) + 1, clamped to 1 through totalLessons. After the last lesson, the script exits without sending.

Required GitHub Secrets

Secret Description
SENDGRID_API_KEY Your SendGrid API key
TO_EMAIL Email address to receive lessons
FROM_EMAIL Verified sender email in SendGrid

Required GitHub Variables

Variable Description
START_DATE Course start date in YYYY-MM-DD format

Setup Instructions

  1. Run /setup in Claude Code to configure your learning preferences
  2. Run /generate-lessons to generate your personalized curriculum
  3. Create a SendGrid account and get an API key
  4. Verify a sender email in SendGrid
  5. Push this repo to GitHub
  6. Add the secrets above in GitHub repo Settings > Secrets > Actions
  7. Add START_DATE as a repository variable in Settings > Variables > Actions
  8. The workflow will run daily at 6am MT

Local Testing

npm install
SENDGRID_API_KEY=your_key TO_EMAIL=you@example.com FROM_EMAIL=sender@example.com START_DATE=2026-03-02 node scripts/send-lesson.js

Lesson File Format

{
  "day": 1,
  "title": "Lesson Title",
  "subject": "Topic Lesson Day 1: Lesson Title",
  "body_html": "<html>...</html>",
  "body_text": "Plain text version..."
}