Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/thapaliyabikendra/ai-artifactsnpx agentmods add commands/thapaliyabikendra/ai-artifacts/api-mock-templatesWrote 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/commands/thapaliyabikendra/ai-artifacts/api-mock-templates)<a href="https://agentmods.dev/commands/thapaliyabikendra/ai-artifacts/api-mock-templates"><img src="https://agentmods.dev/badge/commands/thapaliyabikendra/ai-artifacts/api-mock-templates.svg" alt="Measured on agentmods" 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.00000 | $0.02412 |
| Opus 5 | $0.00000 | $0.01206 |
| Sonnet 5 | $0.00000 | $0.00482 |
| Haiku 4.5 | $0.00000 | $0.00241 |
Grade A, and why
api-mock-templates 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 — 411 lines — stays where its author put it; the contents beside it link to each section on GitHub.
API Mock Templates Reference
Templates for mock server implementation using MSW (Mock Service Worker) for Node.js/React.
MSW Setup
Installation
npm install msw --save-dev
Mock Server Handler (Node.js)
// mocks/handlers.ts
import { http, HttpResponse, delay } from 'msw';
// Define API mocks
export const handlers = [
// GET list with pagination
http.get('/api/patients', async ({ request }) => {
const url = new URL(request.url);
const page = parseInt(url.searchParams.get('page') || '1');
const pageSize = parseInt(url.searchParams.get('pageSize') || '20');
await delay(100); // Simulate network latency
return HttpResponse.json({
items: generatePatients(pageSize, page),
totalCount: 150,
pageNumber: page,
pageSize: pageSize,
});
}),
// GET single resource
http.get('/api/patients/:id', async ({ params }) => {
const { id } = params;
if (id === 'not-found') {
return HttpResponse.json(
{ error: { code: 'NOT_FOUND', message: 'Patient not found' } },
{ status: 404 }
);
}
return HttpResponse.json({
id,
name: 'John Doe',
email: '[email protected]',
status: 'Active',
});
}),
// POST create resource
http.post('/api/patients', async ({ request }) => {
const body = await request.json();
// Simulate validation error
if (!body.email) {
return HttpResponse.json(
{ error: { code: 'VALIDATION_ERROR', details: [{ field: 'email', message: 'Email is required' }] } },
{ status: 422 }
);
}
return HttpResponse.json(
{ id: crypto.randomUUID(), ...body },
{ status: 201 }
);
}),
// PUT update resource
http.put('/api/patients/:id', async ({ params, request }) => {
const { id } = params;
const body = await request.json();
return HttpResponse.json({ id, ...body });
}),
// DELETE resource
http.delete('/api/patients/:id', async ({ params }) => {
return new HttpResponse(null, { status: 204 });
}),
];
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 · 411 lines · 0 tokens per session scan A 48f2015168a3
api-mock-templates is a command published in the GitHub repository thapaliyabikendra/ai-artifacts (24 stars, last pushed 5mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 2,412 tokens. 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 commands, from other repositories
verify
Run repository verification using the verification-loop skill.
qa-changes
This skill should be used when the user asks to "QA a pull request", "test PR changes", "verify a PR works", "functionally test changes", or when an automated workflow triggers QA validation of code changes. Provides a structured methodology for setting up the environment, exercising changed behavior, and reporting…
test-coverage
Analyze test coverage and identify the highest-value gaps to fill.
tdd
A command that follows test-driven development (TDD), a method where you write tests before the code they check. It moves through writing a failing test, adding the smallest implementation, and then improving the code.
check-dev
Type-check a Z specification with fuzz.
laravel-playwright
E2E Playwright patterns; use the laravel:e2e-playwright skill exactly as written.