quality-notebook

Automate Jupyter notebook quality with nbstripout, nbdime, and nbqa.

Updated Mar 19, 2026
One-click install
npx skills add https://github.com/sunLeee/optimization --skill quality-notebook
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: quality-notebook
Source: https://github.com/sunLeee/optimization/tree/main/.claude/skills/quality/check/quality-notebook
Command: npx skills add https://github.com/sunLeee/optimization --skill quality-notebook

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Notebook quality management is often manual and error-prone in Data Science collaboration. This skill automates quality control for Jupyter notebooks by applying nbstripout, nbdime, and nbqa to ensure clean outputs, reliable diffs, and consistent linting.

Core Features & Use Cases

  • nbstripout integration to strip outputs before commits
  • nbdime for diff/merge of notebooks
  • nbqa to run linters and formatters on notebook code cells
  • Git-ready workflow with pre-commit hooks for notebook hygiene
  • Use Case: teams that share notebooks via Git can maintain clean history and consistent code quality.

Quick Start

Install and configure the notebook quality tools to start enforcing clean notebooks immediately.

Frequently Asked Questions about quality-notebook

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

FAQPage Schema
How do I strip Jupyter notebook outputs before committing to Git?

Stripping Jupyter notebook outputs before Git commits requires integrating nbstripout into your workflow, often via pre-commit hooks. This ensures clean repository history by automatically removing cell outputs and metadata from notebooks staged for commit.

What is the best way to diff and merge Jupyter notebooks in version control?

Diffing and merging Jupyter notebooks in version control is best handled using nbdime. It translates notebook JSON into readable diffs, allowing data science teams to accurately compare code changes and resolve merge conflicts without manually parsing output metadata.

Can I run Python linters and formatters directly inside Jupyter notebook code cells?

Running linters and formatters inside Jupyter notebook code cells is possible using nbqa. It adapts standard Python tools like flake8 and black to operate on notebook cells, ensuring consistent code quality across shared data science projects.

Does nbstripout work with pre-commit hooks for team data science projects?

nbstripout works seamlessly with pre-commit hooks for team data science projects. Configuring these hooks automates notebook hygiene by enforcing output stripping and linting checks before any changes are committed to the shared Git repository.

Why do Git diffs for Jupyter notebooks show output metadata changes instead of code updates?

Git diffs for Jupyter notebooks show output metadata changes because notebooks store execution outputs in JSON format. Configuring nbstripout to strip outputs before commits and nbdime to format diffs resolves this issue for data science collaboration.