python-services

A set of guidance for Python command-line tools and backend services. Python is a programming language; a command-line tool runs from a terminal, and a backend service handles work behind an application.

In plain words
What is it for?
Use it when building CLI programs, FastAPI services, background jobs, or Python projects managed with uv, ruff, ty, and pytest.
Why use it?
It gives consistent approaches for dependencies, formatting, type checks, tests, asynchronous work, and web services.

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

Made for: Claude Code, Codex.

Per session 55 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,442 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00055 $0.04442
Opus 5 $0.00028 $0.02221
Sonnet 5 $0.00011 $0.00888
Haiku 4.5 $0.00006 $0.00444

Measured 2d ago against content hash 3531aa097398, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

python-services scanned grade A with 1 finding 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 2d ago.

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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- **Switching to a shared pooled `requests.Session` newly exposes stale keep-alive failures.** Module-level `requests.get`/`requests.post` build a fresh `Session` and connection pool per call, so a dead or half-closed so
skills/python-services/SKILL.md · 201 lines

How it starts

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

Python Services & CLI

Modern Tooling

Tool Replaces Purpose
uv pip, virtualenv, pyenv, pipx Package/dependency management
ruff flake8, black, isort Linting + formatting
ty mypy, pyright Type checking (Astral, faster)
  • uv init --package myproject for distributable packages, uv init for apps
  • uv add <pkg>, uv add --group dev <pkg>, never edit pyproject.toml deps manually
  • uv run <cmd> instead of activating venvs -- auto-activates the venv without explicit activation
  • uv add --upgrade <pkg> to upgrade a single package without touching others
  • uv tree --outdated to preview what would be upgraded before committing
  • uv.lock goes in version control
  • uv treats an exactly-pinned (==) yanked transitive version as unsolvable; plain pip only warns and installs it. If a dependency hard-pins a yanked release (and bumping the leaf won't help because the pin is exact), uv pip install fails resolution where a pip-based script stays green. Drop the package from the requirements you feed uv when it's off your code path; fall back to pip only when the path genuinely needs it
  • A user-level ~/.config/uv/uv.toml carrying exclude-newer is serialized into uv.lock as an [options] block, and a clean CI runner with no matching global policy then rejects the committed lock: Ignoring existing lockfile due to removal of global exclude newer, followed by uv sync --locked failing. Pinning CI to the same uv version does not fix it -- the difference is configuration, not resolver. Generate repository locks with uv --no-config lock and spell canonical commands uv --no-config sync --locked / uv --no-config run …; strip any inherited [options] exclude-newer from the committed lock and add a contract test that rejects those entries and pins the --no-config command shape, or a later local regeneration reintroduces the CI failure silently
  • Use [dependency-groups] (PEP 735) for dev/test/docs, not [project.optional-dependencies]
  • PEP 723 inline metadata for standalone scripts with deps
  • ruff check --fix . && ruff format . for lint+format in one pass

Read the full file on GitHub · 201 lines

Files

What ships with it

3 files 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. 2d ago First seen · 201 lines · 55 tokens per session scan A 3531aa097398

Subscribe to this mod's changes

python-services is a skill published in the GitHub repository iliaal/ai-skills (40 stars, last pushed 3d ago), licensed MIT. It adds 55 tokens to every session and 4,442 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

python-patterns

Python best practices including type hints, async patterns, testing, and project structure.

cosmicstack-labs/mercury-agent-skills · 19 tokens

gpt-vis

推荐并生成合适的数据可视化图表,使用 GPT-Vis 库。支持两种输出模式:(1)语法模式——生成 Syntax 或 JSON 配置;(2)代码模式——生成完整的运行代码。支持 26 种图表类型。.

antvis/chart-visualization-skills · 63 tokens

antv-x6-editor

Use this skill whenever the user wants to create, customize, or troubleshoot X6 v3 graph editor diagrams. Triggers include: any mention of 'X6', 'antv x6', '@antv/x6', 'X6 editor', 'X6 图编辑', '流程图', 'DAG', 'ER图', '实体关系图', '血缘图', '组织架构图', 'UML类图', 'flowchart', 'DAG diagram', 'ER diagram', 'lineage graph', 'org chart'…

antvis/chart-visualization-skills · 253 tokens

infographic-creator

Create beautiful infographics based on given text content. Use when users request to create infographics.

antvis/chart-visualization-skills · 24 tokens

antv-g2-chart

Use this skill whenever the user wants to create, customize, or troubleshoot G2 v5 chart visualizations. Triggers include: any mention of 'G2', 'antv g2', '@antv/g2', 'G2 chart', 'G2 可视化', or requests to produce charts like bar charts (柱状图), line charts (折线图), pie charts (饼图), scatter plots (散点图), area charts (面积图)…

antvis/chart-visualization-skills · 230 tokens

review-spd

Findings-first code review workflow for AI coding agents. Use when the user asks to review uncommitted changes, commits in a date range, or a branch compared to the main branch / PR-style diff. Focuses on bugs, regressions, correctness risks, missing tests, security/data-safety issues, and other behavior-changing…

zhu1090093659/spec_driven_develop · 72 tokens