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/supabase/supabase/studio-mock-api-testsnpx skills add supabase/supabase --skill studio-mock-api-testsgit clone --depth 1 https://github.com/supabase/supabaseWhat 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.00079 | $0.02818 |
| Opus 5 | $0.00039 | $0.01409 |
| Sonnet 5 | $0.00016 | $0.00564 |
| Haiku 4.5 | $0.00008 | $0.00282 |
Grade A, and why
studio-mock-api-tests 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 — 295 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Studio MSW component tests
Mount a Studio component, intercept its network calls with MSW, assert what renders and what gets sent. The infrastructure is already wired up — this skill is the working template plus the gotchas.
When to use
- The component (or any descendant it renders) calls a React Query hook
or mutation that hits
/platform/...,/v1/..., or another endpoint inapps/studio/data/api.d.ts. - You'd otherwise be tempted to write
vi.mock('@/data/some-query', ...). Don't. Mock the network instead — see "Why not vi.mock" below.
If the component is purely presentational with no data fetching, you don't need MSW; render and assert directly.
The template
import { fireEvent, screen, waitFor } from '@testing-library/react'
import userEvent from '@testing-library/user-event'
import { mockAnimationsApi } from 'jsdom-testing-mocks'
import { HttpResponse } from 'msw'
import { describe, expect, test, vi } from 'vitest'
import { MyComponent } from './MyComponent'
import { customRender } from '@/tests/lib/custom-render'
import { addAPIMock } from '@/tests/lib/msw'
// Needed if the component renders inside a Sheet, Modal, Popover, or
// anything else built on Radix that uses Web Animations.
mockAnimationsApi()
describe('MyComponent', () => {
test('renders rows from the API', async () => {
addAPIMock({
method: 'get',
path: '/platform/organizations',
response: () =>
HttpResponse.json<OrganizationResponse[]>([
{
/* ... */
},
]),
})
customRender(<MyComponent />)
expect(await screen.findByText('Acme')).toBeInTheDocument()
})
})
That's the whole pattern. Server lifecycle (listen/resetHandlers/
close) is handled by apps/studio/tests/vitestSetup.ts — handlers
registered via addAPIMock are scoped to the current test.
Gotchas that will eat your afternoon
1. Path params use :slug, not {slug}
addAPIMock is typed from the OpenAPI paths, but path params are
remapped to MSW's :param format. Autocomplete will guide you, but if
typecheck reports the path isn't assignable, you're using the OpenAPI
{slug} form.
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 · 295 lines · 79 tokens per session scan A 22f79c706a15
studio-mock-api-tests is a skill published in the GitHub repository supabase/supabase (108,698 stars, last pushed today), licensed Apache-2.0. It adds 79 tokens to every session and 2,818 once invoked, about $0.0004 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
fixtures
Guides authoring, organizing, and referencing test fixtures in this repo. Use when creating new fixtures, writing tests that depend on fixtures, or deciding what should be checked into git. Engine fixtures (rendering corpora) live in the engine repo.
docs-svg-kit
Author SVG figures for Grida docs — diff-able, version-controlled vector diagrams embedded in doc pages instead of screenshots. Provides reusable primitives (selection chrome, size badges, anchor pins, resize cursors, click ripples), color/typography tokens, a starter template, and finished examples to crib from.…
editor-perf
Guides performance investigation, benchmarking, and optimization of the Grida Canvas web editor (TypeScript reducer, Immer, React hooks). Use when profiling reducer dispatch cost, diagnosing slow interactions (drag, resize, color change), writing or running editor benchmarks, instrumenting with PerfObserver, or…
sdk-seam
Discipline for the seam between two SDKs (or two sides of one contract) that the same hand writes. The failure mode: "we own both sides" produces dirty contracts no foreign reviewer would accept. The exercise: pretend the other side is FFI, IPC, or a network protocol you cannot rewrite. Spawn an adversarial subagent…
agent-system
Grida AI agent system work: @grida/daemon (DaemonServer, loopback HTTP perimeter, files/workspaces, secrets store, daemon discovery) and @grida/agent (the agent tenant: sessions, providers/BYOK, runtime/tool execution, skills discovery, prompts, tiers, sandbox hosts). Use for packages/grida-daemon/…
ai-models
Research, compare, and update AI model configurations. Covers text model tiers, image and video generation models, image tool models, pricing data sourcing, and provider-cost metering against prepaid org credit. Use when bumping model versions, adding new models, updating pricing, or auditing model specs against…