Automates the creation of educational Jupyter notebooks using a standardized, interactive teaching structure.
Install
mkdir -p .claude/skills/teachbook-generate-teaching-notebook && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/15122" && unzip -o skill.zip -d .claude/skills/teachbook-generate-teaching-notebook && rm skill.zipInstalls to .claude/skills/teachbook-generate-teaching-notebook
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Crea notebooks de Jupyter orientados a la enseñanza con estructura pedagógica clara. Incluye plantillas JSON para generar archivos .ipynb correctos y reglas de diseño docente. Trigger phrases: "notebook", "jupyter", "cuaderno", "ejemplo python", "código ejecutable", "notebook de enseñanza", "notebook interactivo", "código python", "simulación".Key capabilities
- →Generate Jupyter Notebooks with a pedagogical structure
- →Include markdown cells for title and explanation
- →Include code cells for executable Python examples
- →Include markdown cells for interpretation of results
- →Include markdown cells for proposed exercises
- →Ensure code cells are ASCII-safe
How it works
The skill generates a Jupyter Notebook JSON structure with predefined cell types and content, following specific pedagogical and coding rules.
Inputs & outputs
When to use teachbook-generate-teaching-notebook
- →Creating interactive programming tutorials
- →Designing teaching materials for Python
- →Generating exercise notebooks for students
About this skill
Skill: Generar Notebooks de Enseñanza
Qué es un notebook de enseñanza
Un Jupyter Notebook (.ipynb) que combina explicaciones en markdown con código Python ejecutable. Está diseñado para que un estudiante lo siga paso a paso.
Estructura obligatoria
Cada notebook debe seguir este orden de celdas:
- Celda título (markdown) — Nombre del tema y objetivo de aprendizaje.
- Celda explicación (markdown) — Contexto teórico breve (2-5 líneas).
- Celda código (code) — El ejemplo con comentarios en cada línea relevante.
- Celda interpretación (markdown) — Qué significan los resultados.
- Celda ejercicio (markdown) — 1-2 ejercicios propuestos para el estudiante.
Estructura JSON de un notebook
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": ["# Título del Notebook\n\n**Objetivo:** Describir qué aprenderá el estudiante."]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": ["import numpy as np\nimport matplotlib.pyplot as plt\n\n# Generar datos de ejemplo\nx = np.linspace(0, 2 * np.pi, 100)\ny = np.sin(x)\n\n# Visualizar\nplt.figure(figsize=(8, 4))\nplt.plot(x, y, label='sin(x)')\nplt.title('Funcion seno')\nplt.xlabel('x')\nplt.ylabel('y')\nplt.legend()\nplt.grid(True)\nplt.show()"]
},
{
"cell_type": "markdown",
"metadata": {},
"source": ["## Interpretación\n\nLa gráfica muestra un ciclo completo de la función seno."]
},
{
"cell_type": "markdown",
"metadata": {},
"source": ["## Ejercicio\n\n1. Modifica el código para graficar `cos(x)` en lugar de `sen(x)`.\n2. ¿Qué ocurre si cambias el rango de `x` a `[0, 4π]`?"]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"name": "python",
"version": "3.10.0"
}
},
"nbformat": 4,
"nbformat_minor": 4
}
Reglas de diseño docente
| Regla | Detalle |
|---|---|
| Celdas cortas | Un concepto por celda. Máximo 10-15 líneas de código por celda. |
| Comentarios | Comentar las líneas clave del código (no todas, solo las que aportan valor) y escribirlos en ASCII. |
| Resultados explícitos | Usar print() para mostrar resultados numéricos, no depender del output automático. |
| Visualizaciones | Usar matplotlib.pyplot para gráficas. Siempre con title, xlabel, ylabel, y texto ASCII en títulos/ejes/leyendas. |
| Datos autogenerados | Usar numpy para generar datos. Nunca requerir archivos externos. |
| Extensión | Mantener entre 3 y 6 celdas como máximo por notebook. |
| Kernel | Siempre usar kernel python3. |
| Imports | Agrupar todos los imports en la primera celda de código. |
Regla crítica de codificación en celdas de código
Las celdas code de un notebook deben ser ASCII-safe aunque el Markdown esté en español.
Motivo: el código fuente visible y las figuras generadas con Matplotlib pasan por HTML, PDF, fuentes del sistema y visores distintos. Caracteres como letras con tilde, eñes, símbolos griegos, superíndices, subíndices o flechas pueden acabar como ? en ejes, títulos, leyendas o bloques de código.
Aplicar siempre:
- En celdas Markdown: se permiten acentos y texto normal en español.
- En celdas
code: usar ASCII en comentarios,print(), strings, títulos, ejes, leyendas y nombres de variables. - En Matplotlib: escribir
plt.title("Funcion seno"), noplt.title("Función seno"). - Para símbolos: usar texto ASCII (
Ohm,pi,Delta,uF,tau,x^2) o mathtext de Matplotlib cuando sea necesario (r"$x^2$",r"$\pi$"). - Tras crear o modificar notebooks, ejecutar y guardar outputs con
.venv, y luego validar:
python scripts/check_encoding.py
Si scripts/check_encoding.py detecta una celda de código con texto no ASCII, hay que corregirla antes de compilar o commitear.
Configuración de ejecución
Los notebooks se ejecutan (o no) según la configuración en _config_<lang>.yml:
| Valor | Comportamiento |
|---|---|
off (por defecto) | No se ejecuta. Las celdas muestran el código pero sin output. |
auto | Se ejecuta al compilar. Los outputs se generan automáticamente. |
force | Fuerza ejecución aunque ya tenga outputs. |
Si execute_notebooks: off, hay dos opciones:
- Activar ejecución: cambiar a
autoen el config (más lento al compilar). - Dejar outputs manuales: ejecutar el notebook localmente y guardarlo con los outputs ya generados.
Librerías disponibles
Estas librerías no se instalan en la base ligera. Antes de ejecutar o regenerar notebooks científicos, instalar el extra:
python scripts/setup_env.py --yes --extras notebooks
Después se pueden usar:
numpy— Cálculo numérico y generación de datos.matplotlib— Gráficas y visualizaciones.scipy— Cálculo científico avanzado.schemdraw— Diagramas de circuitos (ver skill teachbook-generate-schemdraw-circuit).sympy— Matemáticas simbólicas.
Flujo de trabajo
- Preguntar qué tema debe cubrir el notebook y para qué asignatura/grado.
- Diseñar la estructura de celdas siguiendo la plantilla.
- Generar el JSON del
.ipynby guardarlo en la carpeta del idioma. - Repetir para el/los otro/s idioma/s.
- Añadir al
_toc_<lang>.ymlcorrespondiente. - Verificar la configuración de
execute_notebooks.
When not to use it
- →When external files are required for data
- →When notebooks should exceed 6 cells
- →When non-ASCII characters are needed in code cells
Limitations
- →Notebooks must be between 3 and 6 cells maximum
- →Code cells must be ASCII-safe
- →Only `numpy`, `matplotlib`, `scipy`, `schemdraw`, and `sympy` are available libraries
How it compares
This skill enforces a structured, pedagogical format for Jupyter Notebooks with specific content rules and ASCII-safe code, unlike a manual creation that might lack consistency or educational design.
Compared to similar skills
teachbook-generate-teaching-notebook side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| teachbook-generate-teaching-notebook (this skill) | 0 | 2mo | Review | Beginner |
| lecture-transcript-slide-matcher | 6 | 9mo | Review | Advanced |
| doc | 0 | 3mo | Review | Intermediate |
| richpdf | 0 | 3mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
lecture-transcript-slide-matcher
az9713
Combines YouTube lecture transcripts with PDF slides to create an interactive HTML page. Matches each slide to corresponding transcript segments, organized by key concepts. Use when users want to create synchronized lecture notes from transcript text files and slide PDFs.
doc
ansys
Write, review, or edit PyMechanical documentation. Use when writing reStructuredText (RST) files, Python docstrings, Sphinx configurations, example scripts, README files, or any doc content for the PyMechanical library. This covers NumPy docstrings, RST file formatting, Google developer style guide
richpdf
0r1xByte
>
feature-doc-updates
liudger
Ensure README and documentation are updated when adding features in python-bsblan. Use when implementing new behavior, parameters, API surface changes, or user-visible capabilities.
research-paper-writing
Toqsick
Write ML papers for NeurIPS/ICML/ICLR: design→submit.
repo-markdown-quality
ventura8
______________________________________________________________________