python-script

python-script is a skill for Claude Code, Codex from fmind/dot. It costs 34 tokens per session (513 once invoked), scanned A, original, MIT.

A way to write a single-file Python command-line script with its required packages listed inside the file. It uses uv to install and run those packages without a full Python project.

In plain words
What is it for?
Use it for quick Python command-line tools that fit in one file, such as processing an input file or automating a small task.
Why use it?
It avoids setting up a virtual environment or project configuration for a small script. It also gives guidance for handling arguments, output, errors, and dependency versions.

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/fmind/dot/python-script
Any agent
npx skills add fmind/dot --skill python-script
Clone the repo
git clone --depth 1 https://github.com/fmind/dot

Made for: Claude Code, 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 python-script

README.md
[![agentmods](https://agentmods.dev/badge/skills/fmind/dot/python-script.svg)](https://agentmods.dev/skills/fmind/dot/python-script)
Your own site
<a href="https://agentmods.dev/skills/fmind/dot/python-script"><img src="https://agentmods.dev/badge/skills/fmind/dot/python-script.svg" alt="Measured on agentmods" height="20"></a>
Per session 34 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 513 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.00034 $0.00513
Opus 5 $0.00017 $0.00257
Sonnet 5 $0.00007 $0.00103
Haiku 4.5 $0.00003 $0.00051

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

Security

Grade A, and why

python-script 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.

The scan reads SKILL.md. This mod also ships 1 executable file (references/script.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/python-script/SKILL.md · 33 lines

What it actually says

PEP 723 Standalone Python Scripts

Single-file Python CLI scripts with inline dependency metadata (PEP 723) run by uv run — no virtualenv, no pyproject.toml; a script that outgrows one file moves to python-stack.

Workflow

  1. Start from the template: copy script.py; its shebang (#!/usr/bin/env -S uv run --quiet --script) and # /// script block declare requires-python and dependency lower bounds.
  2. Parse arguments with Typer: Annotated[..., typer.Argument/Option(...)] with help text; Rich Console() for stdout results and Console(stderr=True) for logs and errors.
  3. Handle errors at the boundary: catch in the command, err.print_exception(show_locals=False) (locals can hold secrets), then raise typer.Exit(code=1) from None; elsewhere let errors propagate.
  4. Run: chmod +x script.py && ./script.py input.txt, or uv run script.py input.txt; uv resolves and caches the dependencies on first run.
  5. Lock a durable script: uv lock --script script.py, then uv run --locked --script script.py; lower bounds alone are not reproducible.

Gotchas

  • Agent scratch scripts live in .agents/tmp/.
  • One file: past ~200 lines or a second module, switch to a full project.

Documentation

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. yesterday First seen · 33 lines · 34 tokens per session scan A 78000ad1d5cd

Subscribe to this mod's changes

python-script is a skill published in the GitHub repository fmind/dot (4 stars, last pushed today), licensed MIT. It adds 34 tokens to every session and 513 once invoked, about $0.0002 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.