Learn AI
    navigate Enter open Esc close Open with K or /

    30 min

    Build · A scheduled watcher

    A Claude Cowork agent that scans a feed on a schedule and pings you when something matters. ~30 min.

    You'll build a small agent that watches a feed, scores new items, and pings you when one matters. Claude Cowork plans it, writes it, runs it, and schedules itself — you stay in the loop on every step, but you don't write the code. Finished result: a watcher you actually use, on your machine, on your schedule.

    Why this one. The shape — pick a feed, score new items, alert when a threshold trips — works for trade alerts, job postings, GitHub releases, RSS reading lists, your own server logs. Once you know how to build one, every "I should be checking X" becomes a 30-minute project.
    0 of 9 steps
    1

    Install Claude Desktop with Cowork

    Cowork is the desktop-app mode that can run scripts, schedule tasks, and use your computer. Available on Claude.ai Pro and Max plans.

    You should see

    The app opens. The top of the window has three modes — Chat, Cowork, Code. Switch to Cowork.

    2

    Give Cowork permission to use your computer

    Settings → Cowork. Turn on Computer use and Keep computer awake. macOS will ask for Accessibility and Screen Recording permissions — grant both.

    You should see

    The Cowork tab now shows the prompt bar at the top and your task history below. No red "permissions missing" banners.

    3

    Make a project folder

    In a terminal, create somewhere for the watcher to live:

    Shell
    mkdir ~/watcher && cd ~/watcher
    You should see

    ~/watcher exists and is empty. Cowork will populate it.

    4

    Paste the build prompt into Cowork

    Hit + New task in Cowork. Paste the prompt below. The working folder should be ~/watcher — Cowork will ask if it doesn't know.

    Plan-then-build prompt
    Build me a watcher I can run on a schedule. It should:
    
    - Scan an RSS feed (the URL goes here: https://hnrss.org/frontpage) every hour.
    - Keep a tiny local store of the IDs it has already seen.
    - For each new item, score it against my interests (keywords I'll give you below).
    - If anything scores above a threshold, send me a notification — start with macOS notification + a written log file. We can switch to Telegram or email later.
    
    My interests, scored higher = better:
    - "agents" / "agent" / "autonomous": 3
    - "claude" / "anthropic" / "openai": 2
    - anything matching one of my hand-typed keywords: 5
    
    Constraints:
    - One Python file. Standard library + feedparser. Nothing else.
    - No external API keys yet — local only.
    - Idempotent: running it twice in the same hour does not double-notify.
    - If anything fails (network, parse, write), log it and exit cleanly. Don't crash.
    
    Before you write any code, hand me a one-page plan: what files you'll create,
    how the dedupe store works, the exact notification command on macOS, and how
    I'll schedule it. Then ask me one clarifying question if anything above is unclear.
    5

    Review the plan before approving execution

    Cowork won't write code immediately — it'll produce a short plan: the file layout, how dedupe works, the exact notification command, how to schedule it. Read it. This is your veto point.

    • If the plan is wrong, reply with the correction. Cowork rewrites it.
    • If the plan is right, reply: "Looks good. Build it."
    You should see

    A clear "here's what I'll do" message before any file gets written. You see the plan, not just code.

    6

    Approve tool actions as they come up

    Cowork now writes watch.py, creates a dedupe store, and runs a test. Each side-effect asks for approval — read each one:

    • Write watch.py — allow
    • Install feedparser via pip — allow
    • Run watch.py once as a smoke test — allow
    • Send a macOS notification — allow (System Settings will ask once for permission)
    You should see

    You see a notification banner from the first test run. The terminal shows the items it scored and which crossed the threshold.

    7

    Iterate — add a source, trim the store

    One round of changes to make sure you can edit, not just accept:

    Iteration
    Two changes:
    
    1. Add a second source — a GitHub releases feed: https://github.com/anthropics/claude-code/releases.atom
       (Same scoring rules. Use the source name as a category in the notification.)
    2. The dedupe store keeps growing forever. Trim it to the last 14 days on every run.
    
    Show me the diff before applying it.
    You should see

    Cowork shows the diff first ("here are the lines I'll change"), waits for your OK, then applies. Run again — both feeds show up; the dedupe store stays bounded.

    8

    Schedule it

    In Cowork's left sidebar, click Scheduled. Hit + New scheduled task.

    Scheduled task
    Cowork has a "Scheduled" tab. New task → name "Hourly watcher" → frequency hourly → prompt:
    
      Run python ~/watcher/watch.py and report anything new it printed.
    
    Cowork keeps your computer awake (Settings → General → Keep computer awake — turn on).
    The agent fires on the schedule, runs your script, and shows you what it saw.
    You should see

    The task shows up with its next-run time. Wait until it fires (or set it to every 5 minutes for the demo). You see Cowork run, the script execute, and a summary of new items.

    9

    Swap the notification channel

    Once the local version works, push the notification somewhere durable. Pick one:

    • Telegram — make a bot via @BotFather, give Cowork the token, ask it to "replace the macOS notification with a Telegram message to chat ID X."
    • Email — your existing Gmail / SMTP server; Cowork knows the libraries.
    • iMessage — on macOS, Cowork can use AppleScript to send via the Messages app to your own number.
    You should see

    The next scheduled run pings you on the channel you picked. The macOS notification path still works as a fallback.

    The pattern you just learned. An agentic build has four moves: state the goal, approve the plan, approve the tools, schedule it. You did all four. The script is yours — commit it to git, swap the feed for whatever you actually want to watch, add scoring keywords that match your life. The same template will let you build a watcher every time you catch yourself manually checking a website.
    What this isn't. Your watcher is not an oracle — it doesn't know which items are important, only which ones match the rules you gave it. Same rule as everywhere: AI has an edge on automation, scanning, and dedup. It has no edge on judgment. Score for "matches my interests"; never for "should I act on this."