بنقرة واحدة
mock-gen
Generates mock data factories and API mocks for testing
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Generates mock data factories and API mocks for testing
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Analyzes the current session's token usage, pinpoints where tokens were wasted, and produces concrete optimization actions
Generates API documentation from route definitions (Express, Fastify, Hono, etc.)
Adds caching to expensive operations - Redis, in-memory, HTTP cache headers
Staged değişiklikleri analiz edip Conventional Commits formatında commit mesajı oluşturur
Reports cyclomatic complexity hotspots and refactoring suggestions
Finds unused functions, variables, exports, and dependencies across the codebase
| name | mock-gen |
| description | Generates mock data factories and API mocks for testing |
| argument-hint | <type-or-interface-name> |
| user-invocable | true |
| allowed-tools | Read Grep Glob Edit |
| effort | low |
Target type/interface: $ARGUMENTS
grep -rn "interface $ARGUMENTS\|type $ARGUMENTS\s*=" src/ --include="*.ts" | head -5
Read the full type definition.
Generate a factory function:
// Generated mock factory
export function create$ARGUMENTS(overrides?: Partial<$ARGUMENTS>): $ARGUMENTS {
return {
id: faker.string.uuid(),
name: faker.person.fullName(),
email: faker.internet.email(),
createdAt: faker.date.recent(),
// ...all fields
...overrides,
}
}
If faker or @faker-js/faker is not in the project, use inline test data patterns instead.
Also generate:
src/mocks/)createMany$ARGUMENTS(n: number)Place in src/__mocks__/ or src/testing/factories/ - match project convention.