quarto-python

Create, parameterize, and render Quarto notebooks with a Python Jupyter kernel.

1|Updated Oct 25, 2020
One-click install
npx skills add https://github.com/bfairkun/dotfiles --skill quarto-python-bfairkun
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: quarto-python
Source: https://github.com/bfairkun/dotfiles/tree/main/agents/.agents/skills/quarto-python
Command: npx skills add https://github.com/bfairkun/dotfiles --skill quarto-python-bfairkun

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Working with Quarto .qmd notebooks that use a Python kernel involves subtle conventions—kernel registration, papermill parameter injection, and render environment quirks—that cause confusing failures like missing nbclient errors or silently failed renders. This Skill codifies the correct patterns so notebooks render reliably every time. ## Core Features & Use Cases - Standardized front matter: Enforces the jupyter: py_general kernel with code-fold: true and toc: true defaults for all Python qmd notebooks. - Parameterized notebooks with papermill: Shows how to tag a parameters cell and render with overrides via render_notebook render notebook.qmd -P key:value, clarifying that params arrive as plain Python variables, not an R-style params dict. - Reliable rendering and verification: Uses the render_notebook shim (which logs host, Slurm allocation, and peak memory) and teaches how to confirm success via Output created: and HTML timestamps, since conda run can exit 0 despite internal cell errors. - Use Case: You need to rerun the same gene-analysis notebook for a dozen different genes. Define defaults in a tagged parameters cell, then loop render_notebook render analysis.qmd -P gene:MBD5 for each target. ## Quick Start Ask the AI to create a parameterized Quarto Python notebook for a gene analysis using the py_general kernel and render it with a specific gene override.

Frequently Asked Questions about quarto-python

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

FAQPage Schema
How do I parameterize a Quarto notebook with papermill?▼

Add a cell tagged `parameters` containing default variable assignments, then render with `quarto render -P key:value` overrides. Quarto injects parameters as plain Python variables, not a `params` dict—that is an R Markdown convention to avoid.

How to render a Quarto Python notebook with a conda kernel?▼

Register the kernel once with `conda run -n py_general python -m ipykernel install --user --name py_general`, then render using `conda run -n base render_notebook render notebook.qmd`. The base env has nbclient and jupyter_client needed to discover the registered kernel.

Why does quarto render fail with No module named nbclient?▼

This error occurs when rendering from an environment lacking nbclient, such as py_general itself. Render from the base conda environment instead, which includes ipykernel, nbformat, nbclient, and jupyter_client for kernel discovery.

Why did my Quarto render succeed but the notebook has errors?▼

The `conda run` command can return exit code 0 even when a cell raises an error like NameError internally. Always verify success by checking the output contains `Output created:` and confirming the HTML file timestamp updated.

How do I show multiple plotnine plots in one notebook cell?▼

Import `display` from IPython.display and call `display(plot)` for each plot in the cell. Plain `print()` does not render plotnine plots in Quarto output.