mcpbeat

Code Health Check

huangjia2019/code-health-check

Perform a comprehensive code health check on a directory. Use when the user asks to analyze code quality, find issues, or get a health report.

488 tokens
context cost
the whole folder, loaded on every use
1
files
instructions only
0
copies elsewhere
how many repositories repackaged it
1038
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/huangjia2019/claude-code-engineering --skill code-health-check

The instruction itself

9 sections, as written by the author

Code Health Check

Analyze the codebase at $ARGUMENTS and produce a structured health report.

Checks to Perform

1. File Organization

  • Are files reasonably sized? (Flag files > 200 lines)
  • Is the directory structure logical?
  • Any files that look misplaced?

2. Error Handling

  • Are async operations wrapped in try/catch?
  • Are errors propagated correctly (not swallowed)?
  • Is there a global error handler?

3. Security Basics

  • Any hardcoded secrets, API keys, or passwords?
  • Any use of eval() or similar dangerous functions?
  • Are user inputs validated before use?

4. Code Quality

  • Any obvious code duplication (similar blocks in multiple files)?
  • Any unused variables or imports?
  • Are function signatures reasonable (not too many parameters)?

5. Dependency Hygiene

  • Are all imported modules actually used?
  • Any circular dependencies?

Severity Levels

Use these to categorize issues:

| Severity | Meaning | Example |

|----------|---------|---------|

| CRITICAL | Must fix immediately | Hardcoded secrets, SQL injection |

| WARNING | Should fix soon | Missing error handling, large files |

| INFO | Nice to improve | Minor duplication, naming conventions |

Output Format

Return a structured report in this exact format:

# Code Health Report: {directory}

## Overall Score: {A/B/C/D/F}

## Summary
- Files analyzed: {count}
- Issues found: {critical} critical, {warning} warnings, {info} info

## Critical Issues
{list each with file:line and description}

## Warnings
{list each with file:line and description}

## Info
{list each with file:line and description}

## Recommendations
{top 3 actionable recommendations}

How to use it

Copy the folder

Take huangjia2019/code-health-check from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.