Borrowing it
Nothing to install: this file belongs to Piyush8296/claude-workspace. 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/Piyush8296/claude-workspace/main/.claude/skills/testing-strategy/SKILL.mdgit clone --depth 1 https://github.com/Piyush8296/claude-workspaceWrote 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/piyush8296/claude-workspace/testing-strategy)<a href="https://agentmods.dev/skills/piyush8296/claude-workspace/testing-strategy"><img src="https://agentmods.dev/badge/skills/piyush8296/claude-workspace/testing-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/piyush8296/claude-workspace/testing-strategy"><img src="https://agentmods.dev/badge/skills/piyush8296/claude-workspace/testing-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.00038 | $0.01470 |
| Opus 5 | $0.00019 | $0.00735 |
| Sonnet 5 | $0.00008 | $0.00294 |
| Haiku 4.5 | $0.00004 | $0.00147 |
Grade A, and why
testing-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 8d 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 — 230 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Testing Strategy
Philosophy
- Test behavior, not implementation. Refactors should never break tests unless behavior changes.
- TDD when practical. Write the failing test first. Red → Green → Refactor.
- Factory pattern for all test data.
getMockX(overrides?)— no duplicated fixtures. - Test the contract. Props in, rendered output + callbacks out.
Test Pyramid
/\ E2E (Playwright)
/ \ Critical paths only: auth, checkout, core CRUD
/ \ ~10% of tests
/------\ Integration
/ \ Feature workflows, API + rendering
/ \ ~20% of tests
/------------\ Unit
/ \ Components, hooks, utilities
/ \ ~70% of tests
Factory Pattern
Props Factory
import { type ComponentProps } from 'react';
const getDefaultProps = (
overrides?: Partial<ComponentProps<typeof UserCard>>
) => ({
name: 'Jane Doe',
email: '[email protected]',
role: 'admin' as const,
onEdit: vi.fn(),
onDelete: vi.fn(),
...overrides,
});
Data Factory
let idCounter = 0;
export function getMockUser(overrides?: Partial<User>): User {
idCounter += 1;
return {
id: `user-${idCounter}`,
name: 'Test User',
email: `test${idCounter}@example.com`,
role: 'viewer',
createdAt: new Date('2024-01-01').toISOString(),
...overrides,
};
}
export function getMockUsers(count: number, overrides?: Partial<User>): User[] {
return Array.from({ length: count }, () => getMockUser(overrides));
}
Query Result Factory
export function getMockQueryResult<T>(data: T, overrides?: Partial<UseQueryResult<T>>) {
return {
data,
isPending: false,
isError: false,
error: null,
refetch: vi.fn(),
...overrides,
};
}
// Usage
vi.mocked(useUsers).mockReturnValue(
getMockQueryResult(getMockUsers(3))
);
// Loading state
vi.mocked(useUsers).mockReturnValue(
getMockQueryResult(undefined, { isPending: true, data: undefined })
);
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.
- 8d ago First seen · 230 lines · 38 tokens per session scan A d4676c952352
testing-strategy is a skill published in the GitHub repository Piyush8296/claude-workspace (2 stars, last pushed 4mo ago), licensed MIT. It adds 38 tokens to every session and 1,470 once invoked, about $0.0002 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-08-31.
Other skills, from other repositories
accessibility-a11y
WCAG 2.2 compliance, ARIA patterns, keyboard navigation, screen readers, automated testing.
refactor-ops
Safe refactoring patterns - extract, rename, restructure with test-driven methodology and dead code detection. Use for: refactor, refactoring, extract function, extract component, rename, move file, restructure, dead code, unused imports, code smell, duplicate code, long function, god object, feature envy, DRY…
testing-ops
Cross-language testing strategies and patterns. Triggers on: test pyramid, unit test, integration test, e2e test, TDD, BDD, test coverage, mocking strategy, test doubles, test isolation.
test-first
Use when implementing any feature, bugfix, or refactor that has a testable outcome. Activate for keywords like "TDD", "test-first", "red-green", "write the test first", "implement ", "fix ". Enforces the red-green-refactor discipline -- write a failing test, make it pass with the smallest change, refactor with tests…
fable-tdd
Drive testable behavior changes and bug fixes through disciplined red-green-refactor cycles with observable regression tests. Use when implementing new features with unit/integration tests, fixing reproducible bugs, modifying business logic, or writing test-first behavior contracts — even if the user does not…
testkit
Retrofit an automated test suite onto a working codebase that has none: rank the untested surface, crown a slice, stand up a runner, and write tests that were each watched to fail before they were kept. Use when the user says "this project has no tests", "add test coverage", or "what should I test first". It never…