effective-python

effective-python is a skill for Claude Code, Codex from booklib-ai/booklib. It costs 51 tokens per session (4,689 once invoked), scanned A, original, MIT.

A Python coding and review guide based on the 90 practices in Brett Slatkin’s book Effective Python. It helps produce idiomatic Python, meaning code that follows common Python conventions.

In plain words
What is it for?
Use it when writing Python from scratch or checking code for clearer, safer, and more Python-like solutions.
Why use it?
It gives new and existing Python code a consistent review against established practices.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when writing Python from scratch or checking code for clearer, safer, and more Python-like solutions.

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/booklib-ai/booklib/effective-python"><img src="https://agentmods.dev/badge/skills/booklib-ai/booklib/effective-python.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 51 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,689 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.
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.00051 $0.04689
Opus 5.5 $0.00020 $0.01876
Sonnet 5.5 $0.00010 $0.00938
Haiku 4.5 $0.00005 $0.00469

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

Security

Grade A, and why

effective-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 3mo ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/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.

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.

skills/effective-python/SKILL.md · 442 lines

How it starts

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

Effective Python Skill

Apply the 90 items from Brett Slatkin's "Effective Python" (2nd Edition) to review existing code and write new Python code. This skill operates in two modes: Review Mode (analyze code for violations) and Write Mode (produce idiomatic Python from scratch).

Reference Files

This skill includes categorized reference files with all 90 items:

  • ref-01-pythonic-thinking.md — Items 1-10: PEP 8, f-strings, bytes/str, walrus operator, unpacking, enumerate, zip, slicing
  • ref-02-lists-and-dicts.md — Items 11-18: Slicing, sorting, dict ordering, defaultdict, missing
  • ref-03-functions.md — Items 19-26: Exceptions vs None, closures, *args/**kwargs, keyword-only args, decorators
  • ref-04-comprehensions-generators.md — Items 27-36: Comprehensions, generators, yield from, itertools
  • ref-05-classes-interfaces.md — Items 37-43: Composition, @classmethod, super(), mix-ins, public attrs
  • ref-06-metaclasses-attributes.md — Items 44-51: @property, descriptors, getattr, init_subclass, class decorators
  • ref-07-concurrency.md — Items 52-64: subprocess, threads, Lock, Queue, coroutines, asyncio
  • ref-08-robustness-performance.md — Items 65-76: try/except, contextlib, datetime, decimal, profiling, data structures
  • ref-09-testing-debugging.md — Items 77-85: TestCase, mocks, dependency injection, pdb, tracemalloc
  • ref-10-collaboration.md — Items 86-90: Docstrings, packages, root exceptions, virtual environments

How to Use This Skill

Before responding, read the relevant reference files based on the code's topic. For a general review, read all files. For targeted work (e.g., writing async code), read the specific reference (e.g., ref-07-concurrency.md).


Mode 1: Code Review

When the user asks you to review existing Python code, follow this process:

Step 1: Read Relevant References

Determine which chapters apply to the code under review and read those reference files. If unsure, read all of them.

Read the full file on GitHub · 442 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. 3mo ago First seen · 442 lines · 51 tokens per session scan A ddba7cc876f6

Subscribe to this mod's changes

effective-python is a skill published in the GitHub repository booklib-ai/booklib (40 stars, last pushed 7mo ago), licensed MIT. It adds 51 tokens to every session and 4,689 once invoked, about $0.0002 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

effective-python compared with skills from other repositories

effective-python next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
effective-pythonbooklib-ai/booklibSkill407mo agoMITA51Claude Code, Codex
fastapi-prohoangatg/ai-agent-toolkitSkill18mo agoMITA35Claude Code, Codex
python-patternsdeepelementlab/jupyter-studioSkill156mo agoApache-2.0A33Claude Code, Codex
python-patternshoangatg/ai-agent-toolkitSkill18mo agoMITA30Claude Code
codingbojieli/ai-agent-bookSkill60kyesterdayApache-2.0A18Claude Code, Codex
claude-apihashgraph-online/awesome-codex-pluginsSkill1.6k2d agoApache-2.0A53Claude Code, Codex
manimgl-best-practicescalesthio/OpenMontageSkill84k14d agoAGPL-3.0A167Claude Code, Codex