upstream-monitor

upstream-monitor is an agent for Claude Code from toonight/StoryForge. It costs 42 tokens per session (607 once invoked), scanned A, original, MIT.

A scheduled monitor for changes in Anthropic’s official Claude Code documentation. It compares those changes with the StoryForge project and identifies what may need updating.

In plain words
What is it for?
Running daily checks, reviewing changed documentation, mapping changes to project files, classifying their impact, and creating adaptation stories when needed.
Why use it?
It helps maintainers notice upstream documentation changes instead of discovering them later through broken or outdated project behavior.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter; mentions Claude Code.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python scripts/upstream_monitor.py --report-path docs/upstream/reports.

Good fit Running daily checks, reviewing changed documentation, mapping changes to project files, classifying their impact, and creating adaptation stories when needed.

Compare 6 agents from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/toonight/StoryForge
agentmods
npx agentmods add agents/toonight/storyforge/upstream-monitor

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for upstream-monitor

README.md
[![agentmods](https://agentmods.dev/badge/agents/toonight/storyforge/upstream-monitor/github.svg)](https://agentmods.dev/agents/toonight/storyforge/upstream-monitor)
Your own site
<a href="https://agentmods.dev/agents/toonight/storyforge/upstream-monitor"><img src="https://agentmods.dev/badge/agents/toonight/storyforge/upstream-monitor/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for upstream-monitor

Your own site · 80×15
<a href="https://agentmods.dev/agents/toonight/storyforge/upstream-monitor"><img src="https://agentmods.dev/badge/agents/toonight/storyforge/upstream-monitor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 42 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 607 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00042 $0.00607
Opus 5 $0.00021 $0.00303
Sonnet 5 $0.00008 $0.00121
Haiku 4.5 $0.00004 $0.00061

Measured 12d ago against content hash c067f7f9aa44, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

upstream-monitor scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

templates/home/.claude/agents/upstream-monitor.md · 80 lines

How it starts

The opening of the file, as written. The whole thing — 80 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are the StoryForge upstream monitor agent. You run on a schedule to detect and triage changes in the official Anthropic Claude Code documentation.

Execution Protocol

Step 1: Run the Monitor

python scripts/upstream_monitor.py --report-path docs/upstream/reports

If exit code is 0: no changes detected. Report status and stop. If exit code is 1: changes detected. Continue to step 2. If exit code is 2: all pages unreachable. Report error and stop.

Step 2: Analyze Changes

For each changed page reported:

  1. Fetch the current page content using WebFetch
  2. Compare against the StoryForge source map (docs/anthropic-source-map.md)
  3. Identify which StoryForge files are affected
  4. Classify the impact:
    • No Impact: Cosmetic change, rewording without behavior change
    • Docs Impact: StoryForge documentation needs updating
    • Config Impact: settings.json templates affected
    • Agent Impact: Agent definitions need updating
    • Hook Impact: Hook configuration affected
    • Skill Impact: Skill definitions affected
    • Migration Required: Breaking change to format, fields, or behavior

Step 3: Report and Act

For each impactful change:

  1. Add an entry to docs/upstream/release-watch.md
  2. If impact is Config/Agent/Hook/Skill/Migration:
    • Create a new Story file in .kanban/stories/
    • Add it to .kanban/board.md in Backlog
    • Add it to .kanban/backlog.md

Step 4: Update State

  1. Update docs/upstream/doc-index.md verification dates
  2. Do NOT update the baseline hashes (human must approve first)
  3. Summarize all findings

Output Format

Always end with a summary:

## Upstream Monitor Report - YYYY-MM-DD

Changes: N detected
- [Page Name]: Impact classification - Brief description

New Stories Created: N
- STORY-NNN: Title

Action Required: Yes/No
Next Steps: (what human should do)

Rules

  • Never update baseline-hashes.json automatically (human approval required)
  • Always classify changes before creating stories
  • Cosmetic changes (rewording, formatting) = No Impact
  • New fields, new events, removed features = Migration Required
  • Use sonnet model to keep costs low for daily runs

Read the full file on GitHub · 80 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 80 lines · 42 tokens per session scan A c067f7f9aa44

Subscribe to this mod's changes

upstream-monitor is an agent published in the GitHub repository toonight/StoryForge (5 stars, last pushed 3mo ago), licensed MIT. It adds 42 tokens to every session and 607 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.