← Back to list

mock-data
by eug-subscription
⭐ 0🍴 0📅 Jan 23, 2026
SKILL.md
name: mock-data description: Creates typed mock data files in src/data/ following project conventions. Use when needing test data for new features or components.
Mock Data Generator Skill
Creates typed mock data files following project patterns.
File Pattern
src/data/mock-{feature}.ts
Template Structure
// src/data/mock-{feature}.ts
export interface {Feature}Data {
id: string;
name: string;
// Add fields based on requirements
}
export const mock{Feature}Data: {Feature}Data = {
id: "1",
name: "Example",
};
// For arrays:
export const mock{Feature}List: {Feature}Data[] = [
{ id: "1", name: "Item 1" },
{ id: "2", name: "Item 2" },
];
Conventions
- Filename: kebab-case with
mock-prefix - Named exports: Both interface and data
- Type-first: Define interface before data
- Realistic data: Use meaningful values, not "test123"
Examples
See these files for reference patterns:
src/data/mock-order.tssrc/data/mock-project.tssrc/data/mock-unmatched-items.ts
Usage with TanStack Query
// hooks/use{Feature}.ts
import { useQuery } from "@tanstack/react-query";
import { mock{Feature}Data, {Feature}Data } from "../data/mock-{feature}";
async function fetch{Feature}Data(): Promise<{Feature}Data> {
await new Promise((r) => setTimeout(r, 500)); // Simulate API
return mock{Feature}Data;
}
export function use{Feature}() {
return useQuery({
queryKey: ["{feature}"],
queryFn: fetch{Feature}Data,
});
}
Score
Total Score
50/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
Reviews
💬
Reviews coming soon