Borrowing it
Nothing to install: this file belongs to gotgenes/pi-anthropic-auth. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/gotgenes/pi-anthropic-auth/main/.pi/skills/testing/SKILL.mdgit clone --depth 1 https://github.com/gotgenes/pi-anthropic-authWrote 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/gotgenes/pi-anthropic-auth/testing)<a href="https://agentmods.dev/skills/gotgenes/pi-anthropic-auth/testing"><img src="https://agentmods.dev/badge/skills/gotgenes/pi-anthropic-auth/testing/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/gotgenes/pi-anthropic-auth/testing"><img src="https://agentmods.dev/badge/skills/gotgenes/pi-anthropic-auth/testing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 1 finding, up to high
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- high Privilege Escalation · line 76 Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
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.00043 | $0.05418 |
| Opus 5.5 | $0.00017 | $0.02167 |
| Sonnet 5.5 | $0.00009 | $0.01084 |
| Haiku 4.5 | $0.00004 | $0.00542 |
Grade A, and why
testing 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 29d 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 — 209 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Testing
Load this skill when writing, debugging, or planning tests.
Vitest mock patterns
vi.mock and hoisting
- When using
vi.mock(), extract eachvi.fn()stub to a module-scope variable and reset it inbeforeEach—vi.restoreAllMocks()only operates onvi.spyOn()spies, not onvi.fn()instances. Use.mockReset()when the stub has no default implementation. Use.mockClear()when thevi.mock()factory provides a default implementation that tests must preserve. - When a
vi.mock()factory references a module-scopevi.fn()stub, wrap the stub declaration invi.hoisted()— Vitest hoistsvi.mock()above normal declarations, so unhoisted variables areundefinedwhen the factory runs. - When mocking a class constructor with
vi.mock(), usevi.fn()with no implementation — notvi.fn(() => ({})). Arrow-function implementations are not constructable;new MockClass()throws"is not a constructor". - When mocking
node:*built-in modules withvi.mock(), include adefaultkey mirroring the named exports — omitting it causes "No default export defined on the mock" errors. - A
vi.mock("node:*")factory that returns an object literal replaces the module: every export it omits becomesundefined, so a later call to a sibling export (lstatSync,tmpdir) throwsTypeErrorin unrelated tests in that file. To stub one export and keep the rest, spreadawait vi.importActual<typeof import("node:fs")>("node:fs")in the factory and override only the target. - Import the module-under-test with a static top-level
import, not a per-testawait import(...)— Vitest hoistsvi.mock()/vi.hoisted()above static imports, so the mock still applies. A per-test dynamic import of a module that transitively pulls heavy deps pays the transform/resolve cost inside each test'stestTimeoutwindow and can flake CI.
Typing mock functions
- When a
vi.fn()factory returns an empty array or narrow literal, annotate its return type explicitly —vi.fn((): string[] => []), notvi.fn(() => []). Without the annotation TypeScript infersnever[], and subsequentmockReturnValueOnce([...])calls fail with “not assignable tonever”. Useimport typeto pull domain types (e.g.,AgentConfig,PreloadedSkill) for the annotation. - When typing a mock field on an interface, use
Mock<specific-signature>— e.g.,Mock<() => void>,Mock<(arg: string) => Promise<void>>. Do not useReturnType<typeof vi.fn>— in Vitest v4 it expands toMock<Procedure | Constructable>, a union that TypeScript cannot call.
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.
- 29d ago Changed · +6 lines 55f16d4de115
- 1mo ago Changed · +29 lines · +7 tokens per session 30d3f3134fdd
- 2mo ago First seen · 174 lines · 36 tokens per session scan A e211a2cf2bc8
testing is a skill published in the GitHub repository gotgenes/pi-anthropic-auth (426 stars, last pushed 13d ago), licensed MIT. It adds 43 tokens to every session and 5,418 once invoked, about $0.0002 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-30.
Other skills, from other repositories
pixiv-cli-test
Select and run pixiv-cli checks for a behavior change, refactor, platform boundary, or PR. Follow the coding handbook for test admission and the repository's offline, native, and authorized live verification workflows.
tdd
Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.
test-driven-development
Use when implementing any feature or bugfix, before writing implementation code.
tdd
Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.
test-driven-development
Apply red-green-refactor when test-first behavior changes are requested or required by repository guidance.
n8n-integration-testing-patterns
API contract testing, authentication flows, rate limit handling, and error scenario coverage for n8n integrations with external services. Use when testing n8n node integrations.