Creates minimal, reliable bug reproduction cases by isolating variables, identifying triggers, and building standalone repro scripts.
Ships in debug-detective. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Create minimal, reliable reproduction cases for bugs.
A minimal reproduction (repro) is:
## Bug Symptom
**What I expected:**
When I click "Submit", the form should save and show a success message.
**What actually happened:**
The page refreshes but nothing is saved. No error in UI.
**Error in console (if any):**
TypeError: Cannot read properties of undefined (reading 'id') at saveForm (form.js:45)
Ask these questions:
## Trigger Conditions
**Always happens when:**
- [ ] Form field "email" is empty
- [ ] User is not logged in
- [ ] Data was previously saved
**Sometimes happens when:**
- [ ] Network is slow
- [ ] Multiple tabs open
- [ ] After being idle for a while
**Never happens when:**
- [ ] All fields filled
- [ ] Fresh browser session
Remove things one at a time until you find the minimum needed.
// Original code with bug
async function saveForm(data: FormData) {
const validated = await validateForm(data);
const enriched = await enrichWithUserData(validated);
const formatted = formatForAPI(enriched);
const response = await api.post('/forms', formatted);
await updateLocalCache(response);
showSuccessMessage();
analytics.track('form_saved');
return response;
}
// Isolated - which step fails?
async function saveFormDebug(data: FormData) {
console.log('1. Input:', data);
const validated = await validateForm(data);
console.log('2. Validated:', validated);
const enriched = await enrichWithUserData(validated);
console.log('3. Enriched:', enriched); // Bug here: enriched.user is undefined
const formatted = formatForAPI(enriched);
console.log('4. Formatted:', formatted);
// ... rest
}
// Minimal reproduction
// Run with: npx ts-node repro.ts
interface User {
id: string;
name: string;
}
interface FormData {
user?: User;
email: string;
}
function formatForAPI(data: FormData) {
// BUG: Crashes when user is undefined
return {
userId: data.user.id, // <- TypeError here
email: data.email
};
}
// Reproduction case
const buggyData: FormData = {
email: '[email protected]'
// user is undefined
};
formatForAPI(buggyData); // Throws!
## Bug Report
**Environment:**
- Node.js: v20.x
- Package: [email protected]
- OS: macOS 14
**Minimal Reproduction:**
```javascript
// Save as repro.js and run: node repro.js
const { buggyFunction } = require('example-lib');
// This should work but throws
const result = buggyFunction({
input: 'valid input',
options: { flag: true }
});
console.log(result);
Expected: Returns processed result Actual: Throws TypeError
Steps:
### For React
```jsx
// CodeSandbox/StackBlitz link preferred
// Or minimal component:
import { useState } from 'react';
import { BuggyComponent } from 'library';
export default function Repro() {
const [data, setData] = useState(null);
// Bug: Component crashes when data is null
return (
<div>
<button onClick={() => setData({ value: 1 })}>
Load Data
</button>
{/* Crashes before clicking button */}
<BuggyComponent data={data} />
</div>
);
}
# Minimal curl reproduction
curl -X POST https://api.example.com/endpoint \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-d '{
"field": "value",
"nested": {
"trigger": true
}
}'
# Expected: 200 OK with response
# Actual: 500 Internal Server Error
-- Reproduction schema
CREATE TABLE repro_users (
id SERIAL PRIMARY KEY,
email VARCHAR(255),
created_at TIMESTAMP DEFAULT NOW()
);
-- Sample data that triggers bug
INSERT INTO repro_users (email) VALUES
('[email protected]'),
(NULL), -- This row triggers the bug
('[email protected]');
-- Query that fails
SELECT * FROM repro_users
WHERE email LIKE '%@%'; -- Fails on NULL row
For bugs that don't happen every time:
// Stress test reproduction
async function reproduceRaceCondition() {
let failures = 0;
const attempts = 1000;
for (let i = 0; i < attempts; i++) {
try {
await buggyAsyncOperation();
} catch (error) {
failures++;
console.log(`Failed on attempt ${i}:`, error.message);
}
}
console.log(`Failed ${failures}/${attempts} times (${(failures/attempts*100).toFixed(1)}%)`);
}
reproduceRaceCondition();
// From reproduction
function formatForAPI(data: FormData) {
return { userId: data.user.id }; // Bug
}
const buggyData = { email: '[email protected]' };
formatForAPI(buggyData); // Throws
// To test
describe('formatForAPI', () => {
it('handles missing user gracefully', () => {
const data = { email: '[email protected]' };
// Current behavior (bug)
expect(() => formatForAPI(data)).toThrow();
// After fix, should be:
// expect(formatForAPI(data)).toEqual({ userId: null, email: '[email protected]' });
});
});
Help me create a minimal reproduction for this bug:
**Symptoms:**
[Describe what's happening]
**Error:**
[Paste error message/stack trace]
**Code involved:**
[Paste relevant code]
Please:
1. Identify the minimum code needed
2. Create a standalone repro file
3. Suggest what data triggers the bug
4. Explain why the bug occurs
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/debug-detective:reproduction-builderfrom debug-detective
npx claudepluginhub latestaiagents/agent-skills --plugin debug-detective6 skills in this plugin
/dependency-conflict-resolverUse this skill when resolving dependency conflicts. Activate when the user has package version conflicts,
npm/yarn/pnpm install failures, peer dependency warnings, duplicate packages, or module resolution errors.
/error-pattern-analyzerUse this skill when analyzing error patterns in applications. Activate when the user has recurring errors,
wants to find root causes of issues, needs to identify systemic problems, is analyzing error logs,
or wants to categorize and prioritize bugs.
/log-forensicsUse this skill when investigating issues through logs. Activate when the user needs to analyze log files,
search for specific events in logs, correlate logs across services, investigate incidents through logs,
or extract insights from application logs.
4 plugins in one repository ship this exact skill · first indexed Aug 19, 2026
Other plugins' skills for the same job