python-ready

A command that checks and updates a project’s CLAUDE.md file with Python-development rules. CLAUDE.md is a project instruction file read by an AI coding assistant.

In plain words
What is it for?
It helps set rules for Nix-based environments, unittest, Pydantic, PyTorch, JAX, Loguru, Click, pathlib, enums, absolute imports, and type annotations.
Why use it?
It prevents Python projects from drifting into inconsistent environment, testing, typing, import, and library practices. It also makes required project conventions explicit.

Command

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 commands/breakds/claude.bds/python-ready
Clone the repo
git clone --depth 1 https://github.com/breakds/claude.bds
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 431 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.00000 $0.00431
Opus 5 $0.00000 $0.00216
Sonnet 5 $0.00000 $0.00086
Haiku 4.5 $0.00000 $0.00043

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

Security

Grade A, and why

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

bds-dev/commands/python-ready.md · 37 lines

What it actually says

Prepare CLAUDE CODE with Python-Specific Context

Task

Read the project’s CLAUDE.md. Ensure all Python rules below are present. If partially present, reorganize and edit CLAUDE.md so all rules are included exactly and unambiguously.

Python Rules

Environment

  1. Manage the dev environment with flake.nix only.
  2. Assume nix develop is active.
  3. Do not use pip, uv, or poetry.
  4. Run programs as modules: python -m package.module.

Library Preferences

  1. Use builtin unittest.
    • Discover all tests: python -m unittest discover
    • Run verbose/specific: python -m unittest -v path/to/test_file.py
  2. Use pydantic v2 for schemas and domain models.
  3. Use PyTorch and JAX for ML models.
  4. Use loguru for logging.
  5. Use click for CLI/arg parsing.
  6. Prefer pathlib over os.path.
  7. Use explicit StrEnum / IntEnum for enums.

Code Style

  1. Use absolute imports; do not use relative imports (e.g., avoid from .x import y).
  2. Prefer specific imports (e.g., from pydantic import BaseModel).
  3. Use type hints everywhere:
    • Annotate all function parameters and return types.
    • Use builtin generics (list, dict, tuple) instead of typing.List, etc.
    • For optionals, use MyType | None instead of Optional[MyType].

Documentation

  1. Write docstrings for all public modules, functions, classes, methods, and public-facing APIs. PEP 8 and PEP 257 recommend docstrings for all public elements.
  2. In docstrings:
    • Do not include types in the Args: section, type hints in signatures cover that.
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 · 37 lines · 0 tokens per session scan A 5ea798c5898e

Subscribe to this mod's changes

python-ready is a command published in the GitHub repository breakds/claude.bds (2 stars, last pushed 3mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 431 tokens. 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.