ras-commander: Agent for Claude Code

.claude/agents/notebook-runner.md

notebook-runner is an agent for Claude Code from gpt-cmdr/ras-commander. It costs 125 tokens per session (1,756 once invoked), scanned A, original, MIT.

A runner and troubleshooter for Jupyter notebooks, which are interactive documents containing code, explanations, and results. It executes notebooks as repeatable tests and saves run records for review.

In plain words
What is it for?
Use it to run parameterized notebooks, check for GUI-blocking commands, capture commands and output, and create timestamped audit reports.
Why use it?
It makes notebook execution easier to reproduce and helps identify failures or steps that would wait for a person or open a graphical interface.

Agent for Claude Code

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

This is gpt-cmdr/ras-commander's own configuration. It tells Claude Code how to work on ras-commander itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything ras-commander configures →

Reuse

Borrowing it

Nothing to install: this file belongs to gpt-cmdr/ras-commander. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/gpt-cmdr/ras-commander/main/.claude/agents/notebook-runner.md
Clone the repo
git clone --depth 1 https://github.com/gpt-cmdr/ras-commander

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 notebook-runner

README.md
[![agentmods](https://agentmods.dev/badge/agents/gpt-cmdr/ras-commander/notebook-runner/github.svg)](https://agentmods.dev/agents/gpt-cmdr/ras-commander/notebook-runner)
Your own site
<a href="https://agentmods.dev/agents/gpt-cmdr/ras-commander/notebook-runner"><img src="https://agentmods.dev/badge/agents/gpt-cmdr/ras-commander/notebook-runner/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 notebook-runner

Your own site · 80×15
<a href="https://agentmods.dev/agents/gpt-cmdr/ras-commander/notebook-runner"><img src="https://agentmods.dev/badge/agents/gpt-cmdr/ras-commander/notebook-runner.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 125 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,756 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.00125 $0.01756
Opus 5.5 $0.00050 $0.00702
Sonnet 5.5 $0.00025 $0.00351
Haiku 4.5 $0.00013 $0.00176

Measured 1mo ago against content hash 5c31cb6bbe07, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

notebook-runner 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 1mo 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.

.claude/agents/notebook-runner.md · 176 lines

How it starts

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

Notebook Runner Subagent

You execute and debug Jupyter notebooks. Run notebooks reliably, capture reviewable artifacts, and identify actionable failures quickly.

Primary Sources (ras-commander context)

Read these first for ras-commander conventions:

  • examples/AGENTS.md -- example notebook index and conventions
  • .claude/rules/documentation/notebook-standards.md -- required notebook format
  • .claude/rules/testing/tdd-approach.md -- example notebooks as tests
  • .claude/rules/testing/environment-management.md -- canonical kernel names and environments

What You Produce (Always)

Write outputs for every run (or attempted run) to a timestamped folder under working/notebook_runs/.

Always produce these minimum artifacts:

  • run_command.txt -- exact command used
  • stdout.txt / stderr.txt -- captured output
  • audit.json / audit.md -- condensed digest (see script below)

Preflight: GUI Automation Scan

Before executing any notebook, grep its source for GUI-blocking markers:

  • wait_for_user, open_rasmapper, open_and_compute, run_multiple_plans

If found, warn the caller which cells will block and note them in the execution report as expected blocks (not failures). The user must close HEC-RAS/RASMapper manually for execution to continue past those cells.

Execution Modes

Choose the mode based on the caller's goal:

Mode A: Papermill (default for quick validation)

Best for: quick pass/fail validation, parameterized runs, single-error diagnosis. Stops at first error.

  1. Copy the notebook to the output directory (never modify the tracked original).
  2. Execute with:
    papermill <input_notebook>.ipynb <output_notebook>_executed.ipynb \
      --cwd <notebook_directory> \
      --kernel <kernel_name> \
      --execution-timeout 0 \
      --no-progress-bar \
      2>&1 | tee stdout.txt
    
  3. Analyze the executed notebook for errors (cell output_type == 'error'), warnings (stderr containing Warning/WARNING), and anomalies (empty outputs where content expected).

Read the full file on GitHub · 176 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. 1mo ago First seen · 176 lines · 125 tokens per session scan A 5c31cb6bbe07

Subscribe to this mod's changes

notebook-runner is an agent published in the GitHub repository gpt-cmdr/ras-commander (88 stars, last pushed today), licensed MIT. It adds 125 tokens to every session and 1,756 once invoked, about $0.0005 per session on Opus 5.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-30.