Fetch and analyze Readwise reading activity for any date range. Use when user asks about articles saved, highlights created, or most-highlighted content for today, yesterday, last week, last month, or custom date ranges (e.g., "show my Readwise activity from Jan 1-7"). Requires READWISE_API_TOKEN env var. Connects to Readwise Highlights API (v2) and Reader API (v3).
/plugin marketplace add otrebu/agents/plugin install knowledge-work@otrebu-dev-toolsThis skill is limited to using the following tools:
package.jsonpnpm-lock.yamlreferences/api_reference.mdscripts/__tests__/analyze-highlights.test.tsscripts/__tests__/date-ranges.test.tsscripts/analyze-highlights.tsscripts/fetch-todays-activity.tsscripts/readwise-client.tstsconfig.jsonConnect to Readwise APIs to fetch and analyze reading activity.
Fetch saved articles, highlights, and identify most-highlighted content from user's Readwise account for any date range. Uses Readwise v2 Highlights API and v3 Reader API.
Default behavior: Last 7 days (when no date flags specified)
API Token: Set READWISE_API_TOKEN environment variable
export READWISE_API_TOKEN="your_token_here"Dependencies: Installed via pnpm (auto on first use)
All commands support flexible date ranges via flags:
--today: Midnight today → now--yesterday: Yesterday (full day)--last-week: Last 7 days (default when no flags specified)--last-month: Last 30 days--from YYYY-MM-DD: Start date (inclusive)--to YYYY-MM-DD: End date (inclusive)--from 2025-01-01 --to 2025-01-07# Today only
pnpm tsx scripts/fetch-todays-activity.ts articles --today
# Yesterday
pnpm tsx scripts/fetch-todays-activity.ts highlights --yesterday
# Custom range
pnpm tsx scripts/fetch-todays-activity.ts all --from 2025-01-01 --to 2025-01-07
# Default (no flags) = last 7 days
pnpm tsx scripts/fetch-todays-activity.ts all
Note: Reader API doesn't support end dates natively. Articles filtered client-side for accurate date ranges.
Command:
pnpm tsx skills/readwise-api/scripts/fetch-todays-activity.ts all [date-flags]
Output: Four-section analysis w/ insights-first approach:
🧠 Key Learnings
📈 Activity Timeline
📂 By Category
📊 Stats Dashboard
When to use: User asks "Show my Readwise activity", "What have I been learning?", "My reading summary"
Command:
pnpm tsx skills/readwise-api/scripts/fetch-todays-activity.ts learnings [date-flags]
Output: Insights + context only (no timeline/stats)
When to use: User wants just the learnings/insights
Command:
pnpm tsx skills/readwise-api/scripts/fetch-todays-activity.ts timeline [date-flags]
Output: Daily activity visualization + peaks + pattern
When to use: User asks "When am I most active?" or "Show my reading schedule"
Command:
pnpm tsx skills/readwise-api/scripts/fetch-todays-activity.ts categories [date-flags]
Output: Domain distribution w/ visual bars
When to use: User asks "What topics am I focusing on?" or "My reading categories"
Command:
pnpm tsx skills/readwise-api/scripts/fetch-todays-activity.ts dashboard [date-flags]
Output: Stats summary box
When to use: User wants quick metrics only
Command: pnpm tsx skills/readwise-api/scripts/fetch-todays-activity.ts articles [date-flags]
Output: List of saved articles w/ categories, titles, authors, URLs
Command: pnpm tsx skills/readwise-api/scripts/fetch-todays-activity.ts highlights [date-flags]
Output: All highlights grouped by source, showing text + notes
Command: pnpm tsx skills/readwise-api/scripts/fetch-todays-activity.ts top-highlighted [N] [date-flags]
Output: Top N sources ranked by highlight count
pnpm tsx skills/readwise-api/scripts/fetch-todays-activity.ts all
Returns comprehensive analysis: insights, timeline, categories, stats (default = last 7 days)
pnpm tsx skills/readwise-api/scripts/fetch-todays-activity.ts learnings --today
Returns top 5 insights extracted from today's highlights + reading context
pnpm tsx skills/readwise-api/scripts/fetch-todays-activity.ts timeline --last-month
Returns daily activity visualization for last 30 days w/ peak identification
pnpm tsx skills/readwise-api/scripts/fetch-todays-activity.ts categories
Returns domain distribution w/ visual bars (default = last 7 days)
pnpm tsx skills/readwise-api/scripts/fetch-todays-activity.ts dashboard --from 2025-01-01 --to 2025-01-07
Returns metrics dashboard for custom date range
Missing API token: Clear error with link to get token
Rate limits: Automatic 3s delays between paginated requests (20 req/min limit)
Network errors: Graceful failure with error messages via spinner
Empty results: Friendly "no activity yet" messages
Rate Limits: 20 requests/minute per access token
Date Filtering:
Reader API Limitation:
updatedAfter), no end datePagination: Automatically follows next URLs (v2) and pageCursor (v3)
API Client: scripts/readwise-client.ts
ApiResult<T> with success/errorAnalysis: scripts/analyze-highlights.ts
CLI: scripts/fetch-todays-activity.ts
Tests: scripts/__tests__/analyze-highlights.test.ts
Detailed API documentation: references/api_reference.md
Implement GDPR-compliant data handling with consent management, data subject rights, and privacy by design. Use when building systems that process EU personal data, implementing privacy controls, or conducting GDPR compliance reviews.
Create employment contracts, offer letters, and HR policy documents following legal best practices. Use when drafting employment agreements, creating HR policies, or standardizing employment documentation.