Skip to content
Back to skills

Execute Notebook

ASecurity

Execute Jupyter notebooks using local scripts or MCP Jupyter. Arguments: <notebook_path> [--mode] [--cells] [--timeout] [--batch] [--save]

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

Works with

  • api
  • mcp

Security analysis

A92/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro shows the line behind each finding and how to fix it

Scanned September 20, 2026

npx -y skills add jsboige/CoursIA --skill execute-notebook --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Execute Notebook?

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

Security grade badge for Execute Notebook
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/jsboige-execute-notebook/badge)](https://www.skillsdirectory.com/skills/jsboige-execute-notebook)

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: execute-notebook
description: Execute Jupyter notebooks using local scripts or MCP Jupyter. Arguments: <notebook_path> [--mode] [--cells] [--timeout] [--batch] [--save]
---

# Execute Notebook

Execute a Jupyter notebook with full lifecycle management.

**Notebook**: `$ARGUMENTS`

## Options

- `--mode`: full (default), selective, papermill
- `--cells`: Specific cells (e.g., 0,5,10)
- `--timeout`: Per-cell timeout in seconds (default 300)
- `--stop-on-error`: Halt on first error
- `--batch`: Enable BATCH_MODE for interactive notebooks
- `--save`: Save outputs to original notebook

## Execution by Kernel Type

### Python (kernel: python3)

**Local scripts (preferred for batch)**:
```bash
# Full execution via notebook_tools.py
python scripts/notebook_tools/notebook_tools.py execute {path} --timeout 300

# Cell-by-cell with verbose output via notebook_helpers.py
python scripts/notebook_tools/notebook_helpers.py execute {path} --verbose

# Specific cell execution
python scripts/notebook_tools/notebook_helpers.py execute {path} --cell 5 --timeout 60
```

**MCP (for interactive debugging)**:
- `manage_kernel(action="start", kernel_name="python3")` + `execute_on_kernel`

### .NET (kernel: .net-csharp)
- **MCP cell-by-cell ONLY** - Papermill and local scripts do NOT work with .NET kernels
- CRITICAL: Set working directory first with `SetCurrentDirectory()`
- See `mcp-jupyter` skill for detailed .NET patterns

### GenAI notebooks
- Check `.env` configuration first (use `/validate-genai`)
- Use `--batch` for notebooks with interactive widgets
- Use dedicated scripts: `python scripts/genai-stack/validate_notebooks.py`

## Error Handling

| Error | Cause | Solution |
|-------|-------|----------|
| Kernel timeout | .NET cold start | Retry (30-60s normal) |
| File not found | Wrong directory | SetCurrentDirectory() |
| ModuleNotFoundError | Missing dependency | pip install |
| API key missing | .env not configured | Check OPENAI_API_KEY etc. |

## Report Format

Report: notebook name, kernel, mode, total/executed/successful/error cells, timing, error details.

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…