Last30Days is an agent skill that treats search as a parallel data orchestration problem. It queries Reddit, X, YouTube, TikTok, Hacker News, Polymarket, arXiv, Techmeme, Instagram, and Bluesky in one pass, scores results by engagement and real-money predictions, then hands a ranked list to an LLM for synthesis. The skill runs in 50+ agent hosts (Claude Code, Codex, Cursor, Copilot, Gemini CLI) via the Agent Skills standard, and it ships with a 30-second setup wizard that handles OAuth flows and API key rotation without blocking the baseline workflow.
This is not a web scraper with an LLM wrapper. It is a production-grade orchestration layer that unifies heterogeneous data sources (social platforms, prediction markets, academic indexes) into a single queryable interface. The scoring algorithm combines upvotes, likes, view counts, and Polymarket odds into a unified relevance signal that agents can trust without manual tuning.
Why This Matters
Most agent research workflows hit one of two failure modes: they scrape Google and summarize SEO spam, or they call a single API (Reddit, X) and miss signal from other platforms. Last30Days solves the orchestration problem by running parallel queries across 10+ sources, handling rate limits and cascading failures gracefully, and normalizing engagement metrics into a single score.
The skill uses real-money Polymarket predictions as a signal alongside social engagement. When people bet their own capital on an outcome, that signal carries more weight than upvotes or likes. The scoring function treats Polymarket odds as a prior and adjusts based on engagement velocity across platforms.
Zero-config baseline: Reddit, Hacker News, Polymarket, and GitHub work immediately without API keys. The setup wizard unlocks X, YouTube, TikTok, arXiv, Techmeme, Instagram, and Bluesky in 30 seconds by walking through OAuth flows and storing credentials in a local config file.
Architecture
The skill is a Python package that exposes a single command (/last30days <query>) to agent hosts. Under the hood, it orchestrates parallel API calls, normalizes responses, scores results, and returns a ranked list of URLs with metadata.
Orchestration Flow
- Query dispatch: The skill parses the user query and dispatches parallel requests to all configured platforms. Each platform adapter runs in its own async task.
- Rate limit handling: Each adapter tracks its own rate limit state and backs off exponentially when it hits a 429. The orchestrator does not block on slow or rate-limited platforms.
- Response normalization: Each adapter returns a list of
SearchResultobjects with fields liketitle,url,score,engagement_metrics, andtimestamp. The orchestrator merges these lists. - Scoring: The scoring function computes a weighted sum of engagement metrics (upvotes, likes, views, comments) and Polymarket odds. The weights are tunable but default to a balanced mix.
- LLM synthesis: The ranked list is passed to the agent’s LLM context. The agent synthesizes a summary based on the top N results.
Platform Adapters
Each platform has its own adapter class that implements a standard interface:
search(query: str, limit: int) -> List[SearchResult]authenticate() -> boolget_rate_limit_status() -> RateLimitStatus
Adapters handle platform-specific quirks like pagination, OAuth token refresh, and response schema mapping. The Reddit adapter uses PRAW, the X adapter uses Tweepy, the YouTube adapter uses the official Google API client, and so on.
State Management
The skill stores configuration and credentials in a local JSON file (~/.last30days/config.json). The setup wizard writes to this file during onboarding. Each agent host reads from the same config file, so you authenticate once and the skill works across all hosts.
The config file includes:
- API keys and OAuth tokens for each platform
- Rate limit state (last request timestamp, remaining quota)
- Scoring weights (tunable per-platform)
- Feature flags (enable/disable specific platforms)
The skill does not store query history or result caches. Each query is stateless.
Scoring Algorithm
The scoring function combines engagement metrics and Polymarket odds into a single relevance score. The formula is:
score = (upvotes * w_upvotes + likes * w_likes + views * w_views + comments * w_comments) * recency_decay + polymarket_odds * w_polymarket
Where:
w_upvotes,w_likes,w_views,w_commentsare platform-specific weightsrecency_decayis an exponential decay function based on post age (newer posts score higher)polymarket_oddsis the probability of the event occurring (0-1 scale)w_polymarketis the weight assigned to real-money predictions
The default weights are tuned to balance social engagement and prediction market signal. You can override them in the config file.
Security Boundaries
The skill runs in the agent host’s process and inherits its security context. API keys and OAuth tokens are stored in plaintext in the config file. The setup wizard does not encrypt credentials because the threat model assumes the agent host is running on a trusted machine.
If you run the skill in a shared environment (CI, cloud notebook), you should:
- Store credentials in environment variables instead of the config file
- Use a secrets manager (AWS Secrets Manager, HashiCorp Vault) to rotate keys
- Disable platforms that require OAuth (X, YouTube) and rely on zero-config platforms (Reddit, HN, Polymarket)
The skill does not send queries or results to a remote server. All data flows through the agent host’s LLM context.
Deployment Shape
The skill is distributed as a Python package on PyPI and as an Agent Skills plugin. You install it once and it works across all agent hosts that support the Agent Skills standard.
Installation Options
Claude Code (recommended):
/plugin marketplace add mvanhorn/last30days-skill
/plugin install last30days
Claude Code auto-updates the skill when a new version is published.
Codex, Cursor, Copilot, Gemini CLI:
npx skills add mvanhorn/last30days-skill -g
The -g flag installs globally for your user. Drop it to scope per-project.
Manual install:
pip install last30days-skill
Then configure your agent host to load the skill from the installed package.
Setup Wizard
The first time you run /last30days, the skill checks for a config file. If it does not exist, the wizard prompts you to authenticate with each platform. The wizard handles OAuth flows by opening a browser window and listening for the callback on a local HTTP server.
The wizard flow:
- Prompt for Reddit API key (optional, works without it)
- Prompt for X OAuth (opens browser, waits for callback)
- Prompt for YouTube API key (optional)
- Prompt for TikTok API key (optional)
- Prompt for Polymarket API key (optional, works without it)
- Write config file to
~/.last30days/config.json
The wizard takes 30 seconds if you have all keys ready. If you skip a platform, the skill disables it and continues with the others.
Observability
The skill logs to stdout using Python’s logging module. You can set the log level in the config file or via an environment variable (LAST30DAYS_LOG_LEVEL).
Log events include:
- Query dispatch (which platforms are queried)
- Rate limit hits (which platform, how long to wait)
- API errors (which platform, error message)
- Scoring results (top N URLs with scores)
The skill does not expose metrics endpoints or traces. If you need observability in production, wrap the skill in a monitoring layer (OpenTelemetry, Datadog) and instrument the platform adapters.
Failure Modes
The skill is designed to degrade gracefully when platforms fail. If Reddit returns a 500, the orchestrator logs the error and continues with the other platforms. The final result set includes data from all successful platforms.
Common failure modes:
| Failure | Behavior | Mitigation |
|---|---|---|
| Rate limit hit | Adapter backs off exponentially, retries after delay | Tune rate limit buffer in config |
| OAuth token expired | Adapter fails, logs error, disables platform for this query | Re-run setup wizard to refresh token |
| API schema change | Adapter fails to parse response, logs error, returns empty list | Update skill to latest version |
| Network timeout | Adapter retries 3 times with exponential backoff, then fails | Increase timeout in config |
| Polymarket API down | Scoring function ignores Polymarket signal, relies on social engagement | No mitigation needed (graceful degradation) |
The skill does not retry failed queries automatically. If a platform fails, you re-run the query or disable the platform in the config file.
Trade-Offs
Pros:
- Unified interface for 10+ platforms (Reddit, X, YouTube, TikTok, HN, Polymarket, arXiv, Techmeme, Instagram, Bluesky)
- Real-money prediction market signal (Polymarket odds) alongside social engagement
- Zero-config baseline (Reddit, HN, Polymarket, GitHub work without API keys)
- 30-second setup wizard for OAuth and API keys
- Works across 50+ agent hosts via Agent Skills standard
Cons:
- Plaintext credential storage (not suitable for shared environments without additional security)
- No built-in caching (every query hits all platforms, can be slow or expensive)
- Scoring weights are global (cannot tune per-query or per-platform dynamically)
- No support for custom platforms (you cannot add a new data source without forking the repo)
- OAuth token refresh is manual (you re-run the setup wizard when tokens expire)
Code Example: Custom Scoring Weights
If you want to tune the scoring function, edit the config file:
{
"scoring": {
"weights": {
"upvotes": 1.0,
"likes": 0.8,
"views": 0.5,
"comments": 1.2,
"polymarket": 2.0
},
"recency_decay_hours": 24
}
}
The recency_decay_hours parameter controls how quickly older posts lose relevance. A value of 24 means posts older than 24 hours start to decay exponentially.
Technical Verdict
Use Last30Days when:
- You need multi-platform research workflows that unify social, prediction markets, and academic sources
- You want engagement-based ranking that reflects real user behavior (upvotes, likes, real-money bets)
- You run agent workflows in trusted environments (local machine, private cloud) where plaintext credential storage is acceptable
- You want zero-config baseline functionality (Reddit, HN, Polymarket) without API keys
Avoid Last30Days when:
- You need encrypted credential storage or secrets rotation (use a secrets manager instead)
- You need per-query caching or result deduplication (add a caching layer on top)
- You need to add custom data sources without forking the repo (the skill is not plugin-extensible)
- You run in shared or untrusted environments where plaintext credentials are a risk
The skill is production-grade orchestration infrastructure for agent-driven research. It solves the parallel API call problem, handles rate limits gracefully, and normalizes heterogeneous data sources into a single queryable interface. The scoring algorithm is simple but effective: it combines social engagement and real-money predictions into a unified relevance signal that agents can trust.