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 agentmods add skills/stacklok/toolhive-studio/testing-with-api-mocksnpx skills add stacklok/toolhive-studio --skill testing-with-api-mocksgit clone --depth 1 https://github.com/stacklok/toolhive-studioWhat 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 | $0.00044 | $0.01438 |
| Opus 5 | $0.00022 | $0.00719 |
| Sonnet 5 | $0.00009 | $0.00288 |
| Haiku 4.5 | $0.00004 | $0.00144 |
Grade A, and why
testing-with-api-mocks 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 2d 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 — 199 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Testing with API Mocks
This is the starting point for all API mocking in tests. Read this skill first before working on any test that involves API calls.
This project uses MSW (Mock Service Worker) with auto-generated schema-based mocks. When writing tests for code that calls API endpoints, mocks are created automatically.
How It Works
- Run a test that triggers an API call (e.g., a component that fetches data)
- Mock auto-generates if no fixture exists for that endpoint
- Fixture saved to
renderer/src/common/mocks/fixtures/<endpoint>/<method>.ts - Subsequent runs use the saved fixture
No manual mock setup is required for basic tests.
Fixture Location
Fixtures are organized by endpoint path and HTTP method:
renderer/src/common/mocks/fixtures/
├── groups/
│ ├── get.ts # GET /api/v1beta/groups
│ └── post.ts # POST /api/v1beta/groups
├── workloads/
│ └── get.ts # GET /api/v1beta/workloads
├── workloads_name/
│ └── get.ts # GET /api/v1beta/workloads/:name
└── ...
Path parameters like :name become _name in the directory name.
Fixture Structure
Generated fixtures use the AutoAPIMock wrapper with types from the OpenAPI schema:
// renderer/src/common/mocks/fixtures/groups/get.ts
import type {
GetApiV1BetaGroupsResponse,
GetApiV1BetaGroupsData,
} from '@common/api/generated/types.gen'
import { AutoAPIMock } from '@mocks'
export const mockedGetApiV1BetaGroups = AutoAPIMock<
GetApiV1BetaGroupsResponse,
GetApiV1BetaGroupsData
>({
groups: [
{ name: 'default', registered_clients: ['client-a'] },
{ name: 'research', registered_clients: ['client-b'] },
],
})
The second type parameter (*Data) provides typed access to request parameters (query, path, body) for conditional overrides.
Naming Convention
Export names follow the pattern: mocked + HTTP method + endpoint path in PascalCase.
GET /api/v1beta/groups→mockedGetApiV1BetaGroupsPOST /api/v1beta/workloads→mockedPostApiV1BetaWorkloadsGET /api/v1beta/workloads/:name→mockedGetApiV1BetaWorkloadsByName
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.
- 2d ago First seen · 199 lines · 44 tokens per session scan A 4d26b466a92a
testing-with-api-mocks is a skill published in the GitHub repository stacklok/toolhive-studio (163 stars, last pushed 4d ago), licensed Apache-2.0. It adds 44 tokens to every session and 1,438 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-30.
Other skills, from other repositories
tui-tester
Expert guidance for testing Gemini CLI behavior and visual output using terminal automation.
e2e-test
Skill "e2e-test" from maximhq/bifrost, covering playwright e2e testing, usage, workflow overview, auto-update workflow (sync mode) and step 0: detect what changed.
harness-test-writer
Add regression test cases to the Bifrost provider harness (the Postman collection run via make run-provider-harness-test) based on a merged PR or a GitHub issue. Fetches the PR/issue, traces the affected wire path in the codebase, checks existing harness coverage, designs cases following harness conventions, inserts…
agent-tests
MUST READ before calling RunAgentTests or touching agent-tier test infrastructure -- these tests spawn real AI clients (Claude Code, Codex) and SPEND SUBSCRIPTION USAGE; never run casually. Tier model, async runner rationale, auth/isolation rules.
agent-host-e2e-tests
Use when writing, recording, updating, or troubleshooting the agent host end-to-end tests under src/vs/platform/agentHost/test/node/e2e (black-box tests that drive the whole agent host over the AHP protocol, using a CapiReplayProxy record/replay system for Claude/Copilot/Codex). Covers adding a cross-provider test…
quality
Evaluates whether a GitHub issue is spam, empty, needs more information, or is OK to proceed.