[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6QJ3GDB50NKKEQQM5HGAJ54":3,"skill-same:01M6QJ3GDB50NKKEQQM5HGAJ54":73},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":22,"publishedAt":42,"linkOnly":43,"markdownContent":44,"markdownBody":45,"frontMatter":46,"refName":53,"commitSha":54,"skillDirectory":55,"forksCount":13,"repositoryHtmlUrl":56,"repositoryHomepageUrl":6,"ownerHtmlUrl":57,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":58,"install":59,"resources":72},"01M6QJ3GDB50NKKEQQM5HGAJ54","reproduce-bug",null,"Master reliable bug reproduction: how to construct minimal reproduction cases, isolate conditions, and verify bugs consistently. Use when debugging, creating bug reports, or when a bug is hard to reproduce. Triggers especially when user says \"reproduce bug\", \"can't reproduce\", \"minimal case\", \"bug report\", or \"isolating the bug\".","ImaginerLabs\u002Fskill-manager","ImaginerLabs","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F214277308?v=4","01M6QGGDPNF15RMMT1RCFDH9FN","01M6QGGDTH5BY64DQ123NR8M33",0,"MIT","https:\u002F\u002Fgithub.com\u002FImaginerLabs\u002Fskill-manager\u002Fblob\u002Fmain\u002Fskills\u002Fcoding\u002Freproduce-bug\u002FSKILL.md",[17],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000034","行政与办公人员","PROFESSION","适用职业",[23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41],"reproduce","reproduce bug","bug","minimal","bugs","can","case","how to","triggers","master","reports","bug report","use","user","coding","how","verify","report","debugging","2026-11-10 10:12:30",false,"---\nname: reproduce-bug\ndescription: >-\n  Master reliable bug reproduction: how to construct minimal reproduction cases, isolate conditions, and verify bugs consistently. Use when debugging, creating bug reports, or when a bug is hard to reproduce. Triggers especially when user says \"reproduce bug\", \"can't reproduce\", \"minimal case\", \"bug report\", or \"isolating the bug\".\ncategory: coding\npriority: P2\ntrigger_patterns:\n  - \"reproduce bug\"\n  - \"can't reproduce\"\n  - \"minimal case\"\n  - \"bug report\"\n  - \"isolating the bug\"\n  - \"reproduction steps\"\n---\n\n# Reproduce Bug — Systematic Bug Reproduction Framework\n\n## Overview\n\nReproduce-bug is a **behavioral specification skill** that encapsulates the methodology for **creating reliable, minimal bug reproduction cases that can be used for debugging, testing, and reporting**.\n\nThis skill embodies the discipline of developers who've spent hours on bugs they couldn't reproduce and know that a good reproduction case is half the debugging battle.\n\n## Core Philosophy\n\n### The Reproduction Principle\n\n> \"If you can't reproduce it, you can't fix it. If you can reproduce it reliably, you're already halfway to fixing it.\"\n\n### Reproduction Quality Spectrum\n\n```\n┌─────────────────────────────────────────────────────────────┐\n│                  REPRODUCTION QUALITY                          │\n│                                                               │\n│  UNRELIABLE:                RELIABLE:                         │\n│  ───────────                ─────────                         │\n│  \"It happens sometimes\"     \"Steps 1-2-3 always reproduce\"    │\n│  \"On my machine it works\"  \"Confirmed on clean environment\"  │\n│  \"After many clicks\"        \"First click reproduces\"         │\n│                                                               │\n│  Unreliable reproduction = Unreliable fix                   │\n│  Reliable reproduction = Fixable problem                     │\n└─────────────────────────────────────────────────────────────┘\n```\n\n## Decision Framework\n\n### Is This Reproducible?\n\n```markdown\n## Reproduction Assessment\n\n| Question | If NO | If YES |\n|----------|-------|--------|\n| Can you make it happen on demand? | Investigate conditions | You have reproduction |\n| Does it happen in clean environment? | Environment issue? | Proceed with fix |\n| Is it consistent? | Flaky test or race | Add to known issues |\n| Can you minimize it? | Reduce dependencies | Minimal case found |\n```\n\n### When Reproduction is Hard\n\n| Situation | Strategy |\n|-----------|----------|\n| Race condition | Add delays, repeat many times |\n| Timing dependent | Mock time, slow down execution |\n| Environment specific | Docker, VM, clean install |\n| Data dependent | Find minimal data trigger |\n| User interaction | Script the exact interaction |\n\n## Behavioral Specification\n\n### Phase 1: Gather Information\n\n#### 1.1 Initial Questions\n\n```markdown\n## Bug Report Template\n\n**What were you doing?**\n[Describe actions]\n\n**What happened?**\n[Describe error\u002Fbehavior]\n\n**What should happen?**\n[Describe expected]\n\n**How often does this happen?**\n- [ ] Always\n- [ ] Sometimes (1 in ___ times)\n- [ ] Only on specific data\n- [ ] Only in specific environment\n\n**What have you tried?**\n[Attempts to reproduce]\n```\n\n#### 1.2 Environment Snapshot\n\n```markdown\n## Environment Information\n\n| Item | Value |\n|------|-------|\n| Browser \u002F Version | Chrome 120 |\n| OS | macOS 14 |\n| Node version | 18.17.0 |\n| Branch | main |\n| Commit | abc1234 |\n| Date\u002FTime | 2024-04-17 10:30 UTC |\n```\n\n### Phase 2: Isolate the Variables\n\n#### 2.1 Variable Checklist\n\n```markdown\n## Isolation Variables\n\n□ User state (logged in? permissions?)\n□ Data state (specific record? any record?)\n□ Time state (after midnight? business hours?)\n□ Network state (slow? offline?)\n□ Browser state (cache? cookies?)\n□ Session state (new session? resumed?)\n□ Configuration (feature flags? env vars?)\n□ Dependencies (versions? recent updates?)\n```\n\n#### 2.2 Systematic Elimination\n\n```typescript\n\u002F\u002F Start with FULL conditions that cause bug\nconst conditions = {\n  userState: 'logged_in',\n  dataState: 'specific_user_123',\n  networkState: 'slow_3g',\n  timeState: 'after_midnight',\n  \u002F\u002F ... all conditions\n};\n\n\u002F\u002F ELIMINATE one at a time\n\u002F\u002F Does bug still happen without X?\n\n\u002F\u002F If yes → X was not the cause\n\u002F\u002F If no → X IS required for bug\n\n\u002F\u002F Continue until minimal set found\n```\n\n### Phase 3: Create Minimal Reproduction\n\n#### 3.1 Minimal Case Principles\n\n```typescript\n\u002F\u002F BAD: Reproduction with too much code\nasync function reproduce() {\n  \u002F\u002F 500 lines of setup\n  \u002F\u002F 10 dependencies\n  \u002F\u002F Complex state\n\n  \u002F\u002F Bug happens somewhere in there\n}\n\n\u002F\u002F GOOD: Minimal reproduction\nasync function reproduce() {\n  \u002F\u002F Only essential setup\n  \u002F\u002F Only what triggers bug\n  \u002F\u002F Clear, focused test\n\n  \u002F\u002F Bug is isolated and clear\n}\n```\n\n#### 3.2 Building Minimal Case\n\n```typescript\n\u002F\u002F STEP 1: Start with failing case\n\u002F\u002F Your current app state when bug occurs\n\n\u002F\u002F STEP 2: Remove non-essential parts\n\u002F\u002F Can you remove X and still reproduce?\n\u002F\u002F Remove Y?\n\n\u002F\u002F STEP 3: Reduce data to minimum\n\u002F\u002F Does user \"John Doe\" work? → No\n\u002F\u002F Does user { id: 1 } work? → No (smaller!)\n\u002F\u002F Does any user work? → Yes (minimal!)\n\n\u002F\u002F STEP 4: Isolate the function\n\u002F\u002F Call the function directly\n\u002F\u002F Remove event handlers, middleware\n\n\u002F\u002F RESULT: A minimal, focused reproduction\n```\n\n#### 3.3 The Minimal Test Template\n\n```typescript\n\u002F\u002F Minimal reproduction test\ndescribe('Bug Reproduction', () => {\n  it('should reproduce the issue', async () => {\n    \u002F\u002F MINIMAL SETUP: Only what you need\n\n    \u002F\u002F Step 1: Setup\n    const state = minimalState; \u002F\u002F As small as possible\n\n    \u002F\u002F Step 2: Action\n    const result = functionUnderTest(state);\n\n    \u002F\u002F Step 3: Verify bug\n    expect(result).toBe(expectedBuggyBehavior);\n  });\n});\n```\n\n### Phase 4: Verify Reproduction\n\n#### 4.1 Verification Checklist\n\n```markdown\n## Reproduction Verification\n\n□ Can you make it fail on demand?\n  └─ Run test 3 times, all fail\n\n□ Is it consistent?\n  └─ No randomness causes intermittent passes\n\n□ Is it isolated?\n  └─ No dependencies on other tests\n  └─ No shared state\n\n□ Is it minimal?\n  └─ Can't remove anything else\n  └─ All setup is essential\n\n□ Can others verify?\n  └─ Share reproduction steps\n  └─ Someone else runs it\n```\n\n#### 4.2 Creating a Reproduction Script\n\n```typescript\n\u002F\u002F repro-bug-123.ts\n\u002F\u002F Run with: npx ts-node repro-bug-123.ts\n\nasync function main() {\n  console.log('Starting reproduction...');\n\n  \u002F\u002F 1. Minimal setup\n  const testDb = await createTestDatabase();\n\n  \u002F\u002F 2. Specific seed data\n  await testDb.users.create({\n    id: 'user-minimal',\n    name: 'Test User',\n  });\n\n  \u002F\u002F 3. Execute\n  const result = await processUser('user-minimal');\n\n  \u002F\u002F 4. Observe\n  console.log('Result:', result);\n  console.log('Expected: BUG to occur');\n\n  \u002F\u002F 5. Exit with error if bug doesn't occur\n  if (result.status !== 'error') {\n    console.error('BUG NOT REPRODUCED!');\n    process.exit(1);\n  }\n\n  console.log('BUG REPRODUCED SUCCESSFULLY');\n}\n\nmain();\n```\n\n## Common Scenarios\n\n### Scenario 1: \"It only happens in production\"\n\n```markdown\n## Production-Only Issue Strategy\n\n1. GET PRODUCTION DATA\n   - Anonymize sensitive parts\n   - Create minimal reproduction\n\n2. GET PRODUCTION ENVIRONMENT\n   - Docker image\n   - Environment variables\n   - Version numbers\n\n3. REPRODUCE LOCALLY\n   docker run --env-from-file .env.production production-image\n   # Or: npm run start:production\n\n4. REDUCE\n   - Find minimal env vars needed\n   - Find minimal data needed\n   - Find minimal steps needed\n\n5. FIX AND VERIFY\n   - Apply fix locally\n   - Test against reproduction\n   - Deploy\n```\n\n### Scenario 2: \"Race condition - happens randomly\"\n\n```typescript\n\u002F\u002F Strategy: Force the race to happen\n\n\u002F\u002F 1. Add artificial delays\nawait delay(1); \u002F\u002F Slow down first operation\nawait delay(0); \u002F\u002F Speed up second operation\n\n\u002F\u002F 2. Run many times\nfor (let i = 0; i \u003C 100; i++) {\n  const result = raceCondition();\n  if (result.bug) {\n    console.log(`Reproduced on iteration ${i}`);\n    break;\n  }\n}\n\n\u002F\u002F 3. Find the timing window\n\u002F\u002F Once you know the window, you can reproduce reliably\n\n\u002F\u002F 4. Create minimal reproduction\n\u002F\u002F With fixed delay, bug always happens\n```\n\n### Scenario 3: \"Bug with specific data\"\n\n```typescript\n\u002F\u002F Strategy: Binary search on data\n\n\u002F\u002F Start: Full data that triggers bug\nconst fullData = { \u002F* 50 fields *\u002F };\n\n\u002F\u002F Binary search: Remove half\nconst half1 = { \u002F* 25 fields *\u002F }; \u002F\u002F Bug still happens\n\u002F\u002F → Bug is in first half\nconst quarter1 = { \u002F* 12 fields *\u002F }; \u002F\u002F Bug still happens\n\u002F\u002F → Continue...\n\n\u002F\u002F Continue until minimal\nconst minimalData = { fieldA: \"value\", fieldB: 123 }; \u002F\u002F Bug!\n\n\u002F\u002F Now you know: Only fieldA and fieldB matter\n```\n\n### Scenario 4: \"Can't find the trigger\"\n\n```markdown\n## When You Don't Know When It Happens\n\n1. ADD TELEMETRY\n   console.log('About to do X');\n   \u002F\u002F After each significant step\n\n2. CAPTURE STATE AT FAILURE\n   } catch (error) {\n     console.error('State at failure:', {\n       timestamp: new Date().toISOString(),\n       stack: error.stack,\n       relevantVariables: { ... }\n     });\n   }\n\n3. ANALYZE PATTERNS\n   - Same time each day?\n   - Same user actions?\n   - Same data?\n   - Same load?\n\n4. NARROW DOWN\n   - Start broad, narrow each hypothesis\n```\n\n## The Reproduction Report\n\n### Template\n\n```markdown\n## Bug Reproduction Report\n\n**Bug ID:** [Link to issue tracker]\n\n**Summary:** [One sentence description]\n\n**Environment:**\n- [OS, Browser, Node version]\n- [Branch, Commit]\n\n**Reproduction Rate:** [100% \u002F 50% \u002F 1 in 10]\n\n**Steps to Reproduce:**\n1. [Step 1]\n2. [Step 2]\n3. [Step 3]\n\n**Expected Behavior:**\n[What should happen]\n\n**Actual Behavior:**\n[What happens instead]\n\n**Minimal Reproduction:**\n[Code that reproduces the bug]\n\n**Root Cause (suspected):**\n[If known]\n```\n\n### Example\n\n```markdown\n## Bug Reproduction Report\n\n**Bug ID:** ISSUE-456\n\n**Summary:** User deletion fails when user has orders\n\n**Environment:**\n- macOS 14, Chrome 120, Node 18.17\n- main branch, commit abc1234\n\n**Reproduction Rate:** 100%\n\n**Steps to Reproduce:**\n1. Create user\n2. Create order for that user\n3. Attempt to delete user\n4. Error: \"Cannot delete user with orders\"\n\n**Expected Behavior:**\nUser should be deleted (or cascade delete)\n\n**Actual Behavior:**\nError thrown, user not deleted\n\n**Minimal Reproduction:**\n```typescript\nconst user = await createUser({ name: 'Test' });\nconst order = await createOrder({ userId: user.id });\nawait deleteUser(user.id); \u002F\u002F Throws error\n```\n\n**Root Cause:**\nMissing cascade delete on user->orders relationship\n```\n\n## Key Principles\n\n### 1. Reproduce Before Fixing\n\nNever try to fix without reproduction. You'll never know if you succeeded.\n\n### 2. Minimal is Better\n\nSmall reproduction is easier to understand and debug.\n\n### 3. Document the Conditions\n\nWhat specific thing triggers this? Clear conditions = clear fix.\n\n### 4. Shareable Reproduction\n\nIf you can't hand this to someone and have them reproduce it, it's not complete.\n\n### 5. Verify the Fix\n\nAfter fixing, run reproduction again. Should now pass.\n\n## Anti-Patterns\n\n### 1. \"It Works on My Machine\"\n\n```typescript\n\u002F\u002F BAD: Not helping\nconsole.log('Works on my machine');\n\n\u002F\u002F GOOD: Find the difference\n\u002F\u002F Check versions, environment, data\n\u002F\u002F \"Works on my machine because I have different data\"\n```\n\n### 2. Over-Complex Reproduction\n\n```typescript\n\u002F\u002F BAD: Reproduction is as complex as original\nconst bug = await reproduceBug({\n  users: await createUsers(100),\n  orders: await createOrders(1000),\n  products: await createProducts(500),\n  \u002F\u002F ... 50 more setup steps\n});\n\n\u002F\u002F GOOD: Minimal\nconst bug = await reproduceBug({\n  user: { id: 'test' },\n  order: { userId: 'test' },\n});\n```\n\n### 3. Non-Deterministic Reproduction\n\n```typescript\n\u002F\u002F BAD: Random behavior claimed as bug\n\u002F\u002F \"It happens sometimes randomly\"\n\n\u002F\u002F GOOD: Find the condition\n\u002F\u002F \"Bug happens when operation A completes before operation B\"\n\u002F\u002F \"With delay(100) between A and B, it happens 100%\"\n```\n\n## Relationship to Other Skills\n\n- `debug-session` — Uses reproduction as first step\n- `understand-error` — Error message guides reproduction\n- `trace-execution` — Traces how bug occurs\n- `debug-test` — Tests verify bug fix\n- `inspect-state` — State inspection for isolation\n","# Reproduce Bug — Systematic Bug Reproduction Framework\n\n## Overview\n\nReproduce-bug is a **behavioral specification skill** that encapsulates the methodology for **creating reliable, minimal bug reproduction cases that can be used for debugging, testing, and reporting**.\n\nThis skill embodies the discipline of developers who've spent hours on bugs they couldn't reproduce and know that a good reproduction case is half the debugging battle.\n\n## Core Philosophy\n\n### The Reproduction Principle\n\n> \"If you can't reproduce it, you can't fix it. If you can reproduce it reliably, you're already halfway to fixing it.\"\n\n### Reproduction Quality Spectrum\n\n```\n┌─────────────────────────────────────────────────────────────┐\n│                  REPRODUCTION QUALITY                          │\n│                                                               │\n│  UNRELIABLE:                RELIABLE:                         │\n│  ───────────                ─────────                         │\n│  \"It happens sometimes\"     \"Steps 1-2-3 always reproduce\"    │\n│  \"On my machine it works\"  \"Confirmed on clean environment\"  │\n│  \"After many clicks\"        \"First click reproduces\"         │\n│                                                               │\n│  Unreliable reproduction = Unreliable fix                   │\n│  Reliable reproduction = Fixable problem                     │\n└─────────────────────────────────────────────────────────────┘\n```\n\n## Decision Framework\n\n### Is This Reproducible?\n\n```markdown\n## Reproduction Assessment\n\n| Question | If NO | If YES |\n|----------|-------|--------|\n| Can you make it happen on demand? | Investigate conditions | You have reproduction |\n| Does it happen in clean environment? | Environment issue? | Proceed with fix |\n| Is it consistent? | Flaky test or race | Add to known issues |\n| Can you minimize it? | Reduce dependencies | Minimal case found |\n```\n\n### When Reproduction is Hard\n\n| Situation | Strategy |\n|-----------|----------|\n| Race condition | Add delays, repeat many times |\n| Timing dependent | Mock time, slow down execution |\n| Environment specific | Docker, VM, clean install |\n| Data dependent | Find minimal data trigger |\n| User interaction | Script the exact interaction |\n\n## Behavioral Specification\n\n### Phase 1: Gather Information\n\n#### 1.1 Initial Questions\n\n```markdown\n## Bug Report Template\n\n**What were you doing?**\n[Describe actions]\n\n**What happened?**\n[Describe error\u002Fbehavior]\n\n**What should happen?**\n[Describe expected]\n\n**How often does this happen?**\n- [ ] Always\n- [ ] Sometimes (1 in ___ times)\n- [ ] Only on specific data\n- [ ] Only in specific environment\n\n**What have you tried?**\n[Attempts to reproduce]\n```\n\n#### 1.2 Environment Snapshot\n\n```markdown\n## Environment Information\n\n| Item | Value |\n|------|-------|\n| Browser \u002F Version | Chrome 120 |\n| OS | macOS 14 |\n| Node version | 18.17.0 |\n| Branch | main |\n| Commit | abc1234 |\n| Date\u002FTime | 2024-04-17 10:30 UTC |\n```\n\n### Phase 2: Isolate the Variables\n\n#### 2.1 Variable Checklist\n\n```markdown\n## Isolation Variables\n\n□ User state (logged in? permissions?)\n□ Data state (specific record? any record?)\n□ Time state (after midnight? business hours?)\n□ Network state (slow? offline?)\n□ Browser state (cache? cookies?)\n□ Session state (new session? resumed?)\n□ Configuration (feature flags? env vars?)\n□ Dependencies (versions? recent updates?)\n```\n\n#### 2.2 Systematic Elimination\n\n```typescript\n\u002F\u002F Start with FULL conditions that cause bug\nconst conditions = {\n  userState: 'logged_in',\n  dataState: 'specific_user_123',\n  networkState: 'slow_3g',\n  timeState: 'after_midnight',\n  \u002F\u002F ... all conditions\n};\n\n\u002F\u002F ELIMINATE one at a time\n\u002F\u002F Does bug still happen without X?\n\n\u002F\u002F If yes → X was not the cause\n\u002F\u002F If no → X IS required for bug\n\n\u002F\u002F Continue until minimal set found\n```\n\n### Phase 3: Create Minimal Reproduction\n\n#### 3.1 Minimal Case Principles\n\n```typescript\n\u002F\u002F BAD: Reproduction with too much code\nasync function reproduce() {\n  \u002F\u002F 500 lines of setup\n  \u002F\u002F 10 dependencies\n  \u002F\u002F Complex state\n\n  \u002F\u002F Bug happens somewhere in there\n}\n\n\u002F\u002F GOOD: Minimal reproduction\nasync function reproduce() {\n  \u002F\u002F Only essential setup\n  \u002F\u002F Only what triggers bug\n  \u002F\u002F Clear, focused test\n\n  \u002F\u002F Bug is isolated and clear\n}\n```\n\n#### 3.2 Building Minimal Case\n\n```typescript\n\u002F\u002F STEP 1: Start with failing case\n\u002F\u002F Your current app state when bug occurs\n\n\u002F\u002F STEP 2: Remove non-essential parts\n\u002F\u002F Can you remove X and still reproduce?\n\u002F\u002F Remove Y?\n\n\u002F\u002F STEP 3: Reduce data to minimum\n\u002F\u002F Does user \"John Doe\" work? → No\n\u002F\u002F Does user { id: 1 } work? → No (smaller!)\n\u002F\u002F Does any user work? → Yes (minimal!)\n\n\u002F\u002F STEP 4: Isolate the function\n\u002F\u002F Call the function directly\n\u002F\u002F Remove event handlers, middleware\n\n\u002F\u002F RESULT: A minimal, focused reproduction\n```\n\n#### 3.3 The Minimal Test Template\n\n```typescript\n\u002F\u002F Minimal reproduction test\ndescribe('Bug Reproduction', () => {\n  it('should reproduce the issue', async () => {\n    \u002F\u002F MINIMAL SETUP: Only what you need\n\n    \u002F\u002F Step 1: Setup\n    const state = minimalState; \u002F\u002F As small as possible\n\n    \u002F\u002F Step 2: Action\n    const result = functionUnderTest(state);\n\n    \u002F\u002F Step 3: Verify bug\n    expect(result).toBe(expectedBuggyBehavior);\n  });\n});\n```\n\n### Phase 4: Verify Reproduction\n\n#### 4.1 Verification Checklist\n\n```markdown\n## Reproduction Verification\n\n□ Can you make it fail on demand?\n  └─ Run test 3 times, all fail\n\n□ Is it consistent?\n  └─ No randomness causes intermittent passes\n\n□ Is it isolated?\n  └─ No dependencies on other tests\n  └─ No shared state\n\n□ Is it minimal?\n  └─ Can't remove anything else\n  └─ All setup is essential\n\n□ Can others verify?\n  └─ Share reproduction steps\n  └─ Someone else runs it\n```\n\n#### 4.2 Creating a Reproduction Script\n\n```typescript\n\u002F\u002F repro-bug-123.ts\n\u002F\u002F Run with: npx ts-node repro-bug-123.ts\n\nasync function main() {\n  console.log('Starting reproduction...');\n\n  \u002F\u002F 1. Minimal setup\n  const testDb = await createTestDatabase();\n\n  \u002F\u002F 2. Specific seed data\n  await testDb.users.create({\n    id: 'user-minimal',\n    name: 'Test User',\n  });\n\n  \u002F\u002F 3. Execute\n  const result = await processUser('user-minimal');\n\n  \u002F\u002F 4. Observe\n  console.log('Result:', result);\n  console.log('Expected: BUG to occur');\n\n  \u002F\u002F 5. Exit with error if bug doesn't occur\n  if (result.status !== 'error') {\n    console.error('BUG NOT REPRODUCED!');\n    process.exit(1);\n  }\n\n  console.log('BUG REPRODUCED SUCCESSFULLY');\n}\n\nmain();\n```\n\n## Common Scenarios\n\n### Scenario 1: \"It only happens in production\"\n\n```markdown\n## Production-Only Issue Strategy\n\n1. GET PRODUCTION DATA\n   - Anonymize sensitive parts\n   - Create minimal reproduction\n\n2. GET PRODUCTION ENVIRONMENT\n   - Docker image\n   - Environment variables\n   - Version numbers\n\n3. REPRODUCE LOCALLY\n   docker run --env-from-file .env.production production-image\n   # Or: npm run start:production\n\n4. REDUCE\n   - Find minimal env vars needed\n   - Find minimal data needed\n   - Find minimal steps needed\n\n5. FIX AND VERIFY\n   - Apply fix locally\n   - Test against reproduction\n   - Deploy\n```\n\n### Scenario 2: \"Race condition - happens randomly\"\n\n```typescript\n\u002F\u002F Strategy: Force the race to happen\n\n\u002F\u002F 1. Add artificial delays\nawait delay(1); \u002F\u002F Slow down first operation\nawait delay(0); \u002F\u002F Speed up second operation\n\n\u002F\u002F 2. Run many times\nfor (let i = 0; i \u003C 100; i++) {\n  const result = raceCondition();\n  if (result.bug) {\n    console.log(`Reproduced on iteration ${i}`);\n    break;\n  }\n}\n\n\u002F\u002F 3. Find the timing window\n\u002F\u002F Once you know the window, you can reproduce reliably\n\n\u002F\u002F 4. Create minimal reproduction\n\u002F\u002F With fixed delay, bug always happens\n```\n\n### Scenario 3: \"Bug with specific data\"\n\n```typescript\n\u002F\u002F Strategy: Binary search on data\n\n\u002F\u002F Start: Full data that triggers bug\nconst fullData = { \u002F* 50 fields *\u002F };\n\n\u002F\u002F Binary search: Remove half\nconst half1 = { \u002F* 25 fields *\u002F }; \u002F\u002F Bug still happens\n\u002F\u002F → Bug is in first half\nconst quarter1 = { \u002F* 12 fields *\u002F }; \u002F\u002F Bug still happens\n\u002F\u002F → Continue...\n\n\u002F\u002F Continue until minimal\nconst minimalData = { fieldA: \"value\", fieldB: 123 }; \u002F\u002F Bug!\n\n\u002F\u002F Now you know: Only fieldA and fieldB matter\n```\n\n### Scenario 4: \"Can't find the trigger\"\n\n```markdown\n## When You Don't Know When It Happens\n\n1. ADD TELEMETRY\n   console.log('About to do X');\n   \u002F\u002F After each significant step\n\n2. CAPTURE STATE AT FAILURE\n   } catch (error) {\n     console.error('State at failure:', {\n       timestamp: new Date().toISOString(),\n       stack: error.stack,\n       relevantVariables: { ... }\n     });\n   }\n\n3. ANALYZE PATTERNS\n   - Same time each day?\n   - Same user actions?\n   - Same data?\n   - Same load?\n\n4. NARROW DOWN\n   - Start broad, narrow each hypothesis\n```\n\n## The Reproduction Report\n\n### Template\n\n```markdown\n## Bug Reproduction Report\n\n**Bug ID:** [Link to issue tracker]\n\n**Summary:** [One sentence description]\n\n**Environment:**\n- [OS, Browser, Node version]\n- [Branch, Commit]\n\n**Reproduction Rate:** [100% \u002F 50% \u002F 1 in 10]\n\n**Steps to Reproduce:**\n1. [Step 1]\n2. [Step 2]\n3. [Step 3]\n\n**Expected Behavior:**\n[What should happen]\n\n**Actual Behavior:**\n[What happens instead]\n\n**Minimal Reproduction:**\n[Code that reproduces the bug]\n\n**Root Cause (suspected):**\n[If known]\n```\n\n### Example\n\n```markdown\n## Bug Reproduction Report\n\n**Bug ID:** ISSUE-456\n\n**Summary:** User deletion fails when user has orders\n\n**Environment:**\n- macOS 14, Chrome 120, Node 18.17\n- main branch, commit abc1234\n\n**Reproduction Rate:** 100%\n\n**Steps to Reproduce:**\n1. Create user\n2. Create order for that user\n3. Attempt to delete user\n4. Error: \"Cannot delete user with orders\"\n\n**Expected Behavior:**\nUser should be deleted (or cascade delete)\n\n**Actual Behavior:**\nError thrown, user not deleted\n\n**Minimal Reproduction:**\n```typescript\nconst user = await createUser({ name: 'Test' });\nconst order = await createOrder({ userId: user.id });\nawait deleteUser(user.id); \u002F\u002F Throws error\n```\n\n**Root Cause:**\nMissing cascade delete on user->orders relationship\n```\n\n## Key Principles\n\n### 1. Reproduce Before Fixing\n\nNever try to fix without reproduction. You'll never know if you succeeded.\n\n### 2. Minimal is Better\n\nSmall reproduction is easier to understand and debug.\n\n### 3. Document the Conditions\n\nWhat specific thing triggers this? Clear conditions = clear fix.\n\n### 4. Shareable Reproduction\n\nIf you can't hand this to someone and have them reproduce it, it's not complete.\n\n### 5. Verify the Fix\n\nAfter fixing, run reproduction again. Should now pass.\n\n## Anti-Patterns\n\n### 1. \"It Works on My Machine\"\n\n```typescript\n\u002F\u002F BAD: Not helping\nconsole.log('Works on my machine');\n\n\u002F\u002F GOOD: Find the difference\n\u002F\u002F Check versions, environment, data\n\u002F\u002F \"Works on my machine because I have different data\"\n```\n\n### 2. Over-Complex Reproduction\n\n```typescript\n\u002F\u002F BAD: Reproduction is as complex as original\nconst bug = await reproduceBug({\n  users: await createUsers(100),\n  orders: await createOrders(1000),\n  products: await createProducts(500),\n  \u002F\u002F ... 50 more setup steps\n});\n\n\u002F\u002F GOOD: Minimal\nconst bug = await reproduceBug({\n  user: { id: 'test' },\n  order: { userId: 'test' },\n});\n```\n\n### 3. Non-Deterministic Reproduction\n\n```typescript\n\u002F\u002F BAD: Random behavior claimed as bug\n\u002F\u002F \"It happens sometimes randomly\"\n\n\u002F\u002F GOOD: Find the condition\n\u002F\u002F \"Bug happens when operation A completes before operation B\"\n\u002F\u002F \"With delay(100) between A and B, it happens 100%\"\n```\n\n## Relationship to Other Skills\n\n- `debug-session` — Uses reproduction as first step\n- `understand-error` — Error message guides reproduction\n- `trace-execution` — Traces how bug occurs\n- `debug-test` — Tests verify bug fix\n- `inspect-state` — State inspection for isolation\n",{"name":5,"category":37,"priority":47,"description":7,"trigger_patterns":48},"P2",[24,49,50,34,51,52],"can't reproduce","minimal case","isolating the bug","reproduction steps","main","b9a52d8e27455bdad953d64928696d028223ea1b","skills\u002Fcoding\u002Freproduce-bug","https:\u002F\u002Fgithub.com\u002FImaginerLabs\u002Fskill-manager","https:\u002F\u002Fgithub.com\u002FImaginerLabs","2026-04-18 16:27:13",{"source":8,"skillName":5,"commands":60,"prompt":70,"zipAvailable":71},[61,64,67],{"tool":62,"command":63},"npx","npx skills add ImaginerLabs\u002Fskill-manager --skill reproduce-bug",{"tool":65,"command":66},"bunx","bunx skills add ImaginerLabs\u002Fskill-manager --skill reproduce-bug",{"tool":68,"command":69},"pnpm","pnpm dlx skills add ImaginerLabs\u002Fskill-manager --skill reproduce-bug","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FImaginerLabs\u002Fskill-manager\u002Fblob\u002Fmain\u002Fskills\u002Fcoding\u002Freproduce-bug\u002FSKILL.md",true,[],[74,105,126,154,190,216],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":86,"publishedAt":42},"01M6QJCB2SD5KHC41ZDQC0GA1T","meeting-minutes","Generate concise, actionable meeting minutes for internal meetings. Includes metadata, attendees, agenda, decisions, action items (owner + due date), and follow-up steps.","https:\u002F\u002Fgithub.com\u002FImaginerLabs\u002Fskill-manager\u002Fblob\u002Fmain\u002Fskills\u002Fwriting\u002Fmeeting-minutes\u002FSKILL.md",[80,85],{"categoryNo":81,"categoryName":82,"taxonomyType":83,"taxonomyTypeDesc":84},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},[87,88,89,90,91,92,93,94,95,96,76,53,97,98,99,100,101,102,103,104],"meeting minutes","meeting","minutes","writing","github","copilot","generate","decisions","meetings","up","agenda","actionable","concise","follow-up","tree","true","action","for",{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":109,"categories":110,"keywords":111,"publishedAt":42},"01M6QJC71RRGTGNNFEHJG6S20G","documentation-writer","Diátaxis Documentation Expert. An expert technical writer specializing in creating high-quality software documentation, guided by the principles and structure of the Diátaxis technical documentation authoring framework.","https:\u002F\u002Fgithub.com\u002FImaginerLabs\u002Fskill-manager\u002Fblob\u002Fmain\u002Fskills\u002Fwriting\u002Fdocumentation-writer\u002FSKILL.md",[],[112,113,114,90,91,92,115,116,117,118,119,120,53,121,122,123,124,101,102,125],"documentation","documentation writer","writer","https","quality","technical","technical writer","expert","documentation expert","structure","authoring","software","principles","high",{"skillNo":127,"name":128,"nameZh":6,"description":129,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":130,"categories":131,"keywords":139,"publishedAt":42},"01M6QJC0V3C7C4R9768J1AJYWY","doc-coauthoring","Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision docs, or similar structured content. This workflow helps users efficiently transfer context, refine content through iteration, and verify the doc works for readers. Trigger when user mentions writing docs, creating proposals, drafting specs, or similar documentation tasks.","https:\u002F\u002Fgithub.com\u002FImaginerLabs\u002Fskill-manager\u002Fblob\u002Fmain\u002Fskills\u002Fwriting\u002Fdoc-coauthoring\u002FSKILL.md",[132,135,136],{"categoryNo":133,"categoryName":134,"taxonomyType":83,"taxonomyTypeDesc":84},"01JBSEEDCAT000000000000018","写作与文案",{"categoryNo":81,"categoryName":82,"taxonomyType":83,"taxonomyTypeDesc":84},{"categoryNo":137,"categoryName":138,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000036","内容创作者",[140,141,90,142,143,112,144,145,146,147,148,149,53,150,151,122,152,153,101,104],"doc coauthoring","doc","workflow","official","tasks","decision","write","context","proposals","guide","refine","iteration","trigger","co",{"skillNo":155,"name":156,"nameZh":6,"description":157,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":158,"categories":159,"keywords":170,"publishedAt":42},"01M6QJBJ0YPVEWGEXZH3PJRRTT","code-review-workflow","Executes comprehensive 4-phase code review: basic review, quality check, bundle analysis, and test coverage. Should be used when the user mentions comprehensive code review, checking code quality, or reviewing staged changes with multi-phase analysis. This is the comprehensive review workflow, distinct from focused skills like frontend-code-review, staged-code-review, or code-change-test-designer.","https:\u002F\u002Fgithub.com\u002FImaginerLabs\u002Fskill-manager\u002Fblob\u002Fmain\u002Fskills\u002Ftesting\u002Fcode-review-workflow\u002FSKILL.md",[160,163,166,167],{"categoryNo":161,"categoryName":162,"taxonomyType":83,"taxonomyTypeDesc":84},"01JBSEEDCAT000000000000007","代码审查",{"categoryNo":164,"categoryName":165,"taxonomyType":83,"taxonomyTypeDesc":84},"01JBSEEDCAT000000000000008","测试与质量",{"categoryNo":81,"categoryName":82,"taxonomyType":83,"taxonomyTypeDesc":84},{"categoryNo":168,"categoryName":169,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000030","开发工程师",[171,172,142,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189],"code review","review","code","code review workflow","testing","frontend","test","change","code quality","code-review","analysis","check","coverage","quality check","basic","multi","comprehensive code review","with","phase",{"skillNo":191,"name":192,"nameZh":6,"description":193,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":194,"categories":195,"keywords":205,"publishedAt":42},"01M6QJB7XNHV3VEEQF4W7FMWF6","code-change-test-designer","Analyzes code changes and designs comprehensive test cases. Reads diffs, summarizes capability changes, and designs test cases covering main flows and edge cases. Should be used when the user mentions test coverage, designing tests for code changes, or analyzing diff\u002Fcommit for testing purposes. Distinguished from code-review-workflow which provides comprehensive review, this skill focuses on test case design for code changes.","https:\u002F\u002Fgithub.com\u002FImaginerLabs\u002Fskill-manager\u002Fblob\u002Fmain\u002Fskills\u002Ftesting\u002Fcode-change-test-designer\u002FSKILL.md",[196,197,200,201,202],{"categoryNo":164,"categoryName":165,"taxonomyType":83,"taxonomyTypeDesc":84},{"categoryNo":198,"categoryName":199,"taxonomyType":83,"taxonomyTypeDesc":84},"01JBSEEDCAT000000000000015","视觉设计",{"categoryNo":81,"categoryName":82,"taxonomyType":83,"taxonomyTypeDesc":84},{"categoryNo":168,"categoryName":169,"taxonomyType":20,"taxonomyTypeDesc":21},{"categoryNo":203,"categoryName":204,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000032","设计师",[177,178,173,206,207,175,208,209,142,210,180,211,183,212,53,213,214,215,104,189],"designer","code change test designer","design","diffs","commit","edge","diff","tests","flows","which",{"skillNo":217,"name":218,"nameZh":6,"description":219,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":220,"categories":221,"keywords":223,"publishedAt":42},"01M6QJB195WD7DCJWDMKWKB29S","skill-creator","Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.","https:\u002F\u002Fgithub.com\u002FImaginerLabs\u002Fskill-manager\u002Fblob\u002Fmain\u002Fskills\u002Fmeta-skills\u002Fskill-creator\u002FSKILL.md",[222],{"categoryNo":81,"categoryName":82,"taxonomyType":83,"taxonomyTypeDesc":84},[224,225,226,227,143,228,229,230,231,232,181,233,234,235,53,236,237,101,104,218],"skill creator","creator","performance","run evals","variance analysis","create","run","benchmark","Meta","improve","edit","evals","optimize","existing skill"]