python-stack

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

A standard setup for building typed Python packages, command-line tools, web applications, agents, and tests with uv, Ruff, ty, pytest, Litestar, and Typer. It defines conventions for dependencies, formatting, type checking, testing, and security checks.

In plain words
What is it for?
Use it to start or maintain Python libraries, CLIs, web APIs, agent backends, and test suites with shared quality and dependency practices.
Why use it?
It gives Python projects a consistent development setup instead of leaving each project to choose unrelated tools and rules. It also distinguishes full projects from small standalone scripts.

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-stack
Any agent
npx skills add fmind/dot --skill python-stack
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-stack

README.md
[![agentmods](https://agentmods.dev/badge/skills/fmind/dot/python-stack.svg)](https://agentmods.dev/skills/fmind/dot/python-stack)
Your own site
<a href="https://agentmods.dev/skills/fmind/dot/python-stack"><img src="https://agentmods.dev/badge/skills/fmind/dot/python-stack.svg" alt="Measured on agentmods" height="20"></a>
Per session 40 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,170 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.1 $0.00040 $0.02170
Opus 5 $0.00020 $0.01085
Sonnet 5 $0.00008 $0.00434
Haiku 4.5 $0.00004 $0.00217

Measured yesterday against content hash cc6497c59240, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

python-stack 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 10 executable files (references/conftest.py, references/init-cli.py, references/init-library.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-stack/SKILL.md · 85 lines

How it starts

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

Python Stack Standard

Canonical Python development: scaffolding, libraries, CLIs, Litestar web apps, and the Python API side of ADK agents. Single-file scripts belong to python-script; the agent workflow belongs to google-adk.

1. Core & Quality Stack

  • Python: target latest stable; use modern syntax (pattern matching, PEP 695 generics, typing.Annotated).
  • Dependencies: uv exclusively — uv add, uv run, no manual venvs; commit uv.lock in every profile so installs and audits stay reproducible.
  • Tasks and hooks: mise.toml exposes the canonical vocabulary per mise; lefthook.yml wires pre-commit and pre-push per lefthook.
  • Linting and formatting: Ruff (ruff check --fix, ruff format) with zero warnings and no print (T201); dprint for config and markup per dprint.
  • Types: ty check strict; ty is pre-1.0, so pin a compatible range and keep suppressions narrow and evidenced.
  • Testing: pytest in tests/ with anyio and an 85% branch-coverage gate; the default suite is offline, and web integration tests opt into a disposable Postgres via conftest.py.
  • Security: uv audit scans dependencies as check:vuln and gitleaks is check:leaks; SAST is opt-in per opengrep.
  • Validation and config: Pydantic v2 and pydantic-settings BaseSettings; typed config.py, YAML only for cross-language needs.
  • Logging: structlogConsoleRenderer locally, JSONRenderer in production, stdlib loggers routed through it.

2. Project Scaffolding Workflow

  1. Information: define Slug, Description, Holder/Year, and Package (Slug with underscores) — every import path uses Package.
  2. Bootstrap (agents use google-adk instead):
    uv init --app --package --build-backend uv --vcs none --description "<description>" <slug>
    cd <slug> && uv python pin <major.minor>  # align .python-version with requires-python
    
  3. Manifest: pyproject.toml from pyproject.toml.template with one profile — web keeps the Web block; CLI adds typer and drops the Web block and testcontainers; library sets dependencies = [] and drops [project.scripts] and testcontainers.
  4. Config files:
  5. Sources: src/<package>/__init__.py from init.py (web), init-cli.py (CLI), or init-library.py; web and CLI add __main__.py from main.py.
  6. Tests: tests/__init__.py, then per profile:
  7. Validate: git init --initial-branch=main, then mise run install, mise run format, mise run check, mise run test; before the first commit, check:leaks scans the working tree.
  8. Finish: README.md per readme-agents, then git add . && git commit -m "chore: initial commit".

Read the full file on GitHub · 85 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 Changed cc6497c59240
  2. yesterday First seen · 85 lines · 40 tokens per session scan A 99c73721f191

Subscribe to this mod's changes

python-stack is a skill published in the GitHub repository fmind/dot (4 stars, last pushed today), licensed MIT. It adds 40 tokens to every session and 2,170 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.