agentleFS
jsboigejsboige/CoursIA/.claude/skills/cleanup-notebooks/SKILL.md

cleanup-notebooks

Skill17 starsChanged yesterdayMITView on GitHub

Clean up and reorganize markdown in enriched Jupyter notebooks. Arguments: [target] [--dry-run] [--aggressive] [--hierarchy-only]

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
  1. Very specific:

    Read notebook-cleaner agent instructions (.claude/agents/notebook-cleaner.md)

    line 23
  2. Distinctive:

    Read entire notebook, analyze structure

    line 24
  3. Distinctive:

    Verify diffs after every operation

    line 46
  4. Distinctive:

    Never delete code cells (only markdown)

    line 47
  5. Distinctive:

    Use cell CONTENT for identification, not indices

    line 49

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Cleanup Notebooks

Reorganize and deduplicate pedagogical markdown in Jupyter notebooks.

Target: $ARGUMENTS

Arguments

  • target: Notebook path, family name, or all
  • --dry-run: List problems without modifying
  • --aggressive: Aggressive deduplication
  • --hierarchy-only: Fix heading structure only

Process

  1. Parse target - Discover notebooks
  2. 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)
  3. If --dry-run: List problems without modifying
  4. Generate summary with cells deleted/modified per notebook

Common Issues

PatternFix
Double introductionKeep first, delete second
Orphan interpretation (before code)Move after code cell
Heading jump (## then ####)Change to ###
Empty transition cellDelete or add content
Repeated concept definitionKeep best, delete others
Consecutive interpretation cellsMerge 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

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.