Our review
This skill handles fixing errors encountered during notebook execution, ranging from Python code bugs to Jupyter JSON schema violations and library issues.
Strengths
- Accurate traceback analysis to pinpoint root causes
- Direct edits to notebook cells or JSON schema
- Multiple strategies: code, schema, or library source
- Automated verification via nbconvert
Limitations
- Does not cover deep business logic issues
- May be limited by complex dependency chains
- Source fixes might require recompilation
Use this skill when a Jupyter notebook fails due to Python errors, invalid JSON schema, or bugs in underlying libraries.
Avoid this skill for general design problems or notebooks requiring a complete architectural rewrite.
Security analysis
SafeThe skill performs local file modifications (reading/writing .ipynb JSON) and running Jupyter commands for error-fixing. No destructive, exfiltrating, or obfuscated operations are present; it is a legitimate Jupyter maintenance task.
No concerns found
Examples
This notebook fails with 'Additional properties are not allowed ('id' was unexpected)'. Fix the JSON schema by removing cell IDs and setting nbformat_minor to 4.The first cell in the notebook has an import error: ModuleNotFoundError for 'gwexpy'. Add a cell to install it via pip, or fix the import path.name: fix_notebook description: ノートブックのエラーを、そのノートブック自体の修正(セル内容・JSONスキーマ)またはソースコードの修正により解決する
Fix Notebook Errors
This skill handles fixing errors encountered during notebook execution, ranging from Python code bugs to Jupyter JSON schema violations.
Instructions
-
Analyze the Failure:
- Examine the traceback to determine if the error is in the notebook cell's logic, a JSON schema violation, or the underlying library.
-
Strategy A: Fix Code Cell (Local):
- If the usage is wrong, imports are missing, or data paths are incorrect, edit the
.ipynbcells. - Modify the
"source"field of the failing code cell in the notebook JSON. - Unit-Safe Assignment: When updating
astropy.unitsobjects, preferseries.value[:] = new_datato keep metadata.
- If the usage is wrong, imports are missing, or data paths are incorrect, edit the
-
Strategy B: Fix JSON Schema:
- If
nbconvertor validators fail with "Additional properties are not allowed ('id' was unexpected)": - Remove Cell IDs: Delete the
"id"key from all cells in the JSON. - Normalize nbformat_minor: Set
nbformat_minorto4(ifnbformatis 4) to prevent auto-adding IDs.
- If
-
Strategy C: Fix Library Source Code:
- If the bug is in the
gwexpy/package, trace it to the source file and apply the fix.
- If the bug is in the
-
Verification:
- Re-run the notebook using
jupyter nbconvert --executeortest_notebooksto confirm it passes.
- Re-run the notebook using
# Utility for Strategy B
import json
def fix_nb_schema(path):
with open(path, 'r') as f:
data = json.load(f)
for cell in data.get('cells', []):
cell.pop('id', None)
if data.get('nbformat') == 4 and data.get('nbformat_minor', 0) >= 5:
data['nbformat_minor'] = 4
with open(path, 'w') as f:
json.dump(data, f, indent=1)
Next.js App Router Expert
Development
A skill that turns Claude into a Next.js App Router expert.
README Generator
Development
Creates professional and comprehensive README.md files for your projects.
API Documentation Writer
Development
Generates comprehensive API documentation in OpenAPI/Swagger format.