pyWrite reliable Python avoiding mutable defaults, import traps, and common runtime surprises.
Install via ClawdBot CLI:
clawdbot install ivangdavila/pyRequires:
| Topic | File |
|-------|------|
| Dynamic typing, type hints, duck typing | types.md |
| List/dict/set gotchas, comprehensions | collections.md |
| Args/kwargs, closures, decorators, generators | functions.md |
| Inheritance, descriptors, metaclasses | classes.md |
| GIL, threading, asyncio, multiprocessing | concurrency.md |
| Circular imports, packages, init.py | imports.md |
| Pytest, mocking, fixtures | testing.md |
def f(items=[]) shares list across all calls — use items=None then items = items or []is checks identity, == checks equality — "a" 100 is "a" 100 may be Falsefor x in list(items):except: catches SystemExit and KeyboardInterrupt — use except Exception:UnboundLocalError when assigning to outer scope variable — use nonlocal or globalopen() without context manager leaks handles — always use with open():0.1 + 0.2 != 0.3 — floating point, use decimal.Decimal for moneyitertools.teeinit insteadinit is not constructor — new creates instance, init initializesencoding='utf-8'Generated Mar 1, 2026
Developers building scalable web apps with frameworks like Django or Flask can use this skill to avoid common pitfalls like mutable defaults in function arguments, which can lead to unexpected data sharing across requests, and ensure proper handling of concurrency with asyncio for I/O-bound tasks.
Analysts and engineers processing monetary transactions or financial calculations benefit from rules on using decimal.Decimal for precision, avoiding floating-point errors in sums, and implementing reliable error handling with specific exceptions to maintain data integrity in batch jobs.
QA teams implementing automated tests with Pytest can leverage guidance on mocking, fixtures, and avoiding circular imports to create maintainable test suites, ensuring reliable detection of bugs in software modules without interference from shared mutable states.
Data scientists building ML pipelines use this skill to manage concurrency with multiprocessing for CPU-intensive model training, handle file I/O safely with context managers to prevent resource leaks, and apply type hints for better code clarity in complex data transformations.
DevOps engineers scripting automation tools for deployment or monitoring apply rules on proper import practices to avoid circular dependencies in modular scripts, use generators efficiently for large data streams, and ensure cross-platform compatibility with specified encodings in file operations.
Companies offering Python-based SaaS products can integrate this skill to reduce runtime errors and improve code reliability, leading to lower maintenance costs and higher customer satisfaction through stable, performant applications that handle concurrent user requests effectively.
Consulting firms provide expert services by using this skill to train developers on best practices, such as avoiding mutable defaults and managing concurrency, helping clients optimize their Python codebases for scalability and reducing technical debt in long-term projects.
Open source projects maintainers leverage this skill to enforce coding standards that prevent common bugs, attracting more contributors by ensuring code quality and reliability, which can lead to increased adoption and potential funding through donations or sponsorships.
💬 Integration Tip
Integrate this skill into CI/CD pipelines by adding checks for mutable defaults and proper exception handling in code reviews, and use it as a reference during onboarding to standardize Python practices across teams.
Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.
Provides a 7-step debugging protocol plus language-specific commands to systematically identify, verify, and fix software bugs across multiple environments.
A comprehensive skill for using the Cursor CLI agent for various software engineering tasks (updated for 2026 features, includes tmux automation guide).
Write, run, and manage unit, integration, and E2E tests across TypeScript, Python, and Swift using recommended frameworks.
Control and operate Opencode via slash commands. Use this skill to manage sessions, select models, switch agents (plan/build), and coordinate coding through Opencode.
Coding style memory that adapts to your preferences, conventions, and patterns for consistent coding.