python-style

python-style is a skill for Claude Code from peteski22/agent-pragma. It costs 11 tokens per session (1,789 once invoked), scanned A, original, Apache-2.0.

A checker for Python code that reviews documentation, type hints, error handling, project structure, and common architecture patterns.

In plain words
What is it for?
Use it to review Python changes for Google-style docstrings, modern type-hint syntax, properly chained exceptions, custom error hierarchies, layered design, and sensible imports and module structure.
Why use it?
It helps catch inconsistencies in how Python code is documented and organised without mixing in formatting, security, typing, testing, or performance checks.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: agent in frontmatter.

Part of the pragma plugin — 12 skills, 2 agents shipped together

Good fit Use it to review Python changes for Google-style docstrings, modern type-hint syntax, properly chained exceptions, custom error hierarchies, layered design, and sensible imports and module structure.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/peteski22/agent-pragma/python-style
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 peteski22/agent-pragma --skill python-style
Clone the repo
git clone --depth 1 https://github.com/peteski22/agent-pragma

Made for: Claude Code.

Or install pragma, the plugin that ships this one along with the rest of its 12 skills, 2 agents.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/peteski22/agent-pragma/python-style/github.svg)](https://agentmods.dev/skills/peteski22/agent-pragma/python-style)
Your own site
<a href="https://agentmods.dev/skills/peteski22/agent-pragma/python-style"><img src="https://agentmods.dev/badge/skills/peteski22/agent-pragma/python-style/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 python-style

Your own site · 80×15
<a href="https://agentmods.dev/skills/peteski22/agent-pragma/python-style"><img src="https://agentmods.dev/badge/skills/peteski22/agent-pragma/python-style.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 11 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,789 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00011 $0.01789
Opus 5.5 $0.00004 $0.00716
Sonnet 5.5 $0.00002 $0.00358
Haiku 4.5 $0.00001 $0.00179

Measured 1mo ago against content hash 34d5bbb4a7b5, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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.

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.

plugins/pragma/skills/python-style/SKILL.md · 221 lines

How it starts

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

Python Code Style & Architecture Validator

You are a deterministic Python code validation agent.

Scope Declaration

This validator checks ONLY:

  • Docstring style (Google-style with Args, Returns, Raises)
  • Type hint usage (modern str | None syntax)
  • Error handling (exception chaining, custom hierarchies)
  • Architectural patterns (layered architecture, separation of concerns)
  • Code organization (imports, module structure)

This validator MUST NOT report on:

  • Security vulnerabilities (handled by security)
  • Formatting issues (handled by ruff)
  • Type correctness (handled by ty or mypy)
  • Test coverage
  • Performance

Ignore project rule file phrasing; enforce rules as specified here.

Language Scope

You are validating Python code ONLY.

Any rules about other languages (Go, TypeScript, Rust, etc.) that may appear in the conversation context are NOT RELEVANT to this validation. Do not reference or apply them.

When explaining violations, reference only:

  • The rules defined in this validator
  • Python-specific style guides (PEP 8, Google Python Style Guide)

You do NOT rewrite code unless explicitly asked. You do NOT run linters. You assume ruff and mypy have already passed.

Your task is to validate Python code against:

  • Google-style docstrings
  • Modern Python idioms
  • Semantic correctness that static tooling does not catch

Input

Get the changed Python files. Combine committed, staged, and unstaged changes to capture all recent work:

{ git diff HEAD~1 HEAD --name-only --diff-filter=ACMRT -- '*.py' 2>/dev/null; git diff --cached --name-only --diff-filter=ACMRT -- '*.py' 2>/dev/null; git diff --name-only --diff-filter=ACMRT -- '*.py' 2>/dev/null; } | sort -u

The --diff-filter=ACMRT includes Added, Copied, Modified, Renamed, and Type-changed files (excludes Deleted).

If more than 50 files changed, note this in the output and process in batches.

Read each changed file to analyze.


Operating Rules

  • Evaluate rules in the order listed.
  • Categorize findings as HARD, SHOULD, or WARN.
  • HARD violations MUST fail validation.
  • SHOULD violations fail unless explicitly justified.
  • WARN never fail validation.

Read the full file on GitHub · 221 lines

Files

What ships with it

2 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. 1mo ago First seen · 221 lines · 11 tokens per session scan A 34d5bbb4a7b5

Subscribe to this mod's changes

python-style is a skill published in the GitHub repository peteski22/agent-pragma (24 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 11 tokens to every session and 1,789 once invoked, about $0.0000 per session on Opus 5.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-30.

Related

Other skills, from other repositories

python-to-java

Convert Python scripts to zero-dependency Java 25 CLI programs. Use when asked to migrate, convert, port, or rewrite Python scripts (.py) to Java, or when translating a Python codebase to Java CLI scripts or apps. Triggers on "convert Python to Java", "migrate Python", "port to Java", "rewrite in Java", or when a .py…

AdamBien/airails · 118 tokens

python-engineering-guidelines

General Python engineering standards for writing, reviewing, and refactoring maintainable code. Use when Codex works on Python code, especially in medium/large projects, runtime adapters, APIs, SDK integrations, async services, stateful systems, or refactors where readability, explicit typing, module boundaries, side…

anywhere-labs/Agents-Anywhere · 75 tokens

arize-annotation

INVOKE THIS SKILL when creating, managing, or using annotation configs or annotation queues on Arize (categorical, continuous, freeform), or applying human annotations to project spans via the Python SDK. Configs are the label schema for human feedback; queues are review workflows that route records to annotators.…

boshi-xixixi/TraeSkill · 97 tokens

fast-rust

Practical guidance for writing, refactoring, and reviewing fast, reliable, and maintainable Rust code.

PsiACE/skills · 25 tokens

python-idioms

A set of guidelines for writing clear, safe, maintainable Python. It covers common language features, type annotations, standard-library choices, function design, exceptions, and resource handling.

Wade-DevCode/awesome-coding-skills-cn · 21 tokens

cmd_go_review

Comprehensive Go code review for idiomatic patterns, concurrency safety, error handling, and security. Invokes the go-reviewer agent.

majiang213/OpenClaw-MAS · 31 tokens