dhpk-python-pro

dhpk-python-pro is a skill for Claude Code from hmj1026/dhpk. It costs 80 tokens per session (1,164 once invoked), scanned A, original, MIT.

A checklist and coding guide for modern Python 3.10 or newer, focused on typed backend services. It covers data models, asynchronous code, logging, exceptions, and linting and type-checking tools.

In plain words
What is it for?
Writing or reviewing Python backend code using typed functions, dataclasses or Pydantic models, async-safe I/O, and Ruff and Pyright checks.
Why use it?
It reduces common backend Python problems such as blocking asynchronous code, weak type checks, discarded errors, and inconsistent data handling.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the dhpk plugin — 65 skills, 31 commands, 37 agents, 3 hooks shipped together

Good fit Writing or reviewing Python backend code using typed functions, dataclasses or Pydantic models, async-safe I/O, and Ruff and Pyright checks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hmj1026/dhpk/dhpk-python-pro
View source ↗ hmj1026/dhpk
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 hmj1026/dhpk --skill dhpk-python-pro
Clone the repo
git clone --depth 1 https://github.com/hmj1026/dhpk

Made for: Claude Code.

Or install dhpk, the plugin that ships this one along with the rest of its 65 skills, 31 commands, 37 agents, 3 hooks.

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 dhpk-python-pro

README.md
[![agentmods](https://agentmods.dev/badge/skills/hmj1026/dhpk/dhpk-python-pro/github.svg)](https://agentmods.dev/skills/hmj1026/dhpk/dhpk-python-pro)
Your own site
<a href="https://agentmods.dev/skills/hmj1026/dhpk/dhpk-python-pro"><img src="https://agentmods.dev/badge/skills/hmj1026/dhpk/dhpk-python-pro/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 dhpk-python-pro

Your own site · 80×15
<a href="https://agentmods.dev/skills/hmj1026/dhpk/dhpk-python-pro"><img src="https://agentmods.dev/badge/skills/hmj1026/dhpk/dhpk-python-pro.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 80 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,164 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.00080 $0.01164
Opus 5 $0.00040 $0.00582
Sonnet 5 $0.00016 $0.00233
Haiku 4.5 $0.00008 $0.00116

Measured 7d ago against content hash 7d5bad436ab3, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

dhpk-python-pro 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 7d 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.

generated/claude-profiles/compat-v1/package/skills/dhpk-python-pro/SKILL.md · 90 lines

How it starts

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

Python Pro (3.10+)

Framework-agnostic guidance for modern, type-checked Python services. Assumes the python dhpk module's tooling baseline (ruff for lint+format, pyright or mypy for types, uv run as the default runner — all overridable). For web-API specifics see the fastapi module; for tests see the pytest module.

Typing discipline

  • Annotate every public function (params + return). Prefer X | None over Optional[X], list[str] over List[str] (PEP 585 3.9+, PEP 604 3.10+).
  • Run the type checker as a gate, not a suggestion. ccas runs pyright strict; mypy is the alternative. Don't add # type: ignore without a reason comment.
  • Model data with @dataclass(slots=True) or pydantic models, not bare dicts. Pydantic at the I/O boundary (request/response, config); dataclasses for internal value objects.
  • Use typing.Protocol for structural interfaces and dependency-injection seams (host-testable code) instead of inheritance.

Async-await discipline

  • Never call blocking I/O inside an async def coroutine — it stalls the event loop. Wrap unavoidable blocking calls in await asyncio.to_thread(...).
  • Don't mix sync and async DB sessions. With SQLAlchemy 2.0 async, every query is await session.execute(...); never hold a session across await boundaries it doesn't own.
  • Guard external calls with timeouts (asyncio.wait_for, httpx timeout=); an unbounded await is a latent hang. ccas isolates poison PDFs this way.
  • Use asyncio.TaskGroup (3.11+) or asyncio.gather for fan-out; propagate cancellation rather than swallowing CancelledError.

Errors & logging

  • No print() in library/app code — use the logging module (structured JSON in ccas). print is for CLIs/scripts only. The post-edit hook flags stray prints.
  • Define a project exception hierarchy (class AppError(Exception) → specific subclasses). Raise specific, catch specific. Never except Exception: pass — log with context and re-raise or convert. (See the silent-failure-hunter agent.)
  • Preserve the chain: raise NewError(...) from err. Don't discard the original traceback.
  • Validate inputs at the boundary and fail fast with a descriptive message; don't let a None or malformed value propagate three layers deep.

Read the full file on GitHub · 90 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. 7d ago First seen · 90 lines · 80 tokens per session scan A 7d5bad436ab3

Subscribe to this mod's changes

dhpk-python-pro is a skill published in the GitHub repository hmj1026/dhpk (2 stars, last pushed yesterday), licensed MIT. It adds 80 tokens to every session and 1,164 once invoked, about $0.0004 per session on Opus 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-09-05.

Related

Other skills, from other repositories

fastapi

FastAPI best practices and conventions. Use when working with FastAPI APIs and Pydantic models for them. Keeps FastAPI code clean and up to date with the latest features and patterns, updated with new versions. Write new code or refactor and update old code.

ReflexioAI/claude-smart · 57 tokens

cloudflare-workers-multi-lang

Multi-language Workers development with Rust, Python, and WebAssembly. Use when building Workers in languages other than JavaScript/TypeScript, or when integrating WASM modules for performance-critical code.

secondsky/claude-skills · 45 tokens

python-services

Python patterns for CLI tools, async parallelism, and backend services. Use when building CLI apps, async/parallel Python, FastAPI services, background jobs, or configuring Python project tooling (uv, ruff, ty).

iliaal/whetstone · 48 tokens

functions-development

Build serverless Go or Python functions for Falcon Foundry apps. TRIGGER when user asks to "create a function", "write a serverless function", "build backend logic", runs foundry functions create, or needs help with FDK handler patterns, function testing, or collection integration from functions. Also TRIGGER when…

CrowdStrike/foundry-skills · 195 tokens

litestar-granian

Auto-activate for litestargranian, GranianPlugin, litestar run Granian options, runtime threads, HTTP/2, TLS, access logs, metrics, static mounts, or worker lifecycle. Not for non-Granian servers.

litestar-org/litestar-skills · 54 tokens

litestar-autowire

Auto-activate for litestarautowire, AutowirePlugin, AutowireConfig, domainpackages, AutowireIntegration, AutowireLoader, or clearautowirecache. Not for manual Router composition — use explicit routes.

litestar-org/litestar-skills · 56 tokens