Skip to content
Back to skills

Cleanup Notebooks

ASecurity

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

  • 16 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 20, 2026
educationgo

Security analysis

A100/100

Scanned September 20, 2026

npx -y skills add jsboige/CoursIA --skill cleanup-notebooks --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Cleanup Notebooks?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Cleanup Notebooks
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/jsboige-cleanup-notebooks/badge)](https://www.skillsdirectory.com/skills/jsboige-cleanup-notebooks)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: cleanup-notebooks
description: Clean up and reorganize markdown in enriched Jupyter notebooks. Arguments: [target] [--dry-run] [--aggressive] [--hierarchy-only]
---

# 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

| 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

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…