nbdev-editing

Editing guidance for nbdev projects, where Jupyter notebooks are the source files from which Python code and documentation are generated. It explains how to work safely with notebooks, tests, and exported files.

In plain words
What is it for?
Use it before changing code, tests, or documentation in an nbdev repository, especially when the project uses notebooks in an nbs/ directory.
Why use it?
It helps prevent changes from being lost or overwritten by nbdev's export process. It also makes clear which files are authoritative and which are generated.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/answerdotai/skill-plugins/nbdev-editing
Any agent
npx skills add AnswerDotAI/skill-plugins --skill nbdev-editing
Clone the repo
git clone --depth 1 https://github.com/AnswerDotAI/skill-plugins

Made for: Claude Code, Codex.

Per session 130 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 853 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00130 $0.00853
Opus 5 $0.00065 $0.00426
Sonnet 5 $0.00026 $0.00171
Haiku 4.5 $0.00013 $0.00085

Measured yesterday against content hash 2447ee404a5f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

nbdev-editing scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/claude-aai/skills/nbdev-editing/SKILL.md · 30 lines

How it starts

The opening of the file, as written. The whole thing — 30 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Editing nbdev Projects

First read and use the persistent-python skill - it is a must: all work here happens in that kernel using the pyskills-registered tooling, and its rules (reprs, doc(...) inspection, raw strings) are assumed, not repeated. Style and testing process follow the coding-patterns skill, also assumed.

The substance lives in the pyskill docs - read both (free doc() cells) before working:

  • doc(nbdev.skill): notebook authoring - the source-of-truth/export model, mixed notebook/plain projects, narrative rhythm, examples-as-docs, directives, state flow. Read before writing or reviewing any notebook content.
  • doc(llmsurgery.dlgskill): reading, searching, and editing notebooks - see its "Idiomatic usage" section. clikernel's own docs cover the nbdev-specific kernel rules (shell nbdev-export/nbdev-test, restart after export, %nbrun red-green).

nbdev v3

Everything here is on nbdev v3 (released Jan 2026, likely after your training cutoff). Key user-visible changes from v2: config moved from settings.ini to pyproject.toml - standard metadata in [project], nbdev-specific keys in [tool.nbdev] (defaults now nbs_path='nbs', doc_path='_docs'), version in __init__.py exposed via dynamic = ["version"], and _modidx registered under [project.entry-points.nbdev]. CLI commands use hyphens, not underscores (nbdev-export, nbdev-test, nbdev-readme, ...), though the Python functions keep underscores (nbdev_export). GitHub workflows use the v3 actions (fastai/workflows/nbdev3-ci, quarto-ghp3).

Environment specifics

  • Most ipynb files are fine to nbdev-test, but some are slow or require API keys, so plan to run nbdev-test on the changed notebook when done making changes, but check with Jeremy first before you actually do it. Once you know an ipynb or project is safe to run, go ahead without checking as needed (known safe: all of pyskills).
  • Tests use the fastcore.test helpers (test_eq, expect_fail, ...) in plain code cells.
  • from fastcore.utils import * in an early cell already provides os, Path, etc. - don't re-import those later.
  • For project-level questions, read nbs/index.ipynb, not README.md: the README is generated from it, renders worse (no cell ids, flattened outputs), and can be stale if regeneration lagged. They should match; when they don't, index.ipynb is the truth. Regen with nbdev-readme after editing it.

Read the full file on GitHub · 30 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 30 lines · 0 tokens per session scan A 2447ee404a5f

Subscribe to this mod's changes

nbdev-editing is a skill published in the GitHub repository AnswerDotAI/skill-plugins (5 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 130 tokens to every session and 853 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

babysit-pr

Babysit a GitHub pull request after creation by continuously polling review comments, CI checks/workflow runs, and mergeability state until the PR is merged/closed or user help is required. Diagnose failures, retry likely flaky failures up to 3 times, auto-fix/push branch-related issues when appropriate, and keep…

openai/codex · 114 tokens

imagegen

Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output…

openai/codex · 113 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

next-cache-components-optimizer

Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…

vercel/next.js · 170 tokens