DEV Community

Aditya Pandey
Aditya Pandey

Posted on

How to Build an AI Agent That Tracks GitHub Trending, Hacker News, and Reddit

If you're using an AI agent to check GitHub Trending, Hacker News, or a subreddit for new tools on any kind of recurring basis, there's a good chance it's re-exploring each site from scratch every single run. Same navigation, same filters, same cost, every time, like it's never seen the page before.

That's the actual problem worth fixing. Not the checking, the re-checking.

I ran into this doing my own weekly routine: check GitHub Trending for anything new in the agent-tooling space, check Hacker News for anything with real discussion under it, check a couple of subreddits for chatter that hasn't hit either yet, note anything worth a closer look. Repeat next week, from scratch, like none of it happened before.

So I decided to see how much of that routine could just stop repeating itself, using webcmd, the same tool I've been writing about for cutting agent browsing costs.

The idea: an agent that learns each site once, the way you'd normally navigate it, and turns that into a command it can just run again. Not smarter scouting. The same scouting, minus the part where it forgets everything between runs.

Step 1: install webcmd.

npm install -g @agentrhq/webcmd
webcmd skills add
Enter fullscreen mode Exit fullscreen mode

You'll be prompted to pick your agent harness, Claude, Codex, or a custom skills path. This is also the step that actually teaches your agent how to use webcmd in the first place, it's not just installing a binary.

Step 2: teach it GitHub Trending.

First run, just tell it what you're normally looking for:

Use webcmd to check GitHub Trending for repos related to AI agents
and dev tools, sorted by stars gained today. Return name, description,
and star count for anything relevant.
Enter fullscreen mode Exit fullscreen mode

This run looks exactly like a normal browser agent: it goes to the page, works out the filters, reads the results. Nothing saved yet, same as any cold run.

Step 3: teach it Hacker News.

Same pattern, different site:

Use webcmd to search Hacker News for posts about AI agents or dev
tools from the last 24 hours, sorted by points.
Enter fullscreen mode Exit fullscreen mode

Step 4: teach it the subreddit.

Use webcmd to check r/AI_Agents for new posts about tools or launches
from the last day.
Enter fullscreen mode Exit fullscreen mode

Three separate first runs, three separate explorations. This part isn't the interesting bit, it's just webcmd watching how you'd normally do the routine and quietly building a map of each site as you go.

Step 5: chain them.

The actual point is what happens after those three first runs. Instead of the agent re-navigating GitHub, HN, and Reddit from scratch every single time, it now has three learned commands it can call directly, no browser involved, no re-figuring out filters. One script, run on whatever schedule you want, pulls a fresh digest from all three sources in a fraction of the time a full re-exploration would take.

Repo's here don't forget to ⭐️ github.com/agentrhq/webcmd

Top comments (0)