Skip to content

brycewang-stanford/Auto-Empirical-Research-Skills / skills/29-quarcs-lab-project20XXy/dot-claude/skills/execute

execute

Verified

Executes all registered notebooks, strips noisy cell metadata, and syncs Jupytext pairs. Use when asked to re-run notebooks or refresh outputs.

FileKindSize
SKILL.mdskill md1.4 KB
---
name: execute
description: Executes all registered notebooks, strips noisy cell metadata, and syncs Jupytext pairs. Use when asked to re-run notebooks or refresh outputs.
disable-model-invocation: true
allowed-tools: Bash, Read, Write, Edit, Glob, Grep
---

# Execute All Notebooks

Execute all registered notebooks, strip noisy metadata, and sync Jupytext pairs.

## Steps

1. Read `_quarto.yml` and extract all notebook paths from `manuscript.notebooks`
2. For each notebook, execute it:
   ```bash
   uv run jupyter execute --inplace notebooks/<name>.ipynb
   ```
   Record execution time and success/failure for each notebook.
3. After all notebooks execute, strip noisy cell metadata from every `.ipynb` file.
   Open each `.ipynb` as JSON and remove these keys from every cell's `metadata` object:
   - `execution` (timestamps added by `jupyter execute`)
   - `_sphinx_cell_id` (MyST/Sphinx artifact)
   - `vscode` (VS Code editor state)
   Save the cleaned JSON back to the file (preserve formatting with 1-space indent).
4. Sync all Jupytext `.md` pairs:
   ```bash
   uv run jupytext --sync notebooks/<name>.md
   ```
5. Report a summary table:
   - Notebook name
   - Status (success / failure)
   - Execution time
   - Any errors or warnings

## Error handling

- If a notebook fails to execute, continue with the remaining notebooks. Report the error at the end.
- If `_quarto.yml` has no notebooks registered, report "No notebooks found in _quarto.yml" and stop.
deprecation-and-migrationaddyosmani/agent-skillsManages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when migrating a database schema in production, such as renaming or dropping a column without downtime (expand/contract). Use when deciding whether to maintain or sunset existing code.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
performance-optimizationaddyosmani/agent-skillsOptimizes application performance across frontend, backend, queries, and databases. Use when performance requirements exist, when you suspect performance regressions, when Core Web Vitals or load times need improvement, when N+1 query patterns need fixing, or when profiling reveals bottlenecks.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
agent-cost-reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json.Stars: 118kUpdated Claude CodeCodexVerifiedInstall
agent-cost-reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json.Stars: 118kUpdated Claude CodeCodexVerifiedInstall