Files
last30days-skill/TASKS.md
T
Matt Van Horn 5ca4829be4 Initial commit: last30days skill
Research topics across Reddit + X from the last 30 days using
OpenAI and xAI APIs. Features:
- Auto model selection (GPT-5.x, Grok-3)
- Popularity-aware scoring (relevance + recency + engagement)
- Reddit thread enrichment with real metrics
- Near-duplicate detection
- Multiple emit modes (compact, json, context, path)
- 24h caching with --refresh bypass
- NUX for API key setup
- 87 passing unit tests

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 12:37:31 -08:00

1.4 KiB

last30days Implementation Tasks

Setup & Configuration

  • Create directory structure
  • Write SPEC.md
  • Write TASKS.md
  • Write SKILL.md with proper frontmatter

Core Library Modules

  • scripts/lib/env.py - Environment and API key loading
  • scripts/lib/dates.py - Date range and confidence utilities
  • scripts/lib/cache.py - TTL-based caching
  • scripts/lib/http.py - HTTP client with retry
  • scripts/lib/models.py - Auto model selection
  • scripts/lib/schema.py - Data structures
  • scripts/lib/openai_reddit.py - OpenAI Responses API
  • scripts/lib/xai_x.py - xAI Responses API
  • scripts/lib/reddit_enrich.py - Reddit thread JSON fetcher
  • scripts/lib/normalize.py - Schema normalization
  • scripts/lib/score.py - Popularity scoring
  • scripts/lib/dedupe.py - Near-duplicate detection
  • scripts/lib/render.py - Output rendering

Main Script

  • scripts/last30days.py - CLI orchestrator

Fixtures

  • fixtures/openai_sample.json
  • fixtures/xai_sample.json
  • fixtures/reddit_thread_sample.json
  • fixtures/models_openai_sample.json
  • fixtures/models_xai_sample.json

Tests

  • tests/test_dates.py
  • tests/test_cache.py
  • tests/test_models.py
  • tests/test_score.py
  • tests/test_dedupe.py
  • tests/test_normalize.py
  • tests/test_render.py

Validation

  • Run tests in mock mode
  • Demo --emit=compact
  • Demo --emit=context
  • Verify file tree