Thank you for helping make Claude Code setups healthier! 🩺
The easiest way to contribute is to add a new diagnostic check.
Create a new file in src/checks/:
import { DiagnosticResult, CheckModule } from '../types';
async function checkSomething(projectPath: string): Promise<DiagnosticResult> {
// Your check logic here
return {
id: 'category-check-name', // Unique ID
label: 'Human-readable label', // Shown in output
status: 'pass', // pass | fail | warn | skip
severity: 'success', // success | error | warning | info
message: 'Description of result',
suggestions: ['How to fix if not pass'],
autoFixable: false, // Set true if fix() is provided
fix: async () => { // Optional auto-fix function
// Repair logic
return true;
},
};
}
const myCheck: CheckModule = {
category: {
id: 'my-category',
name: 'My Category',
icon: '🔍',
description: 'What this category checks',
},
async run(projectPath) {
return [await checkSomething(projectPath)];
},
};
export default myCheck;Add your check to src/checks/index.ts:
export { default as myCheck } from './my-check';And add it to the ALL_CHECKS array in src/doctor.ts.
npm run build
node bin/cli.js --only my-categorygit clone https://github.com/Mishit18/claude-code-doctor.git
cd claude-code-doctor
npm install
npm run build
node bin/cli.js- TypeScript strict mode
- No
anytypes (useunknowninstead) - Functions should be focused and well-documented
- Every check must have a unique
id - Every non-pass result should have
suggestions
- One check per PR (unless they're closely related)
- Include a description of what the check detects and why it matters
- Test on all platforms if possible (Windows, macOS, Linux)
- Update the README if adding a new category
Found a false positive or missing check? Open an issue with:
- Your OS and Node.js version
- Claude Code version
- The output of
claude-doctor --format json