last30days-agent-research
Recent-web research skill for Codex and other terminal agents. It searches the last 30 days across Reddit, X, YouTube, Hacker News, Polymarket, and the web, then synthesizes grounded briefings with citations and source summaries.
This repository is an independently maintained derivative of mvanhorn/last30days-skill. It keeps upstream credit explicit, but it is published as a standalone repo because this version includes Windows-first setup, different backend choices, and additional integration/testing work.
What This Version Changes
- Windows-first setup and usage guidance
- Free Reddit retrieval via
rdt-cli
- Windows X/Twitter backend via
twitter-cli
- Firefox cookie-based X auth workflow
- Exa and Brave web search support documented and configured
- UTF-8 fixes for Windows subprocess and output handling
- improved Reddit filtering and branded-comparison suppression
- additional regression tests around Reddit/X/config/encoding
Who This Is For
- Codex users who want a local research skill
- OpenClaw, Claude Code, or other terminal-agent users who can run local scripts
- people who want recent-discussion research without relying on a single web search provider
Repository Layout
Installation
1. Clone the repository
git clone https://github.com/kiemul/last30days-agent-research.git "$HOME\\.codex\\skills\\last30days-skill"
If you want to use it outside Codex, clone it anywhere convenient instead.
2. Install required runtime tools
This skill expects:
Recommended free backends for this Windows-oriented version:
rdt-cli for Reddit
twitter-cli for X/Twitter
- Firefox logged into
x.com
Examples:
uv tool install rdt-cli
uv tool install twitter-cli
winget install --id Mozilla.Firefox --exact
winget install --id yt-dlp.yt-dlp --exact
If yt-dlp is already available globally, do not reinstall it.
3. Configure environment
Create:
~/.config/last30days/.env
Minimal recommended config for the free Windows stack:
SETUP_COMPLETE=true
FROM_BROWSER=auto
EXA_API_KEY=your_exa_key
BRAVE_API_KEY=your_brave_key
INCLUDE_SOURCES=
Notes:
FROM_BROWSER=auto is used for browser-derived auth where supported.
- In this maintained variant, Windows X/Twitter works best through
twitter-cli with Firefox logged into x.com.
SCRAPECREATORS_API_KEY is optional. It improves Reddit comment enrichment and adds TikTok/Instagram, but it is not required.
4. Log into Firefox for X/Twitter
Open Firefox and sign into https://x.com.
Then run:
cd "$HOME\\.codex\\skills\\last30days-skill"
python .\scripts\last30days.py --diagnose
You want to see a working X backend in diagnostics.
Codex Installation
Clone into:
%USERPROFILE%\.codex\skills\last30days-skill
Then restart Codex.
The main Codex entrypoint is:
The open variant is also included:
No extra Codex skills are required to use this repository.
Other Agent Installation
Claude Code / OpenClaw style skill install
Clone the repo into the agent's skill directory and point the agent at the relevant SKILL.md.
Typical locations:
~/.claude/skills/last30days-skill
~/.agents/skills/last30days-skill
~/.codex/skills/last30days-skill
Standalone CLI usage
The repository also works without a skill host:
cd "$HOME\\.codex\\skills\\last30days-skill"
python .\scripts\last30days.py "best current memory tools for AI agents" --quick --emit compact
Examples:
python .\scripts\last30days.py --diagnose
python .\scripts\last30days.py "Codex vs Claude Code" --deep
python .\scripts\last30days.py "Brave Search API vs Exa for AI agents" --quick --search reddit,x,web
Backend Behavior In This Maintained Variant
Reddit
- preferred free backend:
rdt-cli
- current strength: broad recent retrieval plus optional thread/comment enrichment
- current limitation: broad-topic Reddit quality is still weaker than web/X for some queries
X/Twitter
- preferred Windows backend:
twitter-cli
- practical auth path: Firefox logged into
x.com
- Bird remains fallback detail in some code paths, but is not the preferred Windows backend here
Web Search
Exa is the preferred semantic-retrieval backend
Brave is a good fallback/general web backend
Troubleshooting
WARNING: ... .env is readable by other users