{
 "id": "python",
 "kind": "skill",
 "name": "Python",
 "description": "Writing, testing and structuring Python (3.12 style): scripts, CLIs, small libraries, tests. Use for any Python coding task.",
 "version": "1.0.0",
 "author": "Hexa Hub",
 "files": {
  "SKILL.md": "---\nname: python\ndescription: Writing, testing and structuring Python (3.12 style): scripts, CLIs, small libraries, tests. Use for any Python coding task.\ntitle: Python\nicon: tabler:brand-python\ncategory: Development\n---\n\n# Python\n\n## Defaults (unless the project shows otherwise)\n- Python 3.12, type hints, `pathlib`, f-strings, `dataclasses`, `logging` (not `print`) in anything long-lived.\n- Scripts: `argparse` (or `typer` if already used), a `main()` and `if __name__ == \"__main__\":`. Exit non-zero on failure.\n- Dependencies in a venv with pinned versions (`requirements.txt` or `pyproject.toml`). Never `pip install` system-wide.\n- Secrets from environment variables or a secrets manager, never in code.\n\n## Pitfalls to avoid\n- Mutable default arguments (`def f(x=[])`); bare `except:`; swallowing exceptions silently.\n- `subprocess`: pass a list, not a string with `shell=True`; use `check=True`, `timeout=`, `capture_output=True, text=True`.\n- Open files with `with` and an explicit `encoding=\"utf-8\"`. Use `Path.read_text()` for small files.\n- Compare floats with `math.isclose`. Use `is None`, not `== None`. Don't shadow builtins (`list`, `id`, `type`).\n- `requests`/`httpx`: always set a timeout; check status; don't build SQL or shell commands from strings.\n- SQL: parameterized queries only.\n\n## Test before presenting\nUse `devtools__run_code`. Write the function plus a few `assert`s covering: normal case, empty input, single item, duplicates,\nboundary values, and a case that must raise. Run it. Fix failures and rerun. Show the final code and say what you ran.\nLimits of `devtools__run_code`: no network, no subprocesses, no files outside its folder, 60 s max. For code that needs those,\ntest the pure logic and tell the user what you could not run.\n\n## Testing real projects\n`pytest` with plain asserts and fixtures; `tmp_path` for files; mock the network and the clock; one behavior per test.\n\n## Style\nSmall functions, clear names, early returns, no clever one-liners. Match the surrounding code's style. Docstring on\npublic functions in one or two lines.\n"
 }
}
