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.
npx agentmods add commands/ai-learning-gems/ai-learning-gems.github.io/update-textbook-chaptergit clone --depth 1 https://github.com/AI-Learning-Gems/AI-Learning-Gems.github.ioWrote 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.
[](https://agentmods.dev/commands/ai-learning-gems/ai-learning-gems.github.io/update-textbook-chapter)<a href="https://agentmods.dev/commands/ai-learning-gems/ai-learning-gems.github.io/update-textbook-chapter"><img src="https://agentmods.dev/badge/commands/ai-learning-gems/ai-learning-gems.github.io/update-textbook-chapter.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00019 | $0.05790 |
| Opus 5 | $0.00010 | $0.02895 |
| Sonnet 5 | $0.00004 | $0.01158 |
| Haiku 4.5 | $0.00002 | $0.00579 |
Grade A, and why
update-textbook-chapter 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 5d 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.
How it starts
The opening of the file, as written. The whole thing — 533 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are an expert technical editor performing a content update on an existing textbook chapter. Your goal is to incorporate new sources and information into the chapter while preserving its scope, learning objectives, narrative flow, and existing quality.
This is NOT a rewrite. You are updating a living document, not starting over. Think of yourself as a journal editor handling a revision: the structure stands, and new material is woven in where it serves the existing learning objectives.
=== USER INPUT ===
The user will provide:
- Path to the existing chapter's index
.qmdfile (e.g.,Preference Learning/Ranking Preferences.qmd) - New source URLs — a list of arXiv papers, blog posts, documentation pages, PDFs, etc.
- Optional: brief note on what these sources cover or why they are relevant
=== EXECUTION CONTEXT ===
This prompt is designed for agentic execution. Execute the entire workflow autonomously without asking for user confirmation at any step, UNLESS a scope expansion is required (see Phase 3).
Key principles:
- No confirmation needed (except for scope expansion): Do NOT ask the user to confirm anything. Just execute.
- File-based output: All edits go directly to
.qmdfiles andTEXTBOOK-PLAN.md, not the chat. - Surgical edits: Use targeted
StrReplaceoperations, not full-file rewrites. - Preserve existing content: The chapter's structure, running example, learning objectives, and section count remain unchanged unless the user explicitly approves a change.
=== MANDATORY RULES RE-READ (Do This FIRST) ===
CRITICAL: You MUST read the following rules files from disk before starting any work. Do NOT assume you already know their contents from system prompt injection or prior context. Rules may have been updated since the chat started. Read each file in full using your file-reading tool.
Read ALL of these files now, before proceeding to Phase 1:
| # | File to Read | What It Contains | When It Matters |
|---|---|---|---|
| 1 | source-integrity.md |
Zero World Knowledge principle, training data boundary (what requires a source vs. what doesn't), source readability verification, sub-agent rules, observed failure patterns, proof-of-work protocol | Every phase. This is the most critical rules file. It prevents hallucinated content from entering the chapter. |
| 2 | writing-style.md |
Tone, sentence rhythm, emphasis hierarchy, AI tell avoidance, mathematical vs narrative modes, inline citations | Phase 5 (writing new paragraphs), Phase 6 (coherence pass) |
| 3 | quarto-conventions.md |
Heading levels, LaTeX formatting, cross-references, image paths, callout syntax | Phase 5 (section edits), Phase 6 (cross-references) |
| 4 | visualization-standards.md |
Image priority order, source image handling, D2 diagrams, hvplot patterns | Phase 5 (adding new visualizations) |
| 5 | source-management.md |
Centralized source storage, folder naming, download commands, citation format | Phase 2 (downloading new sources) |
| 6 | web-source-fetching.md |
Site-specific fetch strategies, decision tree for choosing extraction method | Phase 2 (downloading new sources) |
| 7 | high-quality-blogs.md |
Blog attribution rules | Phase 5 (attributing blog-sourced content) |
| 8 | exercise-syntax.md |
Exercise div syntax | Phase 5 (to avoid breaking existing exercises during edits) |
| 9 | python-env.md |
Conda environment activation | Any terminal commands |
Per-section re-read and proof-of-work (MANDATORY): Before editing each section file in Phase 5, you must:
- Re-read
source-integrity.md,writing-style.md, andexercise-syntax.mdfrom disk. - Produce a Rules Application Analysis in the chat (see
source-integrity.mdfor the full protocol). This is not optional. It is your proof that you actually engaged with the rules before editing.
Shared rules (MUST follow):
- Writing style: Follow
writing-style.md - Visualizations: Follow
visualization-standards.md - Quarto format: Follow
quarto-conventions.md - Source handling: Follow
source-management.mdandweb-source-fetching.md
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.
- 5d ago First seen · 533 lines · 19 tokens per session scan A ec481fcda31b
update-textbook-chapter is a command published in the GitHub repository AI-Learning-Gems/AI-Learning-Gems.github.io (22 stars, last pushed 2mo ago), licensed MIT. It adds 19 tokens to every session and 5,790 once invoked, about $0.0001 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-30.
Other commands, from other repositories
lrn
Execute the /vibeguard:learn command. $ARGUMENTS.
review
Cold re-quiz on code that already shipped — your own session commits, not the change in front of you.
annex-a-deep-dive
Deep dive analysis of ISO 27001 Annex A control domains with implementation guidance.
start-10-1
Command "start-10-1" from minicoohei/ai-agent-camp, covering 🎓 lesson 10-1: clasp基本・gasプロジェクト管理, 📍 このセッションでやること, 🎯 準備チェック, 🚀 step 1: claspのインストールと apps script api の確認 and 🚀 step 2: google認証.
start-13-4.en
Welcome to Lesson 13-4: Landing Page Implementation!
learn-story-flow
Learn story-flow concepts with interactive guidance for junior developers.