learning-notebook_conversion

Convert Jupyter notebooks to Python scripts while preserving code and markdown.

Updated Jan 28, 2026
One-click install
npx skills add https://github.com/zhizhunbao/ai-dev-config --skill learning-notebook-conversion-zhizhunbao
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: learning-notebook_conversion
Source: https://github.com/zhizhunbao/ai-dev-config/tree/main/core/skills/learning-notebook_conversion
Command: npx skills add https://github.com/zhizhunbao/ai-dev-config --skill learning-notebook-conversion-zhizhunbao

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires jupyter, nbconvert, jupytext, nbformat.

What problem does it solve?

This Skill solves the challenge of working with code that needs to be shared or executed in different environments, by enabling easy conversion between interactive Jupyter notebooks (.ipynb) and standard Python scripts (.py).

Core Features & Use Cases

  • .ipynb to .py Conversion: Preserves code, markdown (as comments), and cell structure.
  • .py to .ipynb Conversion: Creates notebooks from scripts, organizing code into cells.
  • Use Case: A student needs to submit a Python script for a course assignment but developed the code interactively in a Jupyter notebook; this Skill allows them to convert their notebook to a clean .py file.

Quick Start

Convert the current notebook file to a Python script.

Frequently Asked Questions about learning-notebook_conversion

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert a Jupyter notebook to a Python script?

To convert a Jupyter notebook to a Python script, this Skill uses jupytext and nbconvert to transform .ipynb files into clean .py files. It preserves your code, markdown as comments, and cell structure during the conversion process.

Can I convert a Python script to a Jupyter notebook?

Yes, you can convert a Python script to a Jupyter notebook. This Skill transforms standard .py files into interactive .ipynb notebooks, automatically organizing your existing code into structured cells for interactive development.

Does converting .ipynb to .py preserve markdown cells?

Converting .ipynb to .py preserves markdown cells by converting them into comments within the Python script. The transformation process retains both your code and documentation structure seamlessly.

What's the best way to switch between interactive notebook and script formats?

The best way to switch between interactive notebook and script formats is using jupytext and nbconvert. This Skill facilitates reliable transformations between .ipynb and .py formats while preserving code and cell structure.

Do I need jupytext and nbconvert installed to convert notebooks?

Yes, you need jupytext and nbconvert installed as they are the core dependencies used to facilitate the conversion. The Skill also relies on nbformat and jupyter to reliably transform files between .ipynb and .py formats.