writing-python

writing-python is a skill for Claude Code, Codex from alexei-led/cc-thingz. It costs 74 tokens per session (625 once invoked), scanned A, original, MIT.

A set of rules for writing Python 3.12 or newer code, including scripts, command-line tools, and services.

In plain words
What is it for?
Use it when creating or changing Python programs, with guidance for tools such as pytest, uv, ruff, and pyright.
Why use it?
It encourages consistent project patterns, early testing, clear type information, and limited dependencies, reducing avoidable code and maintenance problems.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when creating or changing Python programs, with guidance for tools such as pytest, uv, ruff, and pyright.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/alexei-led/cc-thingz/writing-python
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.

Any agent
npx skills add alexei-led/cc-thingz --skill writing-python
Clone the repo
git clone --depth 1 https://github.com/alexei-led/cc-thingz

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 writing-python

README.md
[![agentmods](https://agentmods.dev/badge/skills/alexei-led/cc-thingz/writing-python/github.svg)](https://agentmods.dev/skills/alexei-led/cc-thingz/writing-python)
Your own site
<a href="https://agentmods.dev/skills/alexei-led/cc-thingz/writing-python"><img src="https://agentmods.dev/badge/skills/alexei-led/cc-thingz/writing-python/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for writing-python

Your own site · 80×15
<a href="https://agentmods.dev/skills/alexei-led/cc-thingz/writing-python"><img src="https://agentmods.dev/badge/skills/alexei-led/cc-thingz/writing-python.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 74 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 625 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.00074 $0.00625
Opus 5.5 $0.00030 $0.00250
Sonnet 5.5 $0.00015 $0.00125
Haiku 4.5 $0.00007 $0.00063

Measured 2mo ago against content hash 0e5c9311d8a9, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

writing-python 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 2mo 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.

- Stdlib before packages: `argparse`, `dataclasses`, `pathlib`, `json`, `urllib`, `logging`. Do not add Rich, pydantic, or dotenv only for polish.
src/skills/writing-python/SKILL.md · 42 lines

How it starts

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

Python Development

pyproject.toml is the source of truth for the Python target, tools, scripts, and dependencies. Check it, .python-version, and CI before using 3.12-only syntax. Project conventions win over these defaults.

Toolchain

  • uv for environments and commands (uv run, uv add); never call pip directly. Match the lockfile already in use.
  • Ruff for lint and format. Pyright for types, or ty only when the project has adopted it.
  • pytest for tests.

Defaults

  • Stdlib before packages: argparse, dataclasses, pathlib, json, urllib, logging. Do not add Rich, pydantic, or dotenv only for polish.
  • 3.12+ typing: X | Y, builtin generics, PEP 695 generics and type aliases. Keep legacy TypeVar style when editing pre-3.12 modules.
  • @dataclass(frozen=True, slots=True) for small values; TypedDict with NotRequired at recurring JSON boundaries; Protocol owned by the consumer. Keep dict[str, Any] at the boundary only.
  • Import collection ABCs from collections.abc. Take Sequence[T] for read-only inputs.
  • Wrap errors with raise DomainError(...) from exc. Catch broad exceptions only where they become an exit code, response, log entry, or re-raise.
  • Async: asyncio.TaskGroup for sibling tasks, asyncio.timeout around external waits. Keep references to background tasks so their exceptions surface.
  • Text I/O takes an explicit encoding. Sort glob results when order reaches output or tests.
  • Libraries log through logging; they never print diagnostics.

CLIs

  • argparse for small tools; Click or Typer only when the project already uses them.
  • main(argv: Sequence[str] | None = None) -> int; call asyncio.run only there. Expose it via [project.scripts] and keep python -m pkg working.
  • Config precedence: flag, env, config file, default.

References

  • testing.md: read when adding or reshaping tests, or when the suite is slow.
  • linting.md: read when changing Ruff or type-checker config, or the lint/type-check commands.

Read the full file on GitHub · 42 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. 2mo ago Changed · -17 lines 0e5c9311d8a9
  2. 2mo ago Changed · +7 tokens per session f9013b0da172
  3. 3mo ago First seen · 59 lines · 67 tokens per session scan A b257d930e4e9

Subscribe to this mod's changes

writing-python is a skill published in the GitHub repository alexei-led/cc-thingz (37 stars, last pushed 6d ago), licensed MIT. It adds 74 tokens to every session and 625 once invoked, about $0.0003 per session on Opus 5.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

writing-python compared with skills from other repositories

writing-python next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
writing-pythonalexei-led/cc-thingzSkill376d agoMITA74Claude Code, Codex
plankton-code-qualityloulanyue/awesome-claude-notesSkill2712mo agoMITA34Claude Code
python-authoringpaulnsorensen/easy-cheeseSkill203d agoMITA88Claude Code
update-depsreidemeister94/development-skillsSkill1223d agoMITA27Claude Code
python-backend-expertmathisk2095/jko-claude-pluginsSkill31mo agoMITA183Claude Code
python-engineering-guidelinesanywhere-labs/Agents-AnywhereSkill4.0kyesterdayApache-2.0A75Codex
splitting-oversized-modulesPostHog/posthog-fossSkill736todayMITA197Claude Code, Codex