enrich-notebooks
Skill17 starsChanged 2 days agoMITView on GitHub
Enrich Jupyter notebooks with pedagogical markdown content. Arguments: [target] [--execute] [--fix-errors] [--strict] [--consecutive] [--iterate]
In this repository19 other files it gives its agents.
- .vibe/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- adjoint-secretarySkill
- analyze-slidesSkill
- build-notebookSkill
- check-cell-orderSkill
- cleanup-notebooksSkill
- coordinate-adjointSkill
- coordinateSkill
- execute-notebookSkill
- genai-iterateSkill
- mcp-jupyterSkill
- notebook-helpersSkill
- notebook-patternsSkill
- qc-iterative-improveSkill
- review-student-prsSkill
- train-modelSkill
- validate-genaiSkill
- verify-notebooksSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 3 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Add pedagogical markdown content to Jupyter notebooks.
- Very specific: line 25
Read the notebook-enricher agent instructions (.claude/agents/notebook-enricher.md)
- Very specific: line 36
Verify with: helper.get_cell_sequence(start, end) after each insertion
- Very specific: line 41
If --iterate: Use notebook-cell-iterator agent for targeted cell fixes
- Very specific: line 45
Use model: sonnet for enrichment agents (good balance of speed and quality).
- Distinctive: line 70
Verify with git diff (expect more insertions than deletions)
- Very specific: line 79
Consider running /cleanup-notebooks to fix any positioning issues
- Distinctive: line 80
Update MEMORY.md with lessons learned about positioning accuracy
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Enrich Notebooks
Add pedagogical markdown content to Jupyter notebooks.
Target: $ARGUMENTS
Arguments
target: Notebook path, family name (Infer,Sudoku,Tweety,Lean,GenAI, etc.), orall--execute: Run notebooks and capture outputs before enriching--fix-errors: Correct code errors found during execution--strict: Require interpretation after EVERY code cell--consecutive: Focus on consecutive code cells without markdown--iterate: Use cell-iterator for iterative correction
Process
- Parse target - Discover notebooks to enrich
- For each notebook, launch a background agent:
- Read the notebook-enricher agent instructions (
.claude/agents/notebook-enricher.md) - Analyze structure:
python scripts/notebook_tools/notebook_helpers.py list {path} --verbose - Find gaps programmatically (Python API):
from scripts.notebook_helpers import NotebookHelper helper = NotebookHelper(path) gaps = helper.find_cells_needing_enrichment() # Cells missing interpretation consecutive = helper.find_consecutive_code_cells() # Code cells without markdown between - Validate placement:
helper.validate_enrichment_context(cell_index)returns what's needed - Insert markdown cells via NotebookEdit (bottom-to-top to preserve indices)
- Verify with:
helper.get_cell_sequence(start, end)after each insertion
- Read the notebook-enricher agent instructions (
- If --execute: Execute notebooks first to capture outputs for interpretation
- If --fix-errors: Analyze errors, propose corrections, re-execute
- If --consecutive: Prioritize fixing consecutive code cells
- If --iterate: Use notebook-cell-iterator agent for targeted cell fixes
Agent Delegation
Use model: sonnet for enrichment agents (good balance of speed and quality).
For complex domains (Probas, Lean), consider model: inherit for better reasoning.
Task(
subagent_type="general-purpose",
model="sonnet",
prompt="Tu es un agent notebook-enricher. Lis .claude/agents/notebook-enricher.md. Enrichis: {path}",
description=f"Enrich {name}",
run_in_background=True
)Enrichment Criteria
| Type | Placement | Tense |
| Section intro | BEFORE code | Future: "This code will..." |
| Code explanation | BETWEEN code cells | Present: "This function..." |
| Result interpretation | AFTER code output | Past: "The results show..." |
| Transition | Between sections | "After seeing X, let's explore Y..." |
| Conclusion | End of section | Summary table |
After Enrichment
- Verify with
git diff(expect more insertions than deletions) - Run the enrich-quality scanner (rule C.7, mandatory):
git show origin/main:<nb-path> > /tmp/base.ipynb python scripts/notebook_tools/scan_enrich_quality.py <nb-path> --base /tmp/base.ipynb # 0 HIGH finding before commit: anchors must resolve at HEAD (code[N] = # N-th CODE cell, 0-based, final layout), accents must survive, hrefs must # resolve, no phantom entities, no worked solution before a TODO exercise. - Consider running
/cleanup-notebooksto fix any positioning issues - Update MEMORY.md with lessons learned about positioning accuracy
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

