{"id":"e332f676-7c8a-455e-bbd8-0c1ef33479fd","shortId":"4h3RkJ","kind":"skill","title":"python","tagline":"Write clean, readable Pythonic code. Use this skill any time you write or change a Python file.","description":"# General guidelines\n\n# Coding Style\n\n- Always write clean, readable, well separated, well organized, Pythonic code.\n- Don't run linters or formatters, they will run automatically after every edit by the harness.\n- When using `datetime`, import it like this: `import datetime as dt`\n- CRITICAL: ALWAYS put ALL imports at the top of the file, NEVER inside\n  functions, methods, or any other block. No exceptions. Use `TYPE_CHECKING` guard\n  for type-only imports to avoid circular dependencies.\n\n# Type hints\n\n- ALWAYS type hint every function and method signature precisely even in tests.\n- \"\" -> None\" return values are not necessary, they are just noise.\n- No need to type hint variables from functions call return values inside function bodies, they are inferred from the method return type,\n  except extreme cases when the type is a huge help or a generic and it's concrete type cannot be determined.\n- Only use APIs, class names, variables or objects which you already read or\n  know exist for sure.\n- Use the new pipe operator for `Optional` variables like this: `value | None`\n\n# Testing\n\n- ALWAYS use `pytest` for all tests\n- ALWAYS assert on whole ouptut or full results in tests, not just tiny parts\n- For mocking, use pytest `monkeypatch` fixture, NEVER `unittest.mock` and NEVER\n  any of the `Mock` classes or `patch` function\n- IMPORTANT: NEVER import from `conftest.py`\n- ALWAYS type hint test function parameters correctly.\n- Don't make a test class with only one function, a module-level test function is enough\n- NEVER use `unittest.mock` or any of the `Mock` classes or `patch` function, never assert on method calls,\n  use real objects and assert on full results. When absolutely necessary and can't be avoided, use `pytest.monkeypatch`,\n  when the test setup would be too difficult or the code have side effects, but consider writing a fake.\n- ALWAYS assert on the full result of the function call, never just list lengths or containment, except where that's the point.\n\n# Managing dependencies\n\n- Use `uv add` for adding dependencies, never directly edit `pyproject.toml` files.\n- For CLI scripts and apps, ALWAYS use `click` library instead of `argparse`, add it to dependencies if necessary.","tags":["python","coding","agents","kissgyorgy","agent-skills","coding-agents","nix","nix-flake"],"capabilities":["skill","source-kissgyorgy","skill-python","topic-agent-skills","topic-coding-agents","topic-nix","topic-nix-flake"],"categories":["coding-agents"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/kissgyorgy/coding-agents/python","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add kissgyorgy/coding-agents","source_repo":"https://github.com/kissgyorgy/coding-agents","install_from":"skills.sh"}},"qualityScore":"0.453","qualityRationale":"deterministic score 0.45 from registry signals: · indexed on github topic:agent-skills · 6 github stars · SKILL.md body (2,214 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-18T13:23:02.185Z","embedding":null,"createdAt":"2026-05-18T13:23:02.185Z","updatedAt":"2026-05-18T13:23:02.185Z","lastSeenAt":"2026-05-18T13:23:02.185Z","tsv":"'absolut':285 'ad':341 'add':339,360 'alreadi':171 'alway':23,61,96,191,197,234,313,353 'api':163 'app':352 'argpars':359 'assert':198,272,280,314 'automat':42 'avoid':91,291 'block':78 'bodi':131 'call':126,275,322 'cannot':158 'case':142 'chang':15 'check':83 'circular':92 'class':164,225,246,267 'clean':3,25 'cli':349 'click':355 'code':6,21,32,304 'concret':156 'conftest.py':233 'consid':309 'contain':328 'correct':240 'critic':60 'datetim':51,57 'depend':93,336,342,363 'determin':160 'difficult':301 'direct':344 'dt':59 'edit':45,345 'effect':307 'enough':258 'even':105 'everi':44,99 'except':80,140,329 'exist':175 'extrem':141 'fake':312 'file':18,70,347 'fixtur':216 'formatt':38 'full':203,282,317 'function':73,100,125,130,228,238,250,256,270,321 'general':19 'generic':152 'guard':84 'guidelin':20 'har':48 'help':149 'hint':95,98,122,236 'huge':148 'import':52,56,64,89,229,231 'infer':134 'insid':72,129 'instead':357 'know':174 'length':326 'level':254 'librari':356 'like':54,186 'linter':36 'list':325 'make':243 'manag':335 'method':74,102,137,274 'mock':212,224,266 'modul':253 'module-level':252 'monkeypatch':215 'name':165 'necessari':113,286,365 'need':119 'never':71,217,220,230,259,271,323,343 'new':180 'nois':117 'none':108,189 'object':168,278 'one':249 'oper':182 'option':184 'organ':30 'ouptut':201 'paramet':239 'part':210 'patch':227,269 'pipe':181 'point':334 'precis':104 'put':62 'pyproject.toml':346 'pytest':193,214 'pytest.monkeypatch':293 'python':1,5,17,31 'read':172 'readabl':4,26 'real':277 'result':204,283,318 'return':109,127,138 'run':35,41 'script':350 'separ':28 'setup':297 'side':306 'signatur':103 'skill':9 'skill-python' 'source-kissgyorgy' 'style':22 'sure':177 'test':107,190,196,206,237,245,255,296 'time':11 'tini':209 'top':67 'topic-agent-skills' 'topic-coding-agents' 'topic-nix' 'topic-nix-flake' 'type':82,87,94,97,121,139,145,157,235 'type-on':86 'unittest.mock':218,261 'use':7,50,81,162,178,192,213,260,276,292,337,354 'uv':338 'valu':110,128,188 'variabl':123,166,185 'well':27,29 'whole':200 'would':298 'write':2,13,24,310","prices":[{"id":"8a13e46f-bb47-4d74-8a19-d51d56c4dcc4","listingId":"e332f676-7c8a-455e-bbd8-0c1ef33479fd","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"kissgyorgy","category":"coding-agents","install_from":"skills.sh"},"createdAt":"2026-05-18T13:23:02.185Z"}],"sources":[{"listingId":"e332f676-7c8a-455e-bbd8-0c1ef33479fd","source":"github","sourceId":"kissgyorgy/coding-agents/python","sourceUrl":"https://github.com/kissgyorgy/coding-agents/tree/master/skills/python","isPrimary":false,"firstSeenAt":"2026-05-18T13:23:02.185Z","lastSeenAt":"2026-05-18T13:23:02.185Z"}],"details":{"listingId":"e332f676-7c8a-455e-bbd8-0c1ef33479fd","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"kissgyorgy","slug":"python","github":{"repo":"kissgyorgy/coding-agents","stars":6,"topics":["agent-skills","coding-agents","nix","nix-flake"],"license":null,"html_url":"https://github.com/kissgyorgy/coding-agents","pushed_at":"2026-05-18T11:27:29Z","description":"Nix packages, skills, extensions for coding-agents (Claude Code, Gemini CLI, Pi Coding Agent, Codex)","skill_md_sha":"7253d621c38529d3f2872dd0fc0e2edf1b9e1992","skill_md_path":"skills/python/SKILL.md","default_branch":"master","skill_tree_url":"https://github.com/kissgyorgy/coding-agents/tree/master/skills/python"},"layout":"multi","source":"github","category":"coding-agents","frontmatter":{"name":"python","description":"Write clean, readable Pythonic code. Use this skill any time you write or change a Python file."},"skills_sh_url":"https://skills.sh/kissgyorgy/coding-agents/python"},"updatedAt":"2026-05-18T13:23:02.185Z"}}