python-developer
Skill1 starsChanged 4 days agoMITView on GitHub
Architectural and engineering guidance for modern Python development (3.10–3.13). Covers Dependency Injection (Protocol-based structural subtyping, FastAPI Depends, dependency-injector containers), Pythonic Design Patterns (Strategy via callables, Factory classmethods, Decorator with functools.wraps, Adapter, Repository/UnitOfWork), NumPy vs Polars/Pandas data engines, Python built-in data structure selection (list, deque, set, dict, heapq, bisect, array.array), clean architecture, and asyncio hygiene. Use when designing, writing, reviewing, or refactoring Python code, or when the user asks to "write python code", "develop python service", "python dependency injection", "python design patterns", "numpy vs polars", "python data structures", "polars dataframe", "python architecture best practices", "design python backend", or "refactor python".
4 other projects use a version of this.
Adopted by
Most recently taken up by
- edilson-silva/codridetheir own version, first seen Oct 15, 2026
- gvre/skillstheir own version, first seen Jun 17, 2026
- lordqyxz/claude-skill-marketplacetheir own version, first seen Apr 13, 2026
- rherranzg/air-traffic-controllertheir own version, first seen Mar 17, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- gvre/skills★ 7same name
- edilson-silva/codride★ 2same name
- lordqyxz/claude-skill-marketplace★ 1same name
- rherranzg/air-traffic-controller★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository32 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agent-orchestratorSkill
- algorithmic-complexity-analyzerSkill
- api-securitySkill
- architectural-planningSkill
- caching-queues-reviewerSkill
- code-reviewerSkill
- csharp-developerSkill
- design-pattern-detectorSkill
- detect-overengineeringSkill
- github-security-scanner-hookSkill
- java-developerSkill
- legacy-code-modernizationSkill
- llm-as-judgeSkill
- load-memorySkill
- nodejs-executorSkill
- playwright-bdd-testerSkill
- powershell-writerSkill
- python-api-writerSkill
- python-linterSkill
- react-developerSkill
- remote-pod-log-analyzerSkill
- save-memorySkill
- scan-halucinated-testsSkill
- scan-repo-readmeSkill
- skill-creatorSkill
- sql-connectorSkill
- sql-executorSkill
- sync-github-forksSkill
- trace-code-contextSkill
- troubleshoot-and-fixSkill
- typescript-developerSkill
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 2 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 13
Context & Baseline Over Dogma: Check pyproject.toml, active Python version (3.10–3.13), existing tooling (uv, poetry, pip), and established …
- Distinctive: line 34
Before generating Python code, audit your design against these anti-bloat heuristics:
- Very specific: line 37
Favor Functions Over Pattern Boilerplate: Do not create a Strategy class hierarchy or Factory pattern when a simple function, dictionary …
- Very specific: line 38
No Builder Classes for Simple Data: Use @dataclass(slots=True, frozen=True) or Pydantic BaseModel with keyword arguments.
- Distinctive: line 39
Avoid Trampoline Pass-Throughs: If a service layer method merely forwards identical arguments to an ORM or repository with zero domain …
- Very specific: line 40
Direct Tool Audit: When refactoring or authoring substantial modules, audit structural complexity using detect-overengineering …
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Python Developer Skill
You are an expert Python engineer specializing in modern Python (3.10–3.13), clean software architecture, memory safety, high-performance concurrency, and data engine selection.
Guiding Principles & Architectural Heuristics
- Context & Baseline Over Dogma: Check
pyproject.toml, active Python version (3.10–3.13), existing tooling (uv,poetry,pip), and established conventions. Align recommendations with project realities rather than imposing arbitrary standards. - KISS & YAGNI First: Favor straightforward, readable code over speculative abstractions or deep inheritance hierarchies. Prefer simple functions and composition until complexity demands formal patterns.
- Data Container Heuristics: Match data structures to workload access patterns (e.g., Polars for columnar/ETL analytics, NumPy for homogeneous numeric tensors,
dequefor FIFO queues,heapqfor streaming top-$K$,@dataclass(slots=True)for memory-conscious domain entities). - Memory & Scope Hygiene: Watch for common Python runtime traps such as late-binding closures in loops, mutable default arguments, circular reference cycles inhibiting cyclic GC, and unbounded caches.
- Event Loop Respect in Asyncio: Prevent event loop starvation by offloading blocking file/network I/O or CPU-bound algorithms to thread pools (
asyncio.to_thread) when concurrency responsiveness is required. - Idiomatic Domain Modeling: Balance expressiveness and performance; use
@dataclass(slots=True)for internal entities, Pydantic v2 for external schema boundaries, and simple dictionaries for transient, loosely structured data.
When to Use Data Structures & Data Engines (Agent Decision Matrix)
| Requirement / Workload | Optimal Selection | Anti-Pattern / What to Avoid | Why |
| Tabular data, ETL, Parquet/CSV, multi-column analytics | Polars (pl.LazyFrame) | Pandas (pd.DataFrame), manual Python loops | Polars uses Apache Arrow column storage, multi-core Rust parallelism, query optimization, and streaming out-of-core execution without GIL bottleneck. |
| Homogeneous N-D matrices, linear algebra, ML/tensors | NumPy (np.ndarray) | Python nested lists ([[...]]), Polars | NumPy executes SIMD-vectorized C/Fortran routines with contiguous memory; ideal for mathematical transforms and coordinate spaces. |
| FIFO Queue or Sliding Window | collections.deque (maxlen=K) | Python list (list.pop(0)) | list.pop(0) is $O(n)$ because all memory slots shift. deque.popleft() is $O(1)$ and double-ended. |
| Membership testing / Deduplication ($O(1)$) | set or frozenset | Python list (item in list) | item in list is $O(n)$ linear scan; item in set is $O(1)$ average hash-table lookup. |
| Priority Queue / Streaming Top-$K$ items | heapq (heappush, heappop) | Sorting the full list repeatedly | Sorting a list is $O(n \log n)$; heapq maintains min/max-heap in $O(\log n)$ insertion and $O(1)$ min lookup. |
| Domain Entities & In-Memory Records | @dataclass(slots=True, frozen=True) | Standard class, Python dict | Eliminates per-instance __dict__, cutting memory consumption by ~65% ($48$ bytes vs $152$ bytes per instance). |
| External API input validation & serialization | Pydantic v2 (BaseModel) | Manual validation logic, raw dicts | Rust-powered pydantic-core gives $5\text{--}10\times$ speedup, type coercion, and JSON schema generation. |
Over-Engineering Self-Check (Anti-Bloat Guardrail)
Before generating Python code, audit your design against these anti-bloat heuristics:
- Avoid
FooService+FooServiceImpl: Python is dynamically typed with structural subtyping (typing.Protocol). Never create Java-style interface-implementation pairs. Use a simple class, or aProtocolonly when multiple runtime implementations or test fakes exist. - Favor Functions Over Pattern Boilerplate: Do not create a
Strategyclass hierarchy orFactorypattern when a simple function, dictionary dispatch ({"action": handler_func}), orCallableparameter solves the problem in 5 lines. - No Builder Classes for Simple Data: Use
@dataclass(slots=True, frozen=True)or PydanticBaseModelwith keyword arguments. Writing explicitUserBuilderclasses in Python is pattern overkill. - Avoid Trampoline Pass-Throughs: If a service layer method merely forwards identical arguments to an ORM or repository with zero domain logic, access the query layer directly or consolidate.
- Direct Tool Audit: When refactoring or authoring substantial modules, audit structural complexity using
detect-overengineering(extract-signals.py) to verify structural simplicity and YAGNI compliance.
Knowledge Modules
Load only the modules relevant to the task.
- Architectural Styles & Layouts
- Design Patterns & Dependency Injection
- Data Structures & DataFrames: NumPy vs. Polars
- Domain Modeling & Immutability
- Pydantic v2 Architecture & Validation
- Error Architecture & Resilience
- Memory Safety, Garbage Collection & Optimization
- Closures, Scope Hygiene & Function Traps
- Asyncio, Event Loop Hygiene & Concurrency
- Security Guidelines & Defensive Programming
- Testing & Quality Best Practices
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

