cleanup-notebooks
Skill17 starsChanged yesterdayMITView on GitHub
Clean up and reorganize markdown in enriched Jupyter notebooks. Arguments: [target] [--dry-run] [--aggressive] [--hierarchy-only]
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
- coordinate-adjointSkill
- coordinateSkill
- enrich-notebooksSkill
- 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
5 rules. About 0 are common, 4 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 23
Read notebook-cleaner agent instructions (.claude/agents/notebook-cleaner.md)
- Distinctive: line 24
Read entire notebook, analyze structure
- Distinctive: line 46
Verify diffs after every operation
- Distinctive: line 47
Never delete code cells (only markdown)
- Distinctive: line 49
Use cell CONTENT for identification, not indices
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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
Cleanup Notebooks
Reorganize and deduplicate pedagogical markdown in Jupyter notebooks.
Target: $ARGUMENTS
Arguments
target: Notebook path, family name, orall--dry-run: List problems without modifying--aggressive: Aggressive deduplication--hierarchy-only: Fix heading structure only
Process
- Parse target - Discover notebooks
- For each notebook, launch a background agent:
- Read notebook-cleaner agent instructions (
.claude/agents/notebook-cleaner.md) - Read entire notebook, analyze structure
- Identify problems (duplicates, misplaced cells, heading jumps, empty cells)
- Fix via NotebookEdit (one operation at a time, verify diff after each)
- Re-read notebook after each operation (indices change)
- Read notebook-cleaner agent instructions (
- If --dry-run: List problems without modifying
- Generate summary with cells deleted/modified per notebook
Common Issues
| Pattern | Fix |
| Double introduction | Keep first, delete second |
| Orphan interpretation (before code) | Move after code cell |
Heading jump (## then ####) | Change to ### |
| Empty transition cell | Delete or add content |
| Repeated concept definition | Keep best, delete others |
| Consecutive interpretation cells | Merge or delete duplicate |
Safety Rules
- GOLDEN RULE: "Don't break what works" - if structure is good, don't modify
- Verify diffs after every operation
- Never delete code cells (only markdown)
- Re-read notebook after each edit (indices change)
- Use cell CONTENT for identification, not indices
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.

