# Openai Jupyter Notebook > Úsalo para crear, generar o editar notebooks Jupyter (.ipynb) para experimentos, exploraciones o tutoriales, usando las plantillas incluidas y el script new_notebook.py. Fuente: https://skillsagentes.com/skills/trailofbits/skills-curated/openai-jupyter-notebook Markdown: https://skillsagentes.com/skills/trailofbits/skills-curated/openai-jupyter-notebook.md Repositorio: https://github.com/trailofbits/skills-curated Autor: trailofbits Licencia: CC-BY-SA-4.0 Actualizado: hace 9 meses Coste de contexto: 72 tok instalada, 1k tok al activarse, 2.7k tok con todos los archivos del bundle Bundle: 6 archivos, 11 KB Permisos que pide: bash, read, grep, glob, write, edit ## Instalación Un skill son archivos markdown: los mismos archivos valen para cualquier agente y lo único que cambia es el directorio de destino, es decir la bandera `--agent`. Añade `-g` para instalarlo en todos los proyectos de la máquina. ```bash # Claude Code npx -y skills add trailofbits/skills-curated --skill openai-jupyter-notebook --agent claude-code # Cursor npx -y skills add trailofbits/skills-curated --skill openai-jupyter-notebook --agent cursor # Codex npx -y skills add trailofbits/skills-curated --skill openai-jupyter-notebook --agent codex # Gemini CLI npx -y skills add trailofbits/skills-curated --skill openai-jupyter-notebook --agent gemini # Windsurf npx -y skills add trailofbits/skills-curated --skill openai-jupyter-notebook --agent windsurf # Cline npx -y skills add trailofbits/skills-curated --skill openai-jupyter-notebook --agent cline ``` ## Qué hace - Genera notebooks Jupyter (.ipynb) limpios a partir de plantillas usando el script new_notebook.py - Aplica patrones distintos para experimentos y para tutoriales según el tipo elegido - Edita notebooks existentes de forma segura, preservando la estructura y evitando reescrituras completas - Valida el resultado ejecutando el notebook de principio a fin cuando el entorno lo permite ## Cuándo usarla - Crear un notebook .ipynb nuevo desde cero - Convertir notas o scripts sueltos en un notebook estructurado - Refactorizar un notebook existente para que sea más reproducible y legible - Construir experimentos o tutoriales que leerán o ejecutarán otras personas ## Qué la activa - "Crea un notebook de experimento para comparar variantes de prompt" - "Genera un tutorial en Jupyter sobre embeddings" - "Refactoriza este notebook para que sea más reproducible" - "Convierte este script en un notebook paso a paso" ## Antes de instalar - Opcionalmente instala jupyterlab e ipykernel con uv si quieres ejecutar el notebook localmente; el script de scaffolding solo usa la librería estándar de Python. - Variables de entorno: JUPYTER_NOTEBOOK_CLI - runs shell commands - writes to your files - reads environment config ## Archivos - SKILL.md — 4 KB - references/experiment-patterns.md — 699 B - references/notebook-structure.md — 725 B - references/quality-checklist.md — 572 B - references/tutorial-patterns.md — 685 B - scripts/new_notebook.py — 4 KB ## SKILL.md Reproducido tal cual desde trailofbits/skills-curated bajo CC-BY-SA-4.0. Esta sección es el documento original y está en inglés. # Jupyter Notebook Skill Create clean, reproducible Jupyter notebooks for two primary modes: - Experiments and exploratory analysis - Tutorials and teaching-oriented walkthroughs Prefer the bundled templates and the helper script for consistent structure and fewer JSON mistakes. ## When to use - Create a new `.ipynb` notebook from scratch. - Convert rough notes or scripts into a structured notebook. - Refactor an existing notebook to be more reproducible and skimmable. - Build experiments or tutorials that will be read or re-run by other people. ## Decision tree - If the request is exploratory, analytical, or hypothesis-driven, choose `experiment`. - If the request is instructional, step-by-step, or audience-specific, choose `tutorial`. - If editing an existing notebook, treat it as a refactor: preserve intent and improve structure. Scripts and references are located under `{baseDir}/`. ## Workflow 1. Lock the intent. Identify the notebook kind: `experiment` or `tutorial`. Capture the objective, audience, and what "done" looks like. 2. Scaffold from the template. Use the helper script to avoid hand-authoring raw notebook JSON. ```bash uv run --python 3.12 python "$JUPYTER_NOTEBOOK_CLI" \ --kind experiment \ --title "Compare prompt variants" \ --out output/jupyter-notebook/compare-prompt-variants.ipynb ``` ```bash uv run --python 3.12 python "$JUPYTER_NOTEBOOK_CLI" \ --kind tutorial \ --title "Intro to embeddings" \ --out output/jupyter-notebook/intro-to-embeddings.ipynb ``` 3. Fill the notebook with small, runnable steps. Keep each code cell focused on one step. Add short markdown cells that explain the purpose and expected result. Avoid large, noisy outputs when a short summary works. 4. Apply the right pattern. For experiments, follow `references/experiment-patterns.md`. For tutorials, follow `references/tutorial-patterns.md`. 5. Edit safely when working with existing notebooks. Preserve the notebook structure; avoid reordering cells unless it improves the top-to-bottom story. Prefer targeted edits over full rewrites. If you must edit raw JSON, review `references/notebook-structure.md` first. 6. Validate the result. Run the notebook top-to-bottom when the environment allows. If execution is not possible, say so explicitly and call out how to validate locally. Use the final pass checklist in `references/quality-checklist.md`. ## Templates and helper script - Templates live in `assets/experiment-template.ipynb` and `assets/tutorial-template.ipynb`. - The helper script loads a template, updates the title cell, and writes a notebook. Script path: - `$JUPYTER_NOTEBOOK_CLI` (installed default: `{baseDir}/scripts/new_notebook.py`) ## Temp and output conventions - Use `tmp/jupyter-notebook/` for intermediate files; delete when done. - Write final artifacts under `output/jupyter-notebook/` when working in this repo. - Use stable, descriptive filenames (for example, `ablation-temperature.ipynb`). ## Dependencies (install only when needed) Prefer `uv` for dependency management. Optional Python packages for local notebook execution: ```bash uv pip install jupyterlab ipykernel ``` The bundled scaffold script uses only the Python standard library and does not require extra dependencies. ## Environment No required environment variables. ## Reference map - `references/experiment-patterns.md`: experiment structure and heuristics. - `references/tutorial-patterns.md`: tutorial structure and teaching flow. - `references/notebook-structure.md`: notebook JSON shape and safe editing rules. - `references/quality-checklist.md`: final validation checklist. ## When NOT to Use ## Dónde encaja - Categoría: [Herramientas para desarrolladores](https://skillsagentes.com/categorias/herramientas-desarrollo.md) — Skills que cambian cómo tu agente escribe, revisa y despliega código. - Creador: [trailofbits](https://skillsagentes.com/creators/trailofbits.md) — 117 skills en el directorio - [Todas las skills](https://skillsagentes.com/skills.md) - [Ranking de instalaciones](https://skillsagentes.com/ranking.md) ## Otras skills del mismo repositorio - [Grilling](https://skillsagentes.com/skills/trailofbits/skills-curated/grilling.md): Interroga al usuario sin descanso sobre un plan, decisión o idea hasta resolver cada rama del árbol de decisión, o cuando dice "grill me on this". - [Handoff](https://skillsagentes.com/skills/trailofbits/skills-curated/handoff.md): Compacta la conversación actual en un documento de traspaso para que un agente nuevo pueda continuar el trabajo en otra sesión. - [Teach](https://skillsagentes.com/skills/trailofbits/skills-curated/teach.md): Enseña al usuario una nueva habilidad o concepto a lo largo de varias sesiones, usando el directorio actual como un espacio de enseñanza con estado, con lecciones, registros de aprendizaje y materiales de referencia. - [Writing Great Skills](https://skillsagentes.com/skills/trailofbits/skills-curated/writing-great-skills.md): Referencia para escribir y editar bien skills de agentes: el vocabulario y los principios que hacen que un skill sea predecible. Consúltalo al redactar, revisar o podar un SKILL.md. - [Ffuf Web Fuzzing](https://skillsagentes.com/skills/trailofbits/skills-curated/ffuf-web-fuzzing.md): Guía experta para el fuzzing web con ffuf en pentesting autorizado: descubrimiento de directorios y subdominios, fuzzing de parámetros, peticiones autenticadas y análisis de resultados. ## Skills relacionadas - [Finishing A Development Branch](https://skillsagentes.com/skills/obra/superpowers/finishing-a-development-branch.md): Úsalo cuando la implementación esté completa, todos los tests pasen, y necesites decidir cómo integrar el trabajo. - [Using Git Worktrees](https://skillsagentes.com/skills/obra/superpowers/using-git-worktrees.md): Úsalo al empezar trabajo de feature que necesita aislamiento del workspace actual, o antes de ejecutar planes de implementación: asegura un workspace aislado vía herramientas nativas o fallback a git worktree. - [Writing Skills](https://skillsagentes.com/skills/obra/superpowers/writing-skills.md): Úsala al crear nuevas skills, editar skills existentes o verificar que funcionan antes de desplegarlas. - [Code Review](https://skillsagentes.com/skills/mattpocock/skills/code-review.md): Revisa los cambios desde un punto fijo por dos ejes — Standards (¿sigue los estándares del repo?) y Spec (¿hace lo que pedía el issue?) — en sub-agentes paralelos, y los reporta lado a lado. - [Codebase Design](https://skillsagentes.com/skills/mattpocock/skills/codebase-design.md): Vocabulario compartido para diseñar módulos profundos. Úsalo para diseñar o mejorar la interfaz de un módulo, decidir dónde va un seam, o hacer el código más testeable y navegable para una IA. --- Skills Agentes · [Índice de páginas en markdown](https://skillsagentes.com/sitemap.md) · [Inicio](https://skillsagentes.com/index.md)