Borrowing it
Nothing to install: this file belongs to KhourySpecialProjects/odyssey. 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/KhourySpecialProjects/odyssey/develop/.claude/skills/testing-patterns/SKILL.mdgit clone --depth 1 https://github.com/KhourySpecialProjects/odysseyWrote 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/khouryspecialprojects/odyssey/testing-patterns)<a href="https://agentmods.dev/skills/khouryspecialprojects/odyssey/testing-patterns"><img src="https://agentmods.dev/badge/skills/khouryspecialprojects/odyssey/testing-patterns/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/khouryspecialprojects/odyssey/testing-patterns"><img src="https://agentmods.dev/badge/skills/khouryspecialprojects/odyssey/testing-patterns.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.00051 | $0.02158 |
| Opus 5.5 | $0.00020 | $0.00863 |
| Sonnet 5.5 | $0.00010 | $0.00432 |
| Haiku 4.5 | $0.00005 | $0.00216 |
Grade A, and why
testing-patterns 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 1mo 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 — 278 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Testing Patterns for Odyssey
Test File Locations
frontend/
├── testing/
│ ├── requests/ Request function tests (.js and .ts files)
│ ├── mocks/ Shared mock data (enrollmentsMock.js, authorizedUsersMock.js, etc.)
│ └── utils/ Test utilities
The Four Mock Patterns
1. Mocking fetchAPI (for request function tests)
import { CACHE_TAGS } from "@/lib/cache-tags";
// Mock at module level — fetchAPI auto-flattens, so mock returns FLAT data
jest.mock("@/lib/utils", () => ({
fetchAPI: jest.fn(),
}));
import { fetchAPI } from "@/lib/utils";
import { getDropletBySlug } from "@/lib/requests/droplet";
describe("getDropletBySlug", () => {
beforeEach(() => jest.clearAllMocks());
it("fetches a droplet by slug with correct params", async () => {
const mockDroplet = { id: 1, name: "Test", slug: "test-droplet" };
(fetchAPI as jest.Mock).mockResolvedValue([mockDroplet]);
const result = await getDropletBySlug("test-droplet");
expect(fetchAPI).toHaveBeenCalledWith("/droplets", {
urlParams: expect.objectContaining({
filters: { slug: { $eq: "test-droplet" } },
}),
next: expect.objectContaining({
tags: expect.arrayContaining([CACHE_TAGS.droplets]),
}),
});
expect(result).toEqual(mockDroplet);
});
it("returns null when no droplet found", async () => {
(fetchAPI as jest.Mock).mockResolvedValue([]);
const result = await getDropletBySlug("nonexistent");
expect(result).toBeNull();
});
});
Key rule: fetchAPI returns FLAT data (already flattened). Never mock it with nested { data: { attributes: {} } } format.
2. Mocking Server Actions (for component tests)
jest.mock("@/lib/actions", () => ({
completeLesson: jest.fn(),
rateDroplet: jest.fn(),
createEnrollment: jest.fn(),
}));
import { completeLesson } from "@/lib/actions";
3. Mocking next-auth (for components that check session)
jest.mock("next-auth/react", () => ({
useSession: jest.fn(() => ({
data: {
user: {
strapiUserId: 42,
roles: [{ name: "User" }],
name: "Test User",
},
},
status: "authenticated",
})),
}));
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.
- 1mo ago Changed · +34 lines d670478e638a
- 2mo ago First seen · 244 lines · 51 tokens per session scan A c5fb137f8306
testing-patterns is a skill published in the GitHub repository KhourySpecialProjects/odyssey (10 stars, last pushed yesterday), licensed MIT. It adds 51 tokens to every session and 2,158 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-10-02.
testing-patterns compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| testing-patternsKhourySpecialProjects/odyssey | Skill | 10 | yesterday | MIT | A | 51 | Claude Code |
| test-masterJeffallan/claude-skills | Skill | 13k | yesterday | MIT | A | 104 | Claude Code |
| migrate-xunit-to-xunit-v3dotnet/skills | Skill | 6.4k | today | MIT | A | 149 | Claude Code |
| go-testingGentleman-Programming/gentle-ai | Skill | 9.8k | today | MIT | A | 26 | Claude Code, Codex |
| dart-testdartsim/dart | Skill | 1.2k | yesterday | BSD-2-Clause | A | 18 | Claude Code, Codex |
| restore-internals-seams-in-finally-blocks-after-each-testZaxbyHub/opencode-swarm | Skill | 553 | today | MIT | A | 26 | OpenCode |
| test-generatorrshankras/claude-code-apple-skills | Skill | 926 | 25d ago | MIT | A | 33 | Claude Code |