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.
npx skills add hmj1026/dhpk --skill dhpk-pytest-asyncgit clone --depth 1 https://github.com/hmj1026/dhpkWrote 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.
[](https://agentmods.dev/skills/hmj1026/dhpk/dhpk-pytest-async)<a href="https://agentmods.dev/skills/hmj1026/dhpk/dhpk-pytest-async"><img src="https://agentmods.dev/badge/skills/hmj1026/dhpk/dhpk-pytest-async.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00079 | $0.00906 |
| Opus 5 | $0.00039 | $0.00453 |
| Sonnet 5 | $0.00016 | $0.00181 |
| Haiku 4.5 | $0.00008 | $0.00091 |
Grade A, and why
dhpk-pytest-async 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 3d 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.
How it starts
The opening of the file, as written. The whole thing — 76 lines — stays where its author put it; the contents beside it link to each section on GitHub.
pytest (async)
Test strategy for async Python services. Pairs with the python and fastapi
modules. TDD: write the failing test first (red), implement to green, refactor.
Configuration
pytest-asynciowithasyncio_mode = "auto"(in[tool.pytest.ini_options]) —async def test_*runs without a per-test@pytest.mark.asynciodecorator.pytest-covenforces a coverage floor (ccas:--cov-fail-under=70, measured on unit tests).pytest-timeoutguards hangs.- Layout:
tests/unit/(fast, isolated) andtests/integration/(ASGI client + real query paths). Exclude wiring-only modules (__main__.py, app factory) from the unit coverage measure; cover them in integration instead.
Fixtures
- In-memory SQLite for both unit and integration: create an async engine on
sqlite+aiosqlite:///:memory:, create tables per test (or per session with a rollback-per-test transaction), yield anAsyncSession. Keep it fast and hermetic. - Build object factories/builders for domain models rather than hand-rolling rows in every test.
- Mock external services (Gmail, Telegram, LLM) at the boundary — inject fakes via
the same
Depends/Protocol seams the app uses. Never hit the network in unit tests.
FastAPI integration tests
- Drive the app with
httpx.AsyncClient(transport=ASGITransport(app=app), ...)— no live server needed. Override DB/auth dependencies withapp.dependency_overridesto inject the in-memory session and a test user. - Assert on status + response schema, not on internal ORM state. Cover the error paths (422 validation, 401/403 auth, 404) — not just the happy path.
Markers & opt-in live tests
- Tests that hit a real external service (e.g.
@pytest.mark.live_fubonin ccas) must be opt-in and excluded from the default run / CI. Register markers in config and select with-m "not live_fubon"by default. - Use
@pytest.mark.parametrizefor table-driven cases (parsers, classifiers, date-boundary logic) instead of copy-pasted test bodies.
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.
- 3d ago First seen · 76 lines · 79 tokens per session scan A a9ce57f0999c
dhpk-pytest-async is a skill published in the GitHub repository hmj1026/dhpk (2 stars, last pushed yesterday), licensed MIT. It adds 79 tokens to every session and 906 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.
Other skills, from other repositories
Test Scaffold (Laravel/PHPUnit)
Generate PHP/Laravel (PHPUnit) test skeletons from specifications.
Unit Test Scaffold (Python/pytest)
Generate Python/pytest unit test skeletons from specifications.
Unit Test Scaffold (TypeScript)
Generate TypeScript unit test skeletons (Jest/Vitest) from specifications.
js-quality
A JavaScript quality-check workflow using ESLint, Prettier, Jest, or Vitest. It checks code for common problems, consistent formatting, and passing automated tests.
php-quality
A PHP quality-check workflow using PHPStan, Pint, PHPUnit, Pest, or Laravel's test command. It checks code behavior, types, style, and formatting.
python-quality
A Python quality-check workflow using tests, type checking, linting, formatting, and import sorting. Type checking verifies that values are used with the expected kinds, while linting finds common code problems.