role-python-engineer

role-python-engineer is a skill for Claude Code from saemihemma/lead-producer-oss. It costs 37 tokens per session (572 once invoked), scanned A, original, MIT.

A guide for reviewing and writing Python code, covering style, type annotations, tests, data structures, and asynchronous code.

In plain words
What is it for?
Use it to review Python modules, assess pytest tests, check package dependencies, and improve code using tools such as Ruff, mypy, Black, and isort.
Why use it?
It helps catch unclear types, weak tests, inconsistent formatting, and common problems in code that runs tasks concurrently.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Use it to review Python modules, assess pytest tests, check package dependencies, and improve code using tools such as Ruff, mypy, Black, and isort.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/saemihemma/lead-producer-oss/role-python-engineer
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add saemihemma/lead-producer-oss --skill role-python-engineer
Clone the repo
git clone --depth 1 https://github.com/saemihemma/lead-producer-oss

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for role-python-engineer

README.md
[![agentmods](https://agentmods.dev/badge/skills/saemihemma/lead-producer-oss/role-python-engineer/github.svg)](https://agentmods.dev/skills/saemihemma/lead-producer-oss/role-python-engineer)
Your own site
<a href="https://agentmods.dev/skills/saemihemma/lead-producer-oss/role-python-engineer"><img src="https://agentmods.dev/badge/skills/saemihemma/lead-producer-oss/role-python-engineer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for role-python-engineer

Your own site · 80×15
<a href="https://agentmods.dev/skills/saemihemma/lead-producer-oss/role-python-engineer"><img src="https://agentmods.dev/badge/skills/saemihemma/lead-producer-oss/role-python-engineer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 37 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 572 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00037 $0.00572
Opus 5.5 $0.00015 $0.00229
Sonnet 5.5 $0.00007 $0.00114
Haiku 4.5 $0.00004 $0.00057

Measured 2mo ago against content hash c43f31a74b68, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

role-python-engineer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/role-python-engineer/SKILL.md · 63 lines

How it starts

The opening of the file, as written. The whole thing — 63 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Python Engineer

Use When

  • Reviewing or writing Python code
  • Assessing type safety, test quality, or async patterns
  • Evaluating package structure or dependency management

Do NOT Use When

  • Problem is architecture-level, not language-level
  • Code is Jupyter notebook exploration (different standards apply)

What You Own

  • PEP 8 compliance and type annotation quality
  • Immutability patterns (frozen dataclasses, NamedTuple)
  • pytest discipline and fixture design
  • Async patterns (asyncio, aiohttp)
  • Tooling enforcement (black, isort, ruff, mypy)

Working Method

  1. Check formatting (black), import order (isort), linting (ruff), and type checking (mypy).
  2. Verify type annotations on all function signatures.
  3. Inspect data structures: prefer frozen dataclasses and NamedTuple for value types.
  4. Check test quality: pytest markers, fixture design, parametrization.
  5. Verify coverage with pytest --cov and assess gap severity.
  6. Produce verdict with highest-risk issues first.

Key Idioms

  • Type annotations on ALL function signatures
  • @dataclass(frozen=True) for value types
  • Comprehensions over manual loops where readable
  • Context managers (with) for resource management
  • pathlib.Path over os.path
  • f-strings for formatting
  • Explicit __all__ for public API control
  • ABC or Protocol for interface contracts

Testing Standards

  • Framework: pytest with conftest.py for shared fixtures
  • Markers: @pytest.mark.unit, @pytest.mark.integration, @pytest.mark.slow
  • Parametrize: @pytest.mark.parametrize for input variations
  • Async: pytest-asyncio for async test support
  • Mocking: unittest.mock with autospec=True for safety
  • Coverage: pytest --cov=src --cov-report=term-missing, target 80%+

Default Output

PYTHON REVIEW
=============
Standards: PEP 8, type annotations, tooling compliance
Patterns: immutability, data structures, error handling
Quality Risks: missing types, unsafe mocks, test gaps
Recommendation: highest-leverage fixes

Read the full file on GitHub · 63 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 63 lines · 37 tokens per session scan A c43f31a74b68

Subscribe to this mod's changes

role-python-engineer is a skill published in the GitHub repository saemihemma/lead-producer-oss (2 stars, last pushed 2mo ago), licensed MIT. It adds 37 tokens to every session and 572 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

mcore-linting-and-formatting

Linting and formatting for Megatron-LM. Covers running autoformat.sh, tools (ruff, black, isort, pylint, mypy), and code style rules.

NVIDIA/skills · 44 tokens

splitting-oversized-modules

Split an oversized Python module (a thousand-plus-line logic.py, models.py, api.py, or its test file) into a package of one module per concern, mechanically and provably without changing behavior. Use on a request to split / break up / decompose a god module or move functions out of one, once a human has agreed to…

PostHog/posthog-foss · 197 tokens

python-review-checklist

Deterministic Python review checklist shipped with the CAO skills-lifecycle example.

awslabs/cli-agent-orchestrator · 20 tokens

splitting-oversized-modules

Split an oversized Python module (a thousand-plus-line logic.py, models.py, api.py, or its test file) into a package of one module per concern, mechanically and provably without changing behavior. Use on a request to split / break up / decompose a god module or move functions out of one, once a human has agreed to…

PostHog/posthog · 197 tokens

best-practices

Language-specific best practices, code quality standards, and framework detection rules. Use when executing refactoring workflows, applying code quality rules, detecting frameworks, or checking language-specific patterns for TypeScript, Python, Go, Swift, or React.

FradSer/dotclaude · 52 tokens

plankton-code-quality

Write-time code quality enforcement using Plankton — auto-formatting, linting, and Claude-powered fixes on every file edit via hooks.

loulanyue/awesome-claude-notes · 34 tokens