python-runtime

A guide for setting up and maintaining a modern Python project, including code checks, tests, type annotations, dependencies, and isolated environments.

In plain words
What is it for?
Use it to configure Ruff, pytest, mypy or pyright, virtual environments, dependency files, and recommended source and test folders.
Why use it?
It helps teams use consistent Python tooling and project structure while catching style, typing, and testing problems early.

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

Made for: Claude Code, Codex.

Per session 34 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,719 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.01719
Opus 5 $0.00017 $0.00860
Sonnet 5 $0.00007 $0.00344
Haiku 4.5 $0.00003 $0.00172

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

Security

Grade A, and why

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

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-runtime/SKILL.md · 250 lines

How it starts

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

Python Runtime

Skill para configurar y mantener toolchains Python modernos: Ruff (linting + formatting), pytest, type hints con mypy, gestión de dependencias, virtual environments y estándares de proyecto.

Principios fundamentales

  • Python 3.12+ como runtime mínimo.
  • Ruff como linter y formatter unificado (reemplaza flake8, isort, black, pyflakes).
  • pytest como test runner con plugins (pytest-cov, pytest-asyncio, hypothesis).
  • Type hints obligatorios en funciones públicas. mypy o pyright para validación estática.
  • Virtual environments siempre. Nunca instalar dependencias globalmente.

Estructura de proyecto recomendada

proyecto/
├── src/
│   └── mi_paquete/
│       ├── __init__.py
│       ├── handlers/
│       ├── services/
│       ├── repositories/
│       ├── models/
│       └── utils/
├── tests/
│   ├── unit/
│   ├── integration/
│   └── conftest.py
├── pyproject.toml
├── requirements.txt
├── requirements-dev.txt
└── README.md

pyproject.toml recomendado

[project]
name = "mi-proyecto"
version = "0.1.0"
requires-python = ">=3.12"
dependencies = [
    "aws-lambda-powertools[all]>=2.0.0",
    "pydantic>=2.0.0",
    "boto3>=1.34.0",
]

[project.optional-dependencies]
dev = [
    "ruff>=0.4.0",
    "mypy>=1.10.0",
    "pytest>=8.0.0",
    "pytest-cov>=5.0.0",
    "pytest-asyncio>=0.23.0",
    "hypothesis>=6.100.0",
    "boto3-stubs[dynamodb,s3,sqs]",
    "moto[dynamodb,s3,sqs]>=5.0.0",
]

[tool.ruff]
target-version = "py312"
line-length = 120

[tool.ruff.lint]
select = [
    "E",    # pycodestyle errors
    "W",    # pycodestyle warnings
    "F",    # pyflakes
    "I",    # isort
    "N",    # pep8-naming
    "UP",   # pyupgrade
    "B",    # flake8-bugbear
    "SIM",  # flake8-simplify
    "TCH",  # flake8-type-checking
    "RUF",  # ruff-specific rules
]
ignore = ["E501"]  # line length handled by formatter

[tool.ruff.lint.isort]
known-first-party = ["mi_paquete"]

[tool.mypy]
python_version = "3.12"
strict = true
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true

[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "-v --tb=short --strict-markers"
markers = [
    "unit: Unit tests",
    "integration: Integration tests",
    "slow: Slow tests",
]

Read the full file on GitHub · 250 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 First seen · 250 lines · 34 tokens per session scan A d3486e09c4bd

Subscribe to this mod's changes

python-runtime is a skill published in the GitHub repository eliecer2000/kiro-bootstrap (9 stars, last pushed 5mo ago), licensed MIT. It adds 34 tokens to every session and 1,719 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-08-31.