loom-python

Python development guidance covers production Python code, including web applications, data processing, machine learning, asynchronous programs, typing, testing, packaging, and linting.

In plain words
What is it for?
Use it for FastAPI, Django, Flask, pandas, NumPy, scikit-learn, PyTorch, pytest, type hints, uv, Poetry, Ruff, mypy, and Black work.
Why use it?
It helps avoid common Python and tooling mistakes while fitting changes to the repository's existing package manager and configuration.

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

Made for: Claude Code, Codex.

Per session 69 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 8,803 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.00069 $0.08803
Opus 5 $0.00034 $0.04401
Sonnet 5 $0.00014 $0.01761
Haiku 4.5 $0.00007 $0.00880

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

Security

Grade A, and why

loom-python 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/loom-python/SKILL.md · 609 lines

How it starts

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

Python Language Expertise

Overview

Idiomatic, production-grade Python: modern typing, async, packaging, and the web/data/ML ecosystem. Assumes competence — the value is in what is easy to get wrong (interning, mutable defaults, blocking the event loop, GIL, dataclass/Pydantic boundaries), not syntax tutorials.

Tooling (uv / ruff / mypy)

Ruff is a strong default for linting and formatting. uv is a capable project and environment manager, but preserve the repository's existing package manager and lockfile unless a migration is explicitly requested.

uv — a single tool for project environments, locking, Python installation, and pip-compatible workflows. Use it for new work or repositories that already use it; do not treat it as an implicit replacement for Poetry or another established workflow.

Task Command
New project uv init (writes pyproject.toml)
Add / remove dep uv add httpx / uv remove httpx (updates pyproject.toml + uv.lock)
Add dev dep uv add --dev pytest
Sync env from lock uv sync (creates .venv, exact/reproducible)
Run in project env uv run pytest (auto-syncs first; no manual activate)
Install a Python uv python install 3.12
Ephemeral tool uvx ruff check (= uv tool run)
pip shim uv pip install ... (drop-in, no project file)
  • In a uv-managed project, use uv add/uv remove so the manifest and uv.lock stay in sync; use uv sync --frozen in CI to fail on drift.

ruff — single linter+formatter replacing flake8, isort, pyupgrade, pydocstyle, autoflake, and much of bandit.

  • ruff check --fix (lint+autofix), ruff format (near-identical to black, replaces it).
  • Config lives under [tool.ruff.lint] since 0.1 — top-level select is deprecated and warns.
  • Useful rule groups: E/W pycodestyle, F pyflakes, I isort, UP pyupgrade (keeps typing current), B bugbear (catches mutable defaults, lru_cache on methods), SIM, S bandit-security, ASYNC, PL pylint, RUF. Suppress with # noqa: E501 (never bare # noqa).

Read the full file on GitHub · 609 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 · 609 lines · 69 tokens per session scan A 0a01052f7b3f

Subscribe to this mod's changes

loom-python is a skill published in the GitHub repository cosmix/loom (54 stars, last pushed 3d ago), licensed MIT. It adds 69 tokens to every session and 8,803 once invoked, about $0.0003 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-30.

Related

Other skills, from other repositories

Agent Design Principles

A checklist for designing agent personas, skills, and multi-agent pipelines that stay reliable as they grow — grounded in the 12-factor-agents principles.

niels-emmer/myace · 34 tokens

workers-best-practices

Reviews and authors Cloudflare Workers code against production best practices. Load when writing new Workers, reviewing Worker code, configuring wrangler.jsonc, or checking for common Workers anti-patterns (streaming, floating promises, global state, secrets, bindings, observability). Biases towards retrieval from…

cloudflare/skills · 72 tokens

find-journalists

Build, refine, dedupe, and enrich small fit-checked journalist lists for newsjack campaigns. Uses the newsjack CLI (preferred) or the medialyst MCP for news search and journalist enrichment, and falls back to a best-effort local mode with no verified contacts; the agent owns how returned data is organized.

elvisun/newsjack · 69 tokens

story-origin-check

Recover the first public timestamp and canonical major coverage for a newsjacking signal, then decide whether newer coverage is the same story, a different story, or a materially new development.

elvisun/newsjack · 40 tokens

annotating-task-lineage

Annotate Airflow tasks with data lineage using inlets and outlets. Use when the user wants to add lineage metadata to tasks, specify input/output datasets, or enable lineage tracking for operators without built-in OpenLineage extraction.

astronomer/agents · 51 tokens

relevance-coarse-filter

Cheap, high-recall first-pass filter that removes obvious junk from a detector candidate pool before expensive story-origin research and PR judgment. Decides keep, monitoronly, or reject — never ranks, writes angles, verifies dates, or decides whether to pitch.

elvisun/newsjack · 57 tokens