Python
Write reliable Python avoiding mutable defaults, import traps, and common runtime surprises.
MIT-0 · Free to use, modify, and redistribute. No attribution required.
⭐ 5 · 2.8k · 11 current installs · 12 all-time installs
byIván@ivangdavila
MIT-0
Security Scan
OpenClaw
Benign
high confidencePurpose & Capability
Name, description, and required binary (python3) align with a Python guidance helper. The content is documentation on common Python pitfalls and does not request unrelated credentials or tools. Minor metadata inconsistency: registry slug is 'py' while SKILL.md uses slug 'python' — likely cosmetic and not a security issue.
Instruction Scope
SKILL.md and the included .md files are documentation-only; they do not instruct the agent to read arbitrary files, send data externally, or run network requests. There are no open-ended directives that would give the agent broad discretion to collect or exfiltrate data.
Install Mechanism
No install spec and no code files to write or execute. This is the lowest-risk form (instruction-only).
Credentials
The skill requests no environment variables, credentials, or config paths. Requesting only python3 is proportionate for a Python guidance skill.
Persistence & Privilege
Defaults (always: false, model invocation allowed) are appropriate. The skill does not request permanent presence or system-wide changes.
Assessment
This skill is documentation-only and appears coherent with its purpose. It doesn't include executable code or ask for secrets. Before installing, confirm your agent sandbox: if the agent is permitted to execute python3 or access local files, the agent could (independently of this skill) run Python code you provide — that's a general platform permission concern, not an issue with this skill. If you want extra caution, keep the agent's execution rights and file access restricted, and verify the system python3 version matches what you expect.Like a lobster shell, security has layers — review code before you run it.
Current versionv1.0.1
Download ziplatest
License
MIT-0
Free to use, modify, and redistribute. No attribution required.
Runtime requirements
🐍 Clawdis
OSLinux · macOS · Windows
Binspython3
SKILL.md
Quick Reference
| 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 |
Critical Rules
def f(items=[])shares list across all calls — useitems=Nonethenitems = items or []ischecks identity,==checks equality —"a" * 100 is "a" * 100may be False- Modifying list while iterating skips elements — iterate over copy:
for x in list(items): - GIL prevents true parallel Python threads — use multiprocessing for CPU-bound
- Bare
except:catchesSystemExitandKeyboardInterrupt— useexcept Exception: UnboundLocalErrorwhen assigning to outer scope variable — usenonlocalorglobalopen()without context manager leaks handles — always usewith open():- Circular imports fail silently or partially — import inside function to break cycle
0.1 + 0.2 != 0.3— floating point, usedecimal.Decimalfor money- Generator exhausted after one iteration — can't reuse, recreate or use
itertools.tee - Class attributes with mutables shared across instances — define in
__init__instead __init__is not constructor —__new__creates instance,__init__initializes- Default encoding is platform-dependent — always specify
encoding='utf-8'
Files
8 totalSelect a file
Select a file to preview.
Comments
Loading comments…
