notebook-execution-safety

notebook-execution-safety is a skill for Codex from PracticalSwan/agent-skills. It costs 27 tokens per session (777 once invoked), scanned A, original, MIT.

A safety checklist for inspecting Jupyter notebooks before running or editing them. Jupyter notebooks combine explanatory text with executable code cells.

In plain words
What is it for?
Use it to review notebook metadata, imports, headings, and code-cell effects, then choose a limited and safe way to test or modify the notebook.
Why use it?
It identifies risky actions such as network access, file changes, archive extraction, package installation, and long training runs before they happen.

Skill for Codex

Written for Codex: reads ~/.codex or $CODEX_HOME. Also seen: mentions Claude Code; mentions AGENTS.md; mentions Codex.

Good fit Use it to review notebook metadata, imports, headings, and code-cell effects, then choose a limited and safe way to test or modify the notebook.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/practicalswan/agent-skills/notebook-execution-safety
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.

Any agent
npx skills add PracticalSwan/agent-skills --skill notebook-execution-safety
Clone the repo
git clone --depth 1 https://github.com/PracticalSwan/agent-skills

Made for: Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for notebook-execution-safety

README.md
[![agentmods](https://agentmods.dev/badge/skills/practicalswan/agent-skills/notebook-execution-safety/github.svg)](https://agentmods.dev/skills/practicalswan/agent-skills/notebook-execution-safety)
Your own site
<a href="https://agentmods.dev/skills/practicalswan/agent-skills/notebook-execution-safety"><img src="https://agentmods.dev/badge/skills/practicalswan/agent-skills/notebook-execution-safety/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for notebook-execution-safety

Your own site · 80×15
<a href="https://agentmods.dev/skills/practicalswan/agent-skills/notebook-execution-safety"><img src="https://agentmods.dev/badge/skills/practicalswan/agent-skills/notebook-execution-safety.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 27 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 777 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00027 $0.00777
Opus 5 $0.00014 $0.00388
Sonnet 5 $0.00005 $0.00155
Haiku 4.5 $0.00003 $0.00078

Measured 3d ago against content hash 67d88747286a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

notebook-execution-safety 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 3d ago.

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.

notebook-execution-safety/SKILL.md · 83 lines

How it starts

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

Notebook Execution Safety

Use this skill before running, modifying, or debugging .ipynb files.

Workflow

  1. Read AGENTS.md and relevant Serena memory or docs/memory-bank/ fallback context for the target folder.
  2. Read notebook metadata, headings, markdown cells, imports, and code cell summaries.
  3. Identify cells that perform network access, archive extraction, local file writes, long training runs, package installs, or submission/export steps.
  4. Ask before executing cells with network, extraction, broad writes, or submission side effects.
  5. Prefer targeted cell execution or static fixes before full-notebook runs.
  6. Preserve student work and outputs unless the user asks to clear or rerun them.
  7. After edits, verify with the narrowest practical execution path.

Reporting

State:

  • what was inspected
  • whether execution happened
  • which cells or notebook path were verified
  • what was intentionally not run

Cross-Client Portability

This skill is written to stay usable across GitHub Copilot, Claude Code, and Codex.

  • GitHub Copilot: keep the folder in a Copilot-visible skill path or wrap the workflow in project instructions when folder discovery is unavailable.
  • Claude Code: keep the folder in a local skills directory or a compatible plugin source.
  • Codex: install or sync the folder into $CODEX_HOME/skills/notebook-execution-safety and restart Codex after major changes.

MCP Availability And Fallback

Preferred MCP Server: None required

  • Fallback prompt: "Use the Notebook Execution Safety skill without MCP. Rely on its local instructions, bundled resources, standard shell or editor tools, and direct verification. Show the evidence used before concluding."
  • Do not claim an MCP operation was used when the active host does not expose it.
  • Treat local files, tests, rendered outputs, logs, or screenshots as the fallback evidence path.

Read the full file on GitHub · 83 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 3d ago Changed 67d88747286a
  2. 4d ago Changed a652db19a83d
  3. 7d ago First seen · 83 lines · 27 tokens per session scan A 194ac15c6e79

Subscribe to this mod's changes

notebook-execution-safety is a skill published in the GitHub repository PracticalSwan/agent-skills (14 stars, last pushed 3d ago), licensed MIT. It adds 27 tokens to every session and 777 once invoked, about $0.0001 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-09-03.