write-python

write-python is a skill for Claude Code, Codex from JimmyPaolini/codebase. It costs 100 tokens per session (1,769 once invoked), scanned A, original, MIT.

A set of rules for creating and maintaining Python projects in a shared codebase. It covers project setup, formatting, linting, type checking, testing, and security checks.

In plain words
What is it for?
Use it when starting Python projects, editing project configuration, choosing Python tooling, or setting up Python commands in Nx, a build and task-running system.
Why use it?
It keeps Python tools and settings consistent across projects, including projects in a monorepo—a repository containing multiple related projects.

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

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/jimmypaolini/codebase/write-python.svg)](https://agentmods.dev/skills/jimmypaolini/codebase/write-python)
Your own site
<a href="https://agentmods.dev/skills/jimmypaolini/codebase/write-python"><img src="https://agentmods.dev/badge/skills/jimmypaolini/codebase/write-python.svg" alt="Measured on agentmods" height="20"></a>
Per session 100 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,769 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.00100 $0.01769
Opus 5 $0.00050 $0.00885
Sonnet 5 $0.00020 $0.00354
Haiku 4.5 $0.00010 $0.00177

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

Security

Grade A, and why

write-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.

.agents/skills/write-python/SKILL.md · 179 lines

How it starts

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

Write Python

All Python projects inherit configuration from the root pyproject.toml and Nx targetDefaults. Use uv run (never uvx) for reproducible tool invocations pinned in uv.lock.

Every Python project is a member of the uv workspace declared in the root pyproject.toml, sharing one uv.lock and one .venv, both at the repository root.

Tool Targets

Seven Python tool targets are defined as codebase-wide targetDefaults in nx.json:

Target Tool Purpose
ruff-format ruff Format Python source
ruff-lint ruff Lint Python source
pyright pyright Primary type checker (strict mode)
pytest pytest Run tests (unit/integration/coverage)
vulture vulture Dead code detection
ty ty Supplementary type checker (Astral, pre-1.0)
bandit bandit Security linter (CI scan-security only)

Project Tags

Every Python project must declare the language:python tag in project.json. This enables the correct composite target overrides (Python sub-targets instead of TypeScript ones).

{
  "tags": ["language:python", "scope:<name>", "type:application"]
}

project.json Pattern

Declare every sub-target as {} so Nx applies the targetDefaults. Override composite targets to compose the Python sub-targets:

{
  "tags": ["language:python", "scope:my-app", "type:application"],
  "targets": {
    "format": {
      "configurations": {
        "check": { "commands": ["nx run {projectName}:ruff-format:check"], "parallel": true },
        "write": { "commands": ["nx run {projectName}:ruff-format:write"], "parallel": false }
      }
    },
    "lint": {
      "configurations": {
        "check": { "commands": ["nx run {projectName}:ruff-lint:check"], "parallel": true },
        "write": { "commands": ["nx run {projectName}:ruff-lint:write"], "parallel": false }
      }
    },
    "typecheck": {
      "executor": "nx:run-commands",
      "options": {
        "commands": ["nx run {projectName}:pyright", "nx run {projectName}:ty"],
        "parallel": true
      }
    },
    "test": {
      "executor": "nx:run-commands",
      "options": { "commands": ["nx run {projectName}:pytest"] },
      "configurations": {
        "unit": { "commands": ["nx run {projectName}:pytest:unit"] },
        "integration": { "commands": ["nx run {projectName}:pytest:integration"] },
        "coverage": { "commands": ["nx run {projectName}:pytest:coverage"] }
      }
    },
    "bandit": {},
    "pytest": {},
    "pyright": {},
    "ruff-format": {},
    "ruff-lint": {},
    "ty": {},
    "vulture": {}
  }
}

Read the full file on GitHub · 179 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 · 179 lines · 100 tokens per session scan A c7421da63f58

Subscribe to this mod's changes

write-python is a skill published in the GitHub repository JimmyPaolini/codebase (0 stars, last pushed today), licensed MIT. It adds 100 tokens to every session and 1,769 once invoked, about $0.0005 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-09-03.

Related

Other skills, from other repositories

agent-framework-azure-ai-py

Build persistent agents on Azure AI Foundry using the Microsoft Agent Framework Python SDK.

sickn33/agentic-awesome-skills · 24 tokens

python-feature-lifecycle

Guidance for package and feature lifecycle in the Agent Framework Python codebase, including stage meanings, feature-stage decorators, feature enums, and how to move APIs from one stage to the next.

microsoft/agent-framework · 43 tokens

python-development

Coding standards, conventions, and patterns for developing Python code in the Agent Framework repository. Use this when writing or modifying Python source files in the python/ directory.

microsoft/agent-framework · 35 tokens

dd-code-generation

Use pup CLI for immediate Datadog operations or generate code for integration into applications.

DataDog/pup · 16 tokens

rocm-kernels

Provides guidance for writing and benchmarking optimized Triton kernels for AMD GPUs (MI355X, R9700) on ROCm, targeting HuggingFace diffusers (LTX-Video, SD3, FLUX) and transformers. Core kernels: RMSNorm, RoPE 3D, GEGLU, AdaLN. Includes XCD swizzle, autotune, diffusers integration patterns, and LTX-Video pipeline…

huggingface/kernels · 93 tokens

typing-exclusion-worker

Python typing exclusion worker: remove assigned mypy exclusion modules in small scoped batches, fix typing issues, run validation, and produce a structured completion summary. Use when running parallel typing-debt workers or when asked to remove modules from pyproject mypy exclusion overrides.

getsentry/skills · 57 tokens