python-conventions

A set of guidelines for writing clear, idiomatic Python code. It covers formatting, types, data structures, error handling, dependencies, and file operations.

In plain words
What is it for?
Use it when writing or reviewing Python, especially for function design, type hints, exceptions, resource handling, and project configuration.
Why use it?
It helps keep Python code consistent and easier to read, maintain, and review across a project.

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

Made for: Claude Code, Codex.

Per session 17 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 242 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.00017 $0.00242
Opus 5 $0.00009 $0.00121
Sonnet 5 $0.00003 $0.00048
Haiku 4.5 $0.00002 $0.00024

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

Security

Grade A, and why

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

src/cchad/data/skills/python-skill/SKILL.md · 27 lines

What it actually says

Python conventions

Style

  • Follow PEP 8; let a formatter (ruff/black) settle layout so you don't argue about it.
  • Add type hints to function signatures. Prefer X | None over Optional[X] on 3.10+.
  • Use f-strings for formatting.

Data & structure

  • Reach for dataclasses (or Pydantic at boundaries) instead of ad-hoc dicts for structured data.
  • Use comprehensions for simple transforms; a plain loop when logic gets involved.
  • Use pathlib.Path for filesystem paths, not string concatenation.
  • Manage resources with with (context managers), not manual open/close.

Robustness

  • Catch specific exceptions, not bare except:. Add context and re-raise with from.
  • Prefer standard library before adding a dependency.
  • Keep functions small and single-purpose; return early instead of nesting.

Environment

  • Use a virtual environment (uv/venv). Pin dependencies in pyproject.toml.
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 · 27 lines · 17 tokens per session scan A 344bbb5a8ddf

Subscribe to this mod's changes

python-conventions is a skill published in the GitHub repository Cypsy1714/cchad (1 stars, last pushed 2mo ago), licensed MIT. It adds 17 tokens to every session and 242 once invoked, about $0.0001 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-31.

Related

Other skills, from other repositories

memory

Use durable BB memory when prior project knowledge or cross-project user preferences can improve the current task, and save durable new learning through the bb memory CLI.

get-bb/bb · 32 tokens

workflows

Execute a workflow script that orchestrates multiple subagents deterministically. Use when the user explicitly requests a workflow, multi-agent orchestration, parallel or sequential agent pipelines, structured agent outputs, or a durable background workflow run.

get-bb/bb · 47 tokens

submit-a-plugin

Submit a bb plugin to the BB Community marketplace. Use whenever a user asks to submit, list, publish, or add a plugin to the BB marketplace, or asks for a marketplace pull request. This skill validates the plugin and release, creates the marketplace entry and icon, and opens the pull request.

get-bb/bb · 64 tokens

secrets

Securely request API keys, access tokens, passwords, webhook secrets, or other credentials and write them to a dotenv file without exposing their values to the agent. Use whenever a task needs a credential that the user must supply.

get-bb/bb · 48 tokens

analyze-bundle

Convert Next.js bundle analyzer data to NDJSON and explore it.

vercel-labs/dev3000 · 17 tokens

app-store-preflight-compliance

Pre-submission compliance scanner workflow for Apple App Store apps. Use when reviewing iOS, macOS, tvOS, watchOS, or visionOS projects (Swift, Objective-C, React Native, Expo) for App Store rejection risks, submission readiness, privacy compliance, or guideline violations.

RevylAI/greenlight · 65 tokens