openrouter-compliance-review
Review OpenRouter integration for regulatory compliance (SOC2, GDPR,
managing-snapshot-tests
Create and validate component snapshots for UI regression testing.
Full skill instructions
Create, update, and maintain snapshot tests for UI components and data structures using Jest, Vitest, or pytest snapshot plugins. Manages serialized output snapshots (HTML, JSON, component trees) to detect unexpected changes in rendered output.
pytest-snapshot/syrupy for Python.snap files or __snapshots__/ directory)expect(result).toMatchSnapshot() or toMatchInlineSnapshot().__snapshots__/ComponentName.test.ts.snap."renders with error state", "displays loading skeleton".jest --updateSnapshot or vitest --update after verifying changes are correct.jest --ci to detect obsolete snapshots that no longer match any test..snap files for removed components.--ci flag which treats missing snapshots as failures.toMatchObject for partial structure matching.*.test.ts or *.test.tsx) with toMatchSnapshot() assertions__snapshots__/*.snap)| Error | Cause | Solution |
|---|---|---|
| Snapshot mismatch on unrelated change | Component depends on a shared style or context provider | Isolate components with wrapper providers; mock global styles |
| Snapshot file is enormous (>1000 lines) | Entire page DOM serialized instead of target component | Narrow the snapshot scope to the specific component subtree; use container.querySelector |
| Obsolete snapshot warning | Test was renamed or deleted but .snap file remains | Run jest --updateSnapshot to remove orphaned entries; delete unused .snap files |
| Snapshot differs between local and CI | Different Node.js version or OS renders slightly different output | Pin Node.js version in CI; use toMatchInlineSnapshot for exact control |
| Non-deterministic snapshot | Component includes random keys, timestamps, or Math.random() | Mock Date.now() and Math.random(); use expect.any(String) for volatile fields |
React component snapshot test (Jest):
import { render } from '@testing-library/react';
import { Alert } from './Alert';
describe('Alert', () => {
it('renders success variant', () => {
const { container } = render(
<Alert variant="success" message="Operation completed" />
);
expect(container.firstChild).toMatchSnapshot();
});
it('renders error with inline snapshot', () => {
const { container } = render(
<Alert variant="error" message="Something failed" />
);
expect(container.firstChild).toMatchInlineSnapshot(`
<div class="alert alert-error" role="alert">
<span>Something failed</span>
</div>
`);
});
});
Custom serializer to exclude dynamic IDs:
// jest.config.ts
export default {
snapshotSerializers: ['./test/serializers/strip-ids.ts'],
};
// test/serializers/strip-ids.ts
export const serialize = (val: string) =>
val.replace(/id="[a-z0-9-]+"/g, 'id="[dynamic]"');
export const test = (val: unknown) => typeof val === 'string' && val.includes('id=');
Review OpenRouter integration for regulatory compliance (SOC2, GDPR,
Data synchronization, ETL patterns, and data management for MaintainX.
Execute Groq primary workflow: chat completions with tool use and JSON
Validate CSRF protection implementations for security gaps. Use when
Configure this skill should be used when the user asks about "API contract",
Execute Ideogram incident response with triage, mitigation, and postmortem.
Execute create, select, and transform features to improve machine learning
Reusable patterns for the Gamma REST API (no SDK exists).
Apply production-ready Deepgram SDK patterns for TypeScript and Python.
Migrate to OpenRouter from direct provider APIs or upgrade between SDK/model
Diagnose and fix common OpenRouter API errors. Use when encountering
Optimize Linear API usage, reduce unnecessary calls, and maximize
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience