claude-copilot: Skill for Claude Code

.claude/skills/code/python-idioms/SKILL.md

python-idioms is a skill for Claude Code from Everyone-Needs-A-Copilot/claude-copilot. It costs 116 tokens per session (2,018 once invoked), scanned A, original, MIT.

A Python code-quality guide and checker for idiomatic patterns, anti-patterns, style rules, type hints, and pre-commit issues.

In plain words
What is it for?
Use it when reviewing or improving Python, Django, Flask, pytest, or project-configuration files.
Why use it?
It helps make Python code clearer and more consistent, and can detect common non-Pythonic patterns with syntax-tree analysis. An abstract syntax tree is a structured representation of source code.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths.

This is Everyone-Needs-A-Copilot/claude-copilot's own configuration. It tells Claude Code how to work on claude-copilot itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything claude-copilot configures →

Part of the claude-copilot plugin — 73 skills, 18 commands, 16 agents, 6 hooks shipped together

Reuse

Borrowing it

Nothing to install: this file belongs to Everyone-Needs-A-Copilot/claude-copilot. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/Everyone-Needs-A-Copilot/claude-copilot/main/.claude/skills/code/python-idioms/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/Everyone-Needs-A-Copilot/claude-copilot

Made for: Claude Code.

Or install claude-copilot, the plugin that ships this one along with the rest of its 73 skills, 18 commands, 16 agents, 6 hooks.

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-idioms

README.md
[![agentmods](https://agentmods.dev/badge/skills/everyone-needs-a-copilot/claude-copilot/python-idioms/github.svg)](https://agentmods.dev/skills/everyone-needs-a-copilot/claude-copilot/python-idioms)
Your own site
<a href="https://agentmods.dev/skills/everyone-needs-a-copilot/claude-copilot/python-idioms"><img src="https://agentmods.dev/badge/skills/everyone-needs-a-copilot/claude-copilot/python-idioms/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-idioms

Your own site · 80×15
<a href="https://agentmods.dev/skills/everyone-needs-a-copilot/claude-copilot/python-idioms"><img src="https://agentmods.dev/badge/skills/everyone-needs-a-copilot/claude-copilot/python-idioms.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 116 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,018 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. 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.00116 $0.02018
Opus 5.5 $0.00046 $0.00807
Sonnet 5.5 $0.00023 $0.00404
Haiku 4.5 $0.00012 $0.00202

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

Security

Grade A, and why

python-idioms 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 1mo ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/python_lint.py, scripts/test_python_lint.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

_cache[key] = fetch(key)
.claude/skills/code/python-idioms/SKILL.md · 327 lines

How it starts

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

Python Idioms

Pythonic patterns, anti-patterns, and quality rules for clean Python code.

Core Principles

Principle Description
Explicit > Implicit Clear, readable code over clever tricks
EAFP Easier to Ask Forgiveness than Permission
Duck Typing Focus on behavior, not types
Flat > Nested Avoid deep nesting

Patterns vs Anti-Patterns

List/Dict Comprehensions

# GOOD: List comprehension
squares = [x**2 for x in range(10) if x % 2 == 0]

# BAD: Manual loop for simple transforms
squares = []
for x in range(10):
    if x % 2 == 0:
        squares.append(x**2)

Context Managers

# GOOD: Context manager for resources
with open('file.txt') as f:
    content = f.read()

# BAD: Manual resource management
f = open('file.txt')
try:
    content = f.read()
finally:
    f.close()

Unpacking

# GOOD: Tuple unpacking
first, *rest, last = items
x, y = point

# BAD: Index access
first = items[0]
last = items[-1]
x = point[0]
y = point[1]

Iteration

# GOOD: Direct iteration
for item in items:
    process(item)

# GOOD: Enumerate when index needed
for i, item in enumerate(items):
    print(f"{i}: {item}")

# BAD: Range-based iteration
for i in range(len(items)):
    process(items[i])

Dictionary Operations

# GOOD: dict.get() with default
value = data.get('key', default_value)

# GOOD: setdefault for initialization
cache.setdefault(key, []).append(item)

# BAD: Check and access
if 'key' in data:
    value = data['key']
else:
    value = default_value

String Formatting

# GOOD: f-strings (Python 3.6+)
message = f"Hello, {name}! You have {count} items."

# OK: .format() for dynamic templates
template = "Hello, {name}!"
message = template.format(name=name)

# BAD: % formatting or concatenation
message = "Hello, " + name + "!"
message = "Hello, %s!" % name

Boolean Checks

# GOOD: Truthiness
if items:  # Not empty
if not items:  # Empty
if value is None:  # Explicit None check

# BAD: Explicit comparisons
if len(items) > 0:
if items != []:
if value == None:

Read the full file on GitHub · 327 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 · 327 lines · 116 tokens per session scan A 6979cde8ab59

Subscribe to this mod's changes

python-idioms is a skill published in the GitHub repository Everyone-Needs-A-Copilot/claude-copilot (14 stars, last pushed yesterday), licensed MIT. It adds 116 tokens to every session and 2,018 once invoked, about $0.0005 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-09-04.

Related

Other skills, from other repositories

django-expert

Expert-level Django development for robust Python web applications with ORM, admin, and authentication. Use when the user mentions Python, web, ORM, MVC, or Django REST Framework, or when the task involves Django Architecture.

personamanagmentlayer/pcl · 47 tokens

flask-expert

Expert-level Flask web development, REST APIs, extensions, and production deployment. Use when the user mentions Python, web framework, REST APIs, or Jinja2, or when the task involves Flask Fundamentals or Flask Extensions.

personamanagmentlayer/pcl · 49 tokens

code-reviewer-python

Use when reviewing Python code, Python packaging, or Python-specific correctness and quality.

buiphucminhtam/forgewright · 21 tokens

python-patterns

Python best practices — type hints, async/await, dataclasses, error handling, and performance patterns. Use when writing new Python code, reviewing Python, or modernizing legacy code.

chandrudp29/skillhub · 41 tokens

py-clean-arch

Use this skill when the user asks about Clean Architecture in Python — not generic theory, but the specific layer conventions (l1entities, l2usecases, l3interfaceadapters, l4frameworksanddrivers), folder patterns, boundary interfaces, and .importlinter.ini contracts from CJHwong/py-clean-architecture-examples. Fetches…

CJHwong/py-clean-architecture-examples · 113 tokens

django-patterns

Django architecture patterns, REST API design with DRF, ORM best practices, caching, signals, middleware, and production-grade Django apps.

affaan-m/ECC · 32 tokens