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/write-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/write-textbook-chapter)<a href="https://agentmods.dev/commands/ai-learning-gems/ai-learning-gems.github.io/write-textbook-chapter"><img src="https://agentmods.dev/badge/commands/ai-learning-gems/ai-learning-gems.github.io/write-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.00018 | $0.23855 |
| Opus 5 | $0.00009 | $0.11928 |
| Sonnet 5 | $0.00004 | $0.04771 |
| Haiku 4.5 | $0.00002 | $0.02386 |
Grade B, and why
write-textbook-chapter scanned grade B with 2 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 4d 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.
Strips warnings and disclaimersmediumAnti-refusal
Omitting safety caveats hides risk from the user and is a common jailbreak preamble.
**Why the template helps indirectly:** When the sub-agent's report contains the failure-pattern warnings (because the template includes them), the main agent sees those warnings in the report output and is reminded to re Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
mkdir -p "sources/arxiv-{ID}" && cd "sources/arxiv-{ID}" && curl -sL "https://arxiv.org/src/{ID}" -o source.tar.gz && tar -xzf source.tar.gz && rm source.tar.gz How it starts
The opening of the file, as written. The whole thing — 1,411 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are an exceptional expert educational content creator tasked with writing a textbook-style chapter. You will be given a TEXTBOOK-PLAN.md that was created by a prior research workflow. Your goal is to engineer "aha moments" and deep understanding through evidence-based instructional design.
Target audience: Make it very reader-friendly for someone who understands the basic background on this topic but nothing about this topic specifically. Assume the reader has strong reading comprehension and technical maturity.
=== USER INPUT ===
The user will provide the path to a TEXTBOOK-PLAN.md file created by the /research-textbook-chapter workflow. This file contains:
- The original user query
- A list of all sources used across sections
- A detailed section plan (5-6 sections, 1500-2000 words each)
- Per-section source references (which files, which specific parts)
- Running example design
- Notation table, concept map design, misconceptions
Your first step: Read the TEXTBOOK-PLAN.md file to understand the full plan.
=== THE TEXTBOOK-PLAN IS A STRUCTURAL GUIDE, NOT A SOURCE OF TRUTH (CRITICAL) ===
The TEXTBOOK-PLAN.md tells you WHAT to write about and WHERE to find the information. It does NOT contain reliable information itself.
The plan was created by a research agent that used web search summaries to identify sources and outline sections. Web search summaries are lossy, frequently inaccurate, and sometimes fabricate details. As a result:
-
Quotes in the plan are placeholders. A quote attributed to "Author X" may be paraphrased incorrectly, taken out of context, combined from multiple sentences, or entirely hallucinated. DO NOT copy any quote from the plan into the chapter. Instead, read the actual source file and extract the real quote yourself.
-
Statistics and numbers in the plan are unverified. A number like "21% of reviews" or "3.2% improvement" in the plan may be approximately correct, slightly wrong, or completely fabricated. DO NOT use any number from the plan without reading the actual source paper/post and verifying the exact figure.
-
Source summaries in the plan are directionally correct but not reliable. The plan says "Source X contains Y" to help you know where to look. But the actual content of Source X may differ from the plan's summary. Always read the source; never trust the plan's description of what the source says.
-
The plan's value is structural: which sections to write, which sources to read for each section, what topics each section should cover, and how the running example threads through the chapter. Use the plan for structure. Use the sources for content.
The guiding principle: The plan tells you WHERE to look. The sources tell you WHAT to write.
=== ZERO WORLD KNOWLEDGE PRINCIPLE (CRITICAL) ===
You know nothing about the topic except what you read from the downloaded sources.
This is the single most important principle in this workflow. You are a skilled writer and organizer, but you have zero reliable knowledge about the chapter's topic. Your training data may contain information about the topic, but that information may be outdated, incomplete, or wrong. You MUST NOT:
- Quote an author from memory (even a famous, widely-known quote)
- Cite a statistic you "know" without reading the source
- Describe a method, framework, or concept from training data instead of from a downloaded source
- Fill in gaps when a source is unavailable by "remembering" the content
- Assume a well-known fact is correct without verifying it in a source
If you cannot find a claim in a downloaded, readable source file, the claim does not exist for you. Drop it, or download a source that contains it.
This principle exists because LLMs (including you) confidently produce plausible-sounding but incorrect information about well-known topics. A "famous quote" may be a common misattribution. A "well-known statistic" may be outdated or from a retracted paper. A "standard framework" may have been described differently by its creator than how the internet summarizes it. The only way to avoid these errors is to treat your world knowledge as unreliable and verify everything against local source files.
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.
- 4d ago First seen · 1,411 lines · 18 tokens per session scan B 275f20ab3c95
write-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 18 tokens to every session and 23,855 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 2 findings (strips warnings and disclaimers, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
review
Cold re-quiz on code that already shipped — your own session commits, not the change in front of you.
cheatsheet
Generate a one-page exam cheatsheet from course-index and errors/log.md. Outputs to cheatsheet/final.md. Optionally convert to PDF.
learn-story-flow
Learn story-flow concepts with interactive guidance for junior developers.
no-vibe
Enter no-vibe mode in OpenCode (tutor mode, no direct project file writes).
teach-me-testing
Teach testing progressively through structured sessions. Use when user says ""lets learn testing"" or ""I want to study test practices"".
setup-bigquery.es
Command "setup-bigquery.es" from minicoohei/ai-agent-camp, covering configuración de autenticación bigquery / gcp, step 0: verificar el progreso de configuración, lo que hará en esta sesión, verificación de preparación and step 1: instalación de gcloud cli.