claude/skills/python-coding/SKILL.md
Python coding conventions and style guide. Use when writing or modifying Python code.
npx skillsauth add iainmcl/dotfiles python-codingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
New functions should include docstrings that describe their purpose. This
should not include things like :param or :return: sections, just a brief
description of what the function does.
Use type hints for function parameters and return types to improve code readability and maintainability.
% or str.format().list, dict, set, and tuple instead of List, Dict,
Set, and Tuple from the typing module, unless you need to specify type
parameters. For optional parameters use | None instead of Optional.When logging messages add the additional context in the extra parameter of the
logging methods. For example:
logger.info("Processing item", extra={"item_id": item.id})
When logging exceptions use logger.exception instead of logger.error to
automatically include the stack trace. For example:
try:
process_item(item)
except Exception:
logger.exception("Failed to process item", extra={"item_id": item.id})
DO NOT include exception information in the log message itself. For example, avoid doing this:
try:
process_item(item)
except Exception as e:
logger.error(f"Failed to process item: {e}", extra={"item_id": item.id})
Avoid using function level imports wherever possible. All imports should be at the top of the file. The only exceptions to this are if there are issues with top level imports like circular imports.
development
Run a weekly achievement review - pulls from Jira, GitHub, and Slack to capture what you shipped in the last week, maps achievements to your 2026 goals, and appends impact-focused entries to your brag doc. Use when asked to "do a weekly review", "capture this week's wins", "update my brag doc", "what did I ship this week", "record my achievements", "what have I done this week", "add to my performance doc", or anything about tracking weekly progress, brag doc entries, or performance evidence. Trigger even if the user just says "weekly review" or "document what I did".
testing
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.
tools
Set up a project update config for the current repo, so that running project-update requires no setup questions. Use when asked to "set up project updates", "configure project update", "initialise project update", or "create a project update config". Run this once per project repo.
testing
Find the highest-frequency unresolved Sentry error for the VAT & Invoicing or Billing team, understand its root cause, create a Jira ticket in the APP project, implement a fix, and open a draft PR. Use when asked to "fix sentry issues", "triage sentry errors", "look at sentry", "what's broken in sentry", "create a fix for a sentry issue", or "sentry triage". Runs the full flow autonomously in the background.