marketplace/bundles/pm-dev-python/skills/python-core/SKILL.md
Use when writing, reviewing, or refactoring Python 3.10+ code — covers type annotations, data structures, error handling, resource management, async patterns, naming conventions, and imports. Activate for any Python production code task. Also use when working with pathlib, dataclass, pydantic, match statements, or structural pattern matching.
npx skillsauth add cuioss/plan-marshall python-coreInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
REFERENCE MODE: This skill provides reference material for Python 3.10+ development. Load standards on-demand based on current task. Do not load all sections at once.
Execution mode: Reference library; load standards on-demand for Python development tasks.
Prohibited actions:
typing.List, typing.Dict, or other deprecated generic aliases; use built-in genericsexcept: or broad except Exception: without re-raisingpathlib.PathConstraints:
X | Y)Activate when:
File: standards/python-core.md (771 lines)
Load progressively by section based on current task. Never load the entire file at once.
| Section | Load When |
|---------|-----------|
| Type Annotations | Writing or reviewing type hints, choosing between built-in generics and collections.abc |
| Data Structures | Choosing between dataclass, attrs, pydantic, NamedTuple |
| Error Handling | Writing try/except blocks, custom exceptions, validation patterns |
| Resource Management | File I/O, context managers, custom resource cleanup |
| Path Handling | File path operations, pathlib.Path usage, path security |
| Async Programming | asyncio patterns, concurrency with gather(), rate limiting |
| Structural Pattern Matching | match statements, destructuring, class patterns, guard clauses |
| Modern Features (3.11-3.13) | Exception groups, @override, itertools.batched() |
| Functions and Classes | Function design, class composition, mutable defaults |
| Naming Conventions | Module/class/function/variable naming styles |
| Imports | Import organization, grouping, and rules |
| Docstrings | Google-style format for functions, classes, and modules |
| Comprehensions and Generators | List/dict comprehensions, generator expressions |
| String Handling | F-strings, multi-line strings, string building |
Load Command:
Read standards/python-core.md
| Topic | Rule |
|-------|------|
| Type hints | Built-in generics (list[str]), union syntax (X \| None), collections.abc for parameters |
| Data structures | dataclass (default), attrs (performance), pydantic (API boundaries) |
| Error handling | Specific exceptions only, minimal try scope, chain with from |
| Resources | Always context managers; pathlib.Path for all file/path operations |
| Pattern matching | match/case for structural destructuring; if/elif for simple comparisons |
| Async | asyncio.run() entry point, gather() for concurrency, Semaphore for rate limiting |
| Naming | lower_with_under (functions/modules), CapWords (classes), CAPS_WITH_UNDER (constants) |
| Docstrings | Google style with Args/Returns/Raises sections |
| Imports | Three groups (stdlib, third-party, local), sorted alphabetically |
pm-dev-python:pytest-testing - Testing standards with pytestpm-plugin-development:plugin-script-architecture - Standards for marketplace plugin scriptstools
Plan-marshall-domain implementor of the ext-self-review-{domain} extension point. Surfaces deterministic candidates (regexes, user-facing strings, markdown sections, symmetric-pair functions, flag-guard pairs, contract sources, schema-bearing files) for pre-submission structural self-review.
development
The single shared contract every untrusted-external-content ingestion surface loads — reader/orchestrator/writer isolation, the deterministic validator script as the containment boundary, and the output-schema discipline for candidate structs parsed from web pages, GitHub issue/PR/comment bodies, and Sonar issue messages
development
Domain-invariant recipe for deliberate wide-scope simplification campaigns across a scope x thoroughness cell, with a T4+ relation-graph pre-deliverable
testing
A test skill for README generation