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/production/.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.01827 |
| Opus 5.5 | $0.00020 | $0.00731 |
| Sonnet 5.5 | $0.00010 | $0.00365 |
| Haiku 4.5 | $0.00005 | $0.00183 |
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 today.
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 — 244 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.
- today First seen · 244 lines · 51 tokens per session scan A c5fb137f8306
testing-patterns is a skill published in the GitHub repository KhourySpecialProjects/odyssey (7 stars, last pushed today), licensed MIT. It adds 51 tokens to every session and 1,827 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.
Other skills, from other repositories
migrate-xunit-to-xunit-v3
Migrate .NET test projects from xUnit.net v2 to xunit.v3 and fix v3 breaks. Use for package/CPM conversion, OutputType=Exe, preserving the VSTest or MTP runner (including projects currently using YTest.MTP.XUnit2), incompatible TFMs, async void tests, string-to-Type attributes, custom Fact/Theory/BeforeAfterTest…
go-testing
Trigger: Go tests, go test coverage, Bubbletea teatest, golden files. Apply focused Go testing patterns.
dart-test
DART Test: unit tests, integration tests, CI validation, and debugging.
mobiai-ios-testing
Use when writing or running tests in an iOS project — unit tests, UI tests, snapshot tests, choosing the right framework.
restore-internals-seams-in-finally-blocks-after-each-test
When delegating a task affected by this skill, include.
nw-fp-clojure
Clojure language-specific patterns, data-first modeling, REPL-driven development, and spec.