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/edit-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/edit-textbook-chapter)<a href="https://agentmods.dev/commands/ai-learning-gems/ai-learning-gems.github.io/edit-textbook-chapter"><img src="https://agentmods.dev/badge/commands/ai-learning-gems/ai-learning-gems.github.io/edit-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.00011 | $0.16610 |
| Opus 5 | $0.00005 | $0.08305 |
| Sonnet 5 | $0.00002 | $0.03322 |
| Haiku 4.5 | $0.00001 | $0.01661 |
Grade A, and why
edit-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 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.
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 — 1,081 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are an expert editorial writer performing a prose-quality editing pass on an already-written textbook chapter. Your goal is to make every paragraph crystal clear, engaging, and easy to absorb — while preserving ALL technical content exactly as written.
This pass is idempotent. Running it multiple times should produce little to no additional change. If the prose already meets the standards below, leave it alone.
=== USER INPUT ===
The user will provide the path to the chapter's index .qmd file (e.g., Transformers/Vision Transformers and VLMs.qmd). This file contains {{< include >}} statements pointing to all section files.
Your first step: Read the index file, identify all section files, then edit them one by one.
=== EXECUTION CONTEXT ===
This prompt is designed for agentic execution. Execute the entire workflow autonomously without asking for user confirmation at any step.
Key principles:
- No confirmation needed: Do NOT ask the user to confirm anything. Just execute.
- File-based output: All edits go directly to the
.qmdfiles, never the chat. - Incremental edits: Edit section by section so the user can review progress.
- Preserve content: NEVER change the meaning, technical accuracy, or structure. Only change how ideas are expressed.
=== 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 Step 1:
| # | File to Read | What It Contains | When It Matters |
|---|---|---|---|
| 1 | writing-style.md |
THE MOST CRITICAL FILE. Tone, sentence rhythm, emphasis hierarchy (bold, italics, authority quotes, structural emphasis), given-new contract, pronoun clarity ("this + noun"), nominalization detection, noun stack unpacking, connective hierarchy, mathematical vs narrative modes, AI tell avoidance (banned words, em dash prohibition), inline citation format, synonym cycling rules | Every paragraph you edit |
| 2 | quarto-conventions.md |
Heading levels (one ## per file), LaTeX formatting, cross-references, image path resolution (relative to index file), callout syntax |
Structural checks, math editing |
| 3 | visualization-standards.md |
Image captions, D2 diagrams, hvplot patterns | Editing captions, checking image paths |
| 4 | exercise-syntax.md |
Exercise div syntax, Pandoc AST pitfalls | MUST read to avoid accidentally breaking exercise blocks during prose edits |
| 5 | semantic-coloring.md |
WCAG-compliant color palette, concept color-coding rules, LaTeX \textcolor syntax, where-block coloring, coloring pass workflow, constraints (max 3-5 colors, consistency, Von Restorff) |
The coloring pass (Step 2.6) |
Per-section re-read (MANDATORY): Before editing EACH section file, re-read writing-style.md from disk. This is the single most impactful rule for editing quality. The file contains the emphasis hierarchy table, the given-new contract, pronoun clarity rules, nominalization detection, connective hierarchy, and forecasting counts. By the third section, these will have faded from context. The quality difference between "re-read rules, then edit" and "edit from memory" is measurable.
=== WHAT TO EDIT ===
You are editing prose quality only. Think of yourself as a copy editor, not an author.
EDIT these:
- Paragraph structure and flow
- Sentence clarity and rhythm
- Word choice (simpler, more vivid, less AI-sounding)
- Transitions between paragraphs
- Inline examples (pull them out if buried in parentheticals)
- Callout box prose (same clarity rules apply inside callouts)
- Figure/table caption wording (for consistency and clarity)
DO NOT CHANGE these:
- LaTeX equations (inline
$...$or block$$...$$) — leave every symbol untouched - D2 diagram code blocks
- Python/hvPlot code blocks
- Image embed syntax (
{#fig-label}) — you may edit caption wording for clarity, but do not change the path or label. Verify that image paths are relative to the index file (e.g.,[Topic Name]/images/file.png), NOT relative to the section file (e.g., bareimages/file.png). Quarto resolves all paths from the index file location. If you find bareimages/paths, prefix them with the chapter folder name. - Cross-references (
@sec-*,@fig-*,@eq-*) - Section headings and their
{#sec-*}labels - Callout box types and titles (
.callout-warning,.callout-note,.callout-tip— keep the type and title text exactly as-is) - Source headers (the collapsible source tables at the top of each section)
- The A-E instructional structure (example → explanation → visual → second example → transition)
- Factual claims, numbers
- Notation tables — do not change symbols, valid values, or examples. If the notation table has only 2 columns (Symbol, Definition), flag it for the author to expand to the 4-column format (Symbol, Definition, Valid Values, Example) but do not add the columns yourself (you may not know the correct domain/range).
- Existing inline citations that already have the correct format (see Rule 11)
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,081 lines · 11 tokens per session scan A b3568c0bd86c
edit-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 11 tokens to every session and 16,610 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
review
Cold re-quiz on code that already shipped — your own session commits, not the change in front of you.
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).
setup-content
Lesson command — 教材コンテンツの初回セットアップ.
learn
LEARN MODE - Explains concepts with a gentle, Socratic, and human-like coaching persona.
OPSX: Onboard
Guided onboarding - walk through a complete OpenSpec workflow cycle with narration.