本文へ移動
cccskills
無料GitHub で公開

notebook-helpers

Reference for notebook manipulation scripts (notebook_helpers.py, notebook_tools.py). Use when working with Jupyter notebooks, analyzing structure, executing cells, or manipulating notebook content.

インストール方法を見る

含まれるファイル(1)

  • SKILL.md3.8 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Notebook Helper Scripts Reference

notebook_helpers.py - Low-level notebook manipulation

Python API

from scripts.notebook_helpers import NotebookHelper, CellIterator, NotebookExecutor

# Read and analyze
helper = NotebookHelper("path/to/notebook.ipynb")
helper.list_cells()                          # List all cells with type, preview
helper.get_cell_source(5)                    # Source code of cell 5
helper.set_cell_source(5, "new code")        # Modify cell content
helper.find_cells_with_pattern("import")     # Search by regex
helper.find_cells_with_errors()              # Cells with error outputs
helper.find_consecutive_code_cells()         # Code cells without markdown between
helper.save()                                # Save modifications

# Iterative correction
iterator = CellIterator(
    notebook_path="notebook.ipynb",
    cell_index=5,
    objective="Output should contain 'SUCCESS'",
    max_iterations=5
)

CLI Usage

# List cells (verbose shows source preview)
python scripts/notebook_tools/notebook_helpers.py list notebook.ipynb --verbose

# Execute a specific cell
python scripts/notebook_tools/notebook_helpers.py execute notebook.ipynb --cell 5 --timeout 60

# Execute entire notebook cell-by-cell
python scripts/notebook_tools/notebook_helpers.py execute notebook.ipynb --verbose

# Detect kernel type
python scripts/notebook_tools/notebook_helpers.py detect-kernel notebook.ipynb

# Get cell source or output
python scripts/notebook_tools/notebook_helpers.py get-source notebook.ipynb 5
python scripts/notebook_tools/notebook_helpers.py get-output notebook.ipynb 5

notebook_tools.py - High-level CLI

# Validate structure (quick) or full (with execution)
python scripts/notebook_tools/notebook_tools.py validate Sudoku --quick
python scripts/notebook_tools/notebook_tools.py validate MyIA.AI.Notebooks/Sudoku/Sudoku-01-Backtracking-Python.ipynb

# Extract skeleton for README generation
python scripts/notebook_tools/notebook_tools.py skeleton MyIA.AI.Notebooks/Tweety --output markdown

# Analyze notebook structure
python scripts/notebook_tools/notebook_tools.py analyze MyIA.AI.Notebooks/SymbolicAI

# Check environment requirements
python scripts/notebook_tools/notebook_tools.py check-env Lean

# Execute notebook
python scripts/notebook_tools/notebook_tools.py execute GameTheory --timeout 120 --cell-by-cell

extract_notebook_skeleton.py

# Quick summary
python scripts/notebook_tools/extract_notebook_skeleton.py MyIA.AI.Notebooks/Sudoku

# Markdown table for README
python scripts/notebook_tools/extract_notebook_skeleton.py MyIA.AI.Notebooks/Sudoku --output markdown

# Detailed with code previews
python scripts/notebook_tools/extract_notebook_skeleton.py MyIA.AI.Notebooks/Sudoku --output detailed --code-preview

# JSON for programmatic use
python scripts/notebook_tools/extract_notebook_skeleton.py MyIA.AI.Notebooks/Sudoku --output json

GenAI-specific scripts (scripts/genai-stack/)

ScriptDescription
validate_stack.pyFull ComfyUI stack validation
validate_notebooks.pyPapermill execution of GenAI notebooks
check_vram.pyGPU/VRAM availability check
list_models.pyList available ComfyUI models
list_nodes.pyList ComfyUI nodes
docker_manager.pyDocker service management

Key Patterns

  • Always use these scripts rather than ad-hoc Python for notebook manipulation
  • notebook_helpers.py list is the fastest way to understand a notebook's structure
  • notebook_tools.py validate --quick for rapid structural validation
  • For GenAI notebooks, always run validate_stack.py first

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Cycle 30 min du secrétaire vérificateur myia-po-2026:CoursIA-3. Atteste en tiers, du plus ancien au plus récent, les PRs ouvertes sans dossier valide (chaque READY, une fois lu et approuvé par ai-01, est mergé sans attendre son cycle), et fait circuler l'information sur workspace-CoursIA-3.

日本語の概要は準備中です。原文の説明を表示しています。

jsboige/CoursIA162026年10月12日 更新

Analyze PowerPoint slides qualitatively using vision AI. Arguments: <deck_path> [--render] [--slides 1,5,10]

日本語の概要は準備中です。原文の説明を表示しています。

jsboige/CoursIA162026年10月12日 更新

Build or improve Jupyter notebooks iteratively with quality scoring. Arguments: <new|improve|fix> <path> [--topic] [--domain] [--level] [--quality] [--max-iter]

日本語の概要は準備中です。原文の説明を表示しています。

jsboige/CoursIA162026年10月12日 更新

Detect cell-ordering / enchainement problems in Jupyter notebooks (canonical-order slippage, misplaced or forgotten cells). Arguments: [target] [--severity HIGH|MED|LOW] [--json]

日本語の概要は準備中です。原文の説明を表示しています。

jsboige/CoursIA162026年10月12日 更新

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

日本語の概要は準備中です。原文の説明を表示しています。

jsboige/CoursIA162026年10月12日 更新

Cycle de coordination ai-01 (coordinateur UNIQUEMENT — jamais sur un worker). Lit memoire + dashboards + inbox + GitHub, merge les PRs pretes, tranche les design-gates, dispatche des grains par lane, reporte. Arguments: [--dispatch] [--focus <topic>]

日本語の概要は準備中です。原文の説明を表示しています。

jsboige/CoursIA162026年10月12日 更新

jsboige のスキルをすべて見る

このスキルの問題を報告する