python-patterns SKILL.md skillA
python-patterns from harshadmadaye/opm is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.
mdr add harshadmadaye/opm/python-patterns@git:20261005.a666976Pins git:20261005.a666976 in mdr.lock. Pin the fingerprint instead.
- Audit grade
- A, 17 of 17 checks passed
- Kind
- SKILL.md skill
- Repository
- harshadmadaye/opm
- Path
skills/python-patterns/SKILL.md- Versions recorded
- 3
- Latest version
- git:20261005.a666976, committed Oct 5, 2026
- First version recorded
- Sep 12, 2026
- Size
- 3,186 bytes
- Repository stars
- 5
- License
- MIT
Provides idiomatic modern Python (3.11+) patterns covering type hints, dataclasses and pydantic at boundaries, pathlib, context managers, generators, async basics, explicit error handling, and a uv/ruff/pytest project layout. Use when writing, reviewing, or refactoring Python code or setting up a Python project.
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# Python Patterns Readable, explicit, typed. These patterns target Python 3.11 or newer with `uv` for environments, `ruff` for lint and format, and `pytest` for tests. Always-true conventions (PEP 8, annotations, immutability, specific exceptions, config and secrets, FastAPI) live in OPM's rules `python/coding-style.md` and `python/testing.md` (`.claude/rules/opm/python/` once installed, `rules/python/` in the plugin). This skill keeps the patterns and worked examples. ## When to use - Writing new Python modules, packages, scripts, or services. - Reviewing Python diffs for idiom, typing, and error handling. - Setting up or modernising a Python project's tooling. ## Core principles - **Readability over cleverness.** Names say what things hold; comprehension over a three-line loop, a function over a three-clause comprehension. - **Explicit over implicit.** No import-time side effects, no hidden global configuration. - **EAFP where the exception is the normal control flow** (`try: d[key] except KeyError`), LBYL where a check is cheaper and clearer (`if path.exists()` before a destructive operation). - **Immutability by default**: rule `python/coding-style.md` (Immutability). …
Read the whole file at its exact version.
How to install
mdr add harshadmadaye/opm/python-patterns@sha256:2d7237a58342cce8The line at the top of this page pins the label git:20261005.a666976, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
[](https://markdownregistry.com/a/art_udvtsc6ufxdt5hir)
4 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 3 versions of this file, between Sep 12, 2026 and Oct 5, 2026, about one every 12 days.
| version | committed | commit | size | audit | |
|---|---|---|---|---|---|
| git:20261005.a666976 latest | 2026-10-05 | a666976 | 3,186 B | A | view · diff |
| git:20261005.5909ebd | 2026-10-05 | 5909ebd | 3,161 B | A | view · diff |
| git:20260912.a10a790 | 2026-09-12 | a10a790 | 12,164 B | A | view |
Audit of the latest version
- pass: Frontmatter block present
- pass: Frontmatter declares a name
- pass: Frontmatter declares a description
- pass: Size between 200 bytes and 200 KB (3186 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
- pass: No script tag
Source
harshadmadaye/opm · 5 stars · license MIT · pushed 2026-10-05 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_udvtsc6ufxdt5hir GET https://markdownregistry.com/api/v1/resolve?ref=harshadmadaye/opm/python-patterns GET https://markdownregistry.com/api/v1/blob/2d7237a58342cce86465e6eabaea2f3058dff8bccc79baa4f319343ccbadc8cf
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.
More from harshadmadaye/opm
Every file in harshadmadaye/opm