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-swift-test-strategygit 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-swift-test-strategy)<a href="https://agentmods.dev/skills/hmj1026/dhpk/dhpk-swift-test-strategy"><img src="https://agentmods.dev/badge/skills/hmj1026/dhpk/dhpk-swift-test-strategy/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.
<a href="https://agentmods.dev/skills/hmj1026/dhpk/dhpk-swift-test-strategy"><img src="https://agentmods.dev/badge/skills/hmj1026/dhpk/dhpk-swift-test-strategy.svg" alt="Reviewed on agentmods" width="80" 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.00064 | $0.00944 |
| Opus 5 | $0.00032 | $0.00472 |
| Sonnet 5 | $0.00013 | $0.00189 |
| Haiku 4.5 | $0.00006 | $0.00094 |
Grade A, and why
dhpk-swift-test-strategy 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 6d 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 — 82 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Swift test strategy
Load references on demand:
references/swift-testing-api.md—@Test/#expect/#require/parameterized/traits.references/xctest-bridging.md— XCTest coexistence, async, expectations.references/xcuitest.md—XCUIApplication, launch-arg test seams.references/snapshot-testing.md— swift-snapshot-testing record/verify discipline.references/test-taxonomy.md— the 3-layer model → directories.references/protocol-di-host-testing.md— protocol-fake injection that makes file/Keychain/network code run under hostswift test(no simulator).
Core rules
-
RED first. Write the failing test before the implementation for any new feature or bugfix in business-logic code (services, view models, repositories). See the tdd-guide agent for the workflow; this module supplies the iOS conventions.
-
Swift Testing for unit/integration, XCTest for UI/perf. New unit and integration tests use
import Testing(@Test,#expect,#require). UI tests use XCTest +XCUIApplication; performance uses XCTestmeasure. The two frameworks coexist in the same project (babylon already has both). -
Test async/actor code with
await. Mark testsasync throws;awaitthe service. Use#requireto unwrap-or-fail before asserting on the value. -
Inject fakes, don't touch real PHI stores. Unit tests substitute protocol fakes (in-memory Keychain, in-memory Core Data store
NSInMemoryStoreType//dev/nullURL). No test writes to the real encrypted store or the device Keychain shared with the app. -
Three layers, three homes. See
test-taxonomy.md. Keep unit tests pure (no I/O), integration tests transactional/isolated, UI tests few and critical.
Critical — never
- Never assert on
printoutput or sleep-and-hope for async —awaitthe result or use a confirmation. - Never leave a flaky timing-based test in the suite; make the seam deterministic.
- Never commit a snapshot test in record mode (it always passes).
- Never let a unit test depend on Keychain/disk/network — that's an integration test by definition.
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.
- 6d ago First seen · 82 lines · 64 tokens per session scan A 4a875518357d
dhpk-swift-test-strategy is a skill published in the GitHub repository hmj1026/dhpk (2 stars, last pushed today), licensed MIT. It adds 64 tokens to every session and 944 once invoked, about $0.0003 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
kotlin-testing
Kotlin testing patterns with Kotest, MockK, coroutine testing, property-based testing, and Kover coverage. Follows TDD methodology with idiomatic Kotlin practices.
kotlin-testing
Kotlin testing patterns with Kotest, MockK, coroutine testing, property-based testing, and Kover coverage. Follows TDD methodology with idiomatic Kotlin practices.
nested-fixture-pattern
This skill should be used when working on Java projects with JUnit tests that have layered preconditions, expensive shared setup (servers, databases, provisioned users), or complex scenario trees. Trigger phrases include "nested fixture", "fixture pattern", "scenario tree", "layered test setup", or when the user is…
test-driven-development
Strict red-green-refactor TDD workflow for implementing features, fixing bugs, or changing behavior in Rails applications. Enforces the discipline of writing a failing test before any production code. Use whenever you want to implement with TDD — whether a new feature, a bugfix, a refactor, or any behavior change.
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.