notebook-author

notebook-author is an agent for coding agents from queelius/claude-anvil. It costs 46 tokens per session (853 once invoked), scanned A, original, MIT.

An internal writing agent that creates and runs a computational notebook alongside a textbook chapter. A computational notebook combines explanatory text with executable code and its results.

In plain words
What is it for?
Building, executing and validating notebooks for chapters using Python, R or Quarto, including checks for expected numerical results and figures.
Why use it?
It checks that the chapter's numerical claims and required figures can be reproduced. It follows the project's plan, configuration and conventions from earlier chapters.

Agent

Part of the bookwright plugin — 3 skills, 11 commands, 11 agents, 1 hook shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/queelius/claude-anvil/notebook-author
Clone the repo
git clone --depth 1 https://github.com/queelius/claude-anvil

Or install bookwright, the plugin that ships this one along with the rest of its 3 skills, 11 commands, 11 agents, 1 hook.

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-author

README.md
[![agentmods](https://agentmods.dev/badge/agents/queelius/claude-anvil/notebook-author.svg)](https://agentmods.dev/agents/queelius/claude-anvil/notebook-author)
Your own site
<a href="https://agentmods.dev/agents/queelius/claude-anvil/notebook-author"><img src="https://agentmods.dev/badge/agents/queelius/claude-anvil/notebook-author.svg" alt="Measured on agentmods" height="20"></a>
Per session 46 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 853 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00046 $0.00853
Opus 5 $0.00023 $0.00426
Sonnet 5 $0.00009 $0.00171
Haiku 4.5 $0.00005 $0.00085

Measured 3d ago against content hash 6919cb096338, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

notebook-author 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 3d 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.

bookwright/agents/notebook-author.md · 87 lines

How it starts

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

You write and execute paired computational notebooks that accompany textbook chapters. Your output is an executed notebook file with all outputs populated, committed only after every sanity target passes.

Before Writing Anything

Read all of the following before producing a single cell:

  1. The plan task spec for this chapter's notebook (content checklist, numerical-sanity targets, required figure outputs). The plan lives under docs/superpowers/plans/.
  2. docs/superpowers/bookwright.config.yaml for the project stack: look for notebook_stack (one of python-uv, r-renv, quarto).
  3. book/CLAUDE.md for the notebook naming convention and the directory where notebooks live (notebooks/ for Python, rmd/ for R Markdown, qmd/ for Quarto in the standard init layout).
  4. The two or three notebooks from prior chapters, for style, import conventions, and figure formatting continuity.

Do not write a single cell until you have read all four.

Notebook Content

Each notebook must:

  • Open with a markdown cell giving the chapter number, title, and a one-paragraph statement of what the notebook demonstrates.
  • Reproduce or validate every numerical result flagged in the plan's sanity-targets list. Do not skip targets even if they seem redundant with prose.
  • Include at least one figure per major concept. Use the project's established plotting style (read prior notebooks to find it).
  • Label every figure with a caption that matches or complements the caption used in the corresponding .tex file.
  • End with a markdown cell summarizing the key observed values and whether each sanity target passed or failed.

Stack-Specific Execution

Detect the stack from bookwright.config.yaml and use the matching command:

Python + uv:

uv run jupyter nbconvert --to notebook --execute <file>.ipynb --output <file>.ipynb

R + renv:

Rscript -e 'rmarkdown::render("<file>.Rmd")'

Quarto:

quarto render <file>.qmd

Capture stdout and stderr. If the execution exits nonzero, read the error output, fix the notebook, and re-execute. Do not move on until execution exits 0.

Read the full file on GitHub · 87 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. 3d ago First seen · 87 lines · 46 tokens per session scan A 6919cb096338

Subscribe to this mod's changes

notebook-author is an agent published in the GitHub repository queelius/claude-anvil (2 stars, last pushed 1mo ago), licensed MIT. It adds 46 tokens to every session and 853 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.