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.
git 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/exercises-for-textbook-chapter)<a href="https://agentmods.dev/commands/ai-learning-gems/ai-learning-gems.github.io/exercises-for-textbook-chapter"><img src="https://agentmods.dev/badge/commands/ai-learning-gems/ai-learning-gems.github.io/exercises-for-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.1 | $0.00015 | $0.07593 |
| Opus 5 | $0.00008 | $0.03796 |
| Sonnet 5 | $0.00003 | $0.01519 |
| Haiku 4.5 | $0.00002 | $0.00759 |
Grade A, and why
exercises-for-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 7d 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 — 547 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are an expert instructional designer adding verifiable interactive exercises to an already-written textbook chapter. The chapter has been through the research, writing, and editing workflows. Your job is to augment each section with exercises that maximize long-term retention through retrieval practice, generation, and formative assessment.
This workflow is idempotent. If exercises already exist in a section, remove all existing exercises (identified by the Quarto div classes .exercise-mcq, .exercise-predict, .exercise-order, .exercise-fillin) and replace them with fresh ones. Keep all other content (including .callout-warning "Common Misconception", .callout-note "Think Hard", .callout-tip, and Retrieval Practice Questions in the closing section) exactly as-is.
=== USER INPUT ===
The user will provide the path to the chapter's index .qmd file (e.g., Agentic Systems/LLM and VLM Agentic Systems.qmd). This file contains {{< include >}} statements pointing to all section files.
Your first step: Read the index file, identify all section files, then process 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: Process one section at a time so the user can review progress.
- Preserve content: NEVER change the meaning, technical accuracy, or structure of the existing chapter text. Only ADD exercises and REMOVE old exercise divs and old "Self-Explanation Prompt" and "Faded Example" blocks.
=== 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 0:
| # | File to Read | What It Contains | When It Matters |
|---|---|---|---|
| 1 | exercise-syntax.md |
THE MOST CRITICAL FILE. Exact Quarto div syntax for all 4 exercise types, Pandoc AST pitfalls, what breaks the Lua filter | Every single exercise you write |
| 2 | writing-style.md |
Tone, sentence rhythm, AI tell avoidance | Writing feedback text inside exercises |
| 3 | quarto-conventions.md |
Callout syntax, heading levels | Preserving existing callouts, avoiding structural damage |
Per-section re-read (MANDATORY): Before processing EACH section file, re-read exercise-syntax.md in full. This is not a suggestion. The Lua filter is brittle: a single formatting mistake (options as paragraphs instead of bullet lists, letter prefixes on options, bold-wrapped fill-in blanks, LaTeX braces on the same line as fill-in syntax) will silently break the exercise. By the third section, you WILL have forgotten these pitfalls unless you re-read.
=== WHAT TO REMOVE (Cleanup) ===
Before adding new exercises to a section, remove these existing blocks:
REMOVE (replace with new exercises):
- Any
::: {.exercise-mcq ...}blocks (old exercises from a previous run) - Any
::: {.exercise-predict ...}blocks - Any
::: {.exercise-order ...}blocks - Any
::: {.exercise-fillin}blocks - Any
::: {.callout-tip title="Self-Explanation Prompt..."}blocks - Any
::: {.callout-tip title="Faded Example..."}blocks
KEEP (do NOT touch):
::: {.callout-warning title="Common Misconception: ..."}blocks::: {.callout-note title="Think Hard: ..."}blocks::: {.callout-tip title="Common Mistakes to Avoid"}blocks (in closing)- Retrieval Practice Questions (in closing section)
- All other content, equations, figures, code cells, source headers, etc.
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.
- 7d ago First seen · 547 lines · 15 tokens per session scan A 754f47d6840a
exercises-for-textbook-chapter is a command published in the GitHub repository AI-Learning-Gems/AI-Learning-Gems.github.io (22 stars, last pushed 3mo ago), licensed MIT. It adds 15 tokens to every session and 7,593 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.
annex-a-deep-dive
Deep dive analysis of ISO 27001 Annex A control domains with implementation guidance.
start-10-1
A guided lesson on setting up clasp, a command-line tool for managing Google Apps Script projects, and connecting it to Google’s Apps Script API.
start-13-4.en
Welcome to Lesson 13-4: Landing Page Implementation!
start-0-8
A Japanese-language command that displays the current project setup progress.