python-style

A set of Python coding conventions covering type hints, imports, data containers, validation, database access, and logging.

In plain words
What is it for?
Use it when writing or reviewing Python code, especially code that handles external input or database queries.
Why use it?
It gives developers consistent rules and reduces errors from unsafe SQL, weak typing, messy imports, and inappropriate logging.

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

Made for: Claude Code, Codex.

Per session 13 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 289 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.00013 $0.00289
Opus 5 $0.00006 $0.00144
Sonnet 5 $0.00003 $0.00058
Haiku 4.5 $0.00001 $0.00029

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

Security

Grade A, and why

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

examples/bloated-demo/.claude/skills/python-style/SKILL.md · 44 lines

What it actually says

Python Style

Type hints

Use type hints in all function signatures, including return types. Prefer concrete types over Any; reach for Protocol when you really need duck typing. Run mypy or pyright in CI.

Dataclasses and Pydantic

Use dataclasses for simple data containers; reach for Pydantic when you need runtime validation at a system boundary. Do not use Pydantic internally where dataclasses suffice — the validation cost is real.

Imports

Sort imports with isort/ruff. One module per import line. Group: stdlib, third-party, first-party, separated by blank lines.

SQL safety

Always use parameterized queries for every database access. Never concatenate user-provided strings into SQL statements directly. This includes dynamic WHERE clauses, ORDER BY clauses, and table names.

Logging

Never log secrets, personally identifiable information, or full request or response bodies. Scrub sensitive fields at the logging boundary using a structured logger.

Boundary discipline

Treat any data that crossed a network or process boundary as untrusted until proven otherwise. Apply the same scrutiny to data from other internal services as you would to data from the public internet. The threat model assumes lateral movement; act accordingly across every service-to-service hop in the system.

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 · 44 lines · 13 tokens per session scan A 5eae6d6f9a6c

Subscribe to this mod's changes

python-style is a skill published in the GitHub repository edenfunf/promptc (2 stars, last pushed 4mo ago), licensed MIT. It adds 13 tokens to every session and 289 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.