/journalism-tools:python-runnerfrom journalism-tools
Run Python scripts with automatic dependency management using uv. No manual pip or venv setup required.
Ships in journalism-tools. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Execute Python scripts with automatic, isolated dependency management. No manual environment setup required.
# Check if uv is available
uv --version
# Run script without dependencies
uv run script.py
# Run script with dependencies (installed automatically)
uv run --with pandas --with requests script.py
# Run with specific Python version
uv run --python 3.11 script.py
If uv is not installed, see references/install-uv.md.
Embed dependencies directly in the script so it's self-contained and reproducible:
# /// script
# requires-python = ">=3.10"
# dependencies = [
# "pandas",
# "requests",
# ]
# ///
import pandas as pd
import requests
# ... rest of script
Then run with just:
uv run script.py
uv automatically creates an isolated environment with the declared dependencies.
Use uv add --script to add dependencies to an existing script:
# Add single dependency
uv add --script script.py pandas
# Add multiple with version constraints
uv add --script script.py 'requests<3' 'rich>=13'
This inserts/updates the # /// script metadata block at the top of the file.
# /// script
# requires-python = ">=3.10"
# dependencies = [
# "pandas",
# "openpyxl", # for Excel support
# ]
# ///
import pandas as pd
df = pd.read_excel("data.xlsx")
print(df.describe())
# /// script
# requires-python = ">=3.10"
# dependencies = [
# "requests",
# "beautifulsoup4",
# "lxml",
# ]
# ///
import requests
from bs4 import BeautifulSoup
resp = requests.get("https://example.com")
soup = BeautifulSoup(resp.text, "lxml")
# /// script
# requires-python = ">=3.10"
# dependencies = [
# "pdfplumber",
# "pandas",
# ]
# ///
import pdfplumber
import pandas as pd
with pdfplumber.open("document.pdf") as pdf:
for page in pdf.pages:
tables = page.extract_tables()
| Option | Purpose | Example |
|---|---|---|
--with pkg | Add dependency for this run only | uv run --with rich script.py |
--python X.Y | Use specific Python version | uv run --python 3.11 script.py |
--no-project | Ignore pyproject.toml in directory | uv run --no-project script.py |
Arguments after the script name pass through to the script:
uv run script.py input.csv --output results.json
In the script:
import sys
print(sys.argv) # ['script.py', 'input.csv', '--output', 'results.json']
"uv: command not found"
→ uv not installed. See references/install-uv.md
Module not found errors
→ Add missing package to dependencies block or use --with
Wrong Python version
→ Specify version: uv run --python 3.11 script.py
→ Or add requires-python to script metadata
Script in a project directory picks up wrong dependencies
→ Use --no-project flag before script name
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
6 skills in this plugin
/document-extractorExtract structured data from documents that resist standard parsing, such as redacted records, scanned forms, inconsistent tables, and OCR artifacts. Use this skill when a journalist needs to transform messy PDFs or images into structured JSON with full provenance tracking. Triggers on requests involving FOIA documents, court records, financial disclosures, government forms, leaked documents, or any document described as "hard to parse," "scanned," "redacted," or "inconsistent."/faraQuery the US DOJ Foreign Agents Registration Act (FARA) public eFile API — look up registrants, their foreign principals, short-form registrants, and PDF filing URLs. Use whenever the user mentions FARA, FARA.gov, efile.fara.gov, foreign agents, foreign-principal filings, foreign lobbying disclosures, or needs to enrich people/company records with FARA registration data, even when they don't explicitly say "FARA API"./structured-data-analysis-journalismAnalyze preprocessed data for investigative journalism with full transparency. Use when a journalist has clean, preprocessed data ready for analysis and needs to identify patterns, anomalies, relationships, or statistical findings that support a story. Triggers include requests to analyze data, find patterns, identify outliers, cross-reference records, calculate statistics, or answer specific investigative questions. Complements the structured-data-preprocessing skill. Emphasizes simple, legible analyses over complex methods—every finding must be explainable to editors and defensible under scrutiny./journalistic-data-preprocessingPreprocessing workflow for journalistic data analysis emphasizing transparency, provenance, and human oversight. Use when: (1) Loading messy data files (Excel, CSV, JSON) into analysis-ready format, (2) Auditing data quality before analysis, (3) Cleaning data with full transformation documentation, (4) Preparing data for investigative journalism projects. Core principle: No silent transformations—every change is documented and approved./tipsheet-generatorGenerate investigative journalism tipsheets from unfamiliar data collections. Use this skill whenever a user provides a dataset, document collection, database, or other raw material and wants to find leads, signals, patterns, outliers, or story tips — especially when the data is large, messy, or unfamiliar. Also trigger when the user says things like "what's in here", "anything interesting in this data", "find me leads", "tipsheet", "story ideas from this", "what jumps out", or when they drop a large dataset and want an initial assessment. This skill handles everything from a single CSV to multi-gigabyte collections with millions of records.
npx claudepluginhub nhagar/claude-plugins-journalism --plugin journalism-toolsOther plugins' skills for the same job