AgentSkillsCN

health-analyzer

健康分析器

SKILL.md
--- frontmatter
name: health-analyzer
triggers:
  - "health check"
  - "component health"
  - "analyze plugin health"
  - "suitability analysis"
  - "component quality"
  - "plugin health"

Health Analyzer Skill

This skill provides criteria and metrics for analyzing the health and suitability of Claude Code plugin components.

When to Use

Use this skill when you need to:

  • Assess the overall health of plugin components
  • Determine if components are suitable for their purpose
  • Get a quality score for skills, agents, commands, or hooks
  • Identify issues beyond basic schema validation

Health Criteria by Component Type

Skills

CheckPass CriteriaWeight
Locationskills/<name>/SKILL.md10%
YAML validFrontmatter parses without error10%
name fieldPresent, kebab-case10%
triggers fieldArray with 2+ trigger phrases10%
Content length200+ characters15%
SectionsHas usage/examples15%
DocumentationClear purpose statement15%
ReferencesFiles referenced exist15%

Agents

CheckPass CriteriaWeight
Locationagents/<name>.md (not subdirectory)10%
YAML validFrontmatter parses without error10%
name fieldPresent, kebab-case10%
description field20+ characters, starts with "Use this agent when"15%
tools fieldArray of valid tool names10%
System prompt100+ characters, actionable instructions20%
Output formatDefined output structure15%
Important notesSafety/behavior guidelines10%

Commands

CheckPass CriteriaWeight
Locationcommands/<name>.md (not subdirectory)10%
YAML validFrontmatter parses without error10%
name fieldPresent, kebab-case10%
description fieldPresent, meaningful10%
allowed-toolsUses kebab-case (not allowed_tools)10%
Usage sectionCode block with examples15%
Examples2+ usage examples15%
What HappensClear explanation of behavior10%
Related sectionLinks to related commands10%

Hooks

CheckPass CriteriaWeight
hooks.json validValid JSON syntax15%
StructureObject with event keys (not array)15%
Event namesValid: PreToolUse, PostToolUse, Stop, etc.10%
Nested hooksEach entry has hooks array15%
Type field"type": "command" present10%
Script pathUses ${CLAUDE_PLUGIN_ROOT}10%
Script existsReferenced Python files exist15%
Python validScripts have valid syntax10%

Suitability Criteria

Component Type Appropriateness

If the component...It should be a...
Provides reference knowledge or guidanceSkill
Performs autonomous multi-step tasksAgent
Is user-invoked with specific argumentsCommand
Reacts to system events automaticallyHook

Suitability Indicators

High suitability:

  • Clear, focused purpose
  • Name reflects functionality
  • Appropriate component type for the task
  • Integrates well with existing components
  • Documentation matches behavior

Low suitability:

  • Vague or overly broad purpose
  • Misleading name
  • Wrong component type for the task
  • Duplicates existing functionality
  • Missing or inaccurate documentation

Scoring Framework

Score Calculation

code
Health Score = (Structure * 0.30) + (Content * 0.30) + (References * 0.20) + (Suitability * 0.20)

Grade Thresholds

ScoreGradeMeaning
90-100AExcellent - Production ready
80-89BGood - Minor improvements possible
70-79CAcceptable - Should address issues
60-69DNeeds work - Multiple issues
< 60FCritical - Requires significant fixes

Common Issues Reference

IssueComponentFix
allowed_tools (underscore)CommandUse allowed-tools (kebab-case)
Agent in subdirectoryAgentMove to agents/name.md
Skill as direct fileSkillMove to skills/name/SKILL.md
hooks as arrayHookUse object: "hooks": { "Event": [...] }
Missing type: commandHookAdd "type": "command" in hook entry
Hardcoded pathsHookUse ${CLAUDE_PLUGIN_ROOT}
Tools as stringAgentUse array: tools: [Read, Grep]
Missing descriptionAgent/CommandAdd meaningful description field

Output Format

When performing health analysis, report results as:

code
HEALTH_ANALYSIS_REPORT
======================

SUMMARY:
- total_components: <count>
- overall_health_score: <0-100>
- overall_grade: <A-F>

COMPONENT_DETAILS:

Component: <name>
Type: <skill|agent|command|hook>
Health Score: <0-100> (<grade>)

Structure: [PASS|FAIL] <details>
Content: [PASS|FAIL|WARN] <details>
References: [PASS|FAIL] <details>
Suitability: <appropriate|questionable|inappropriate>

Issues:
- <issue 1>
- <issue 2>

Recommendations:
- <recommendation 1>
- <recommendation 2>

Related

  • /assist:verify - Schema-focused validation (structural checks only)
  • /assist:health-check - On-demand health analysis command
  • health-analyzer agent - Autonomous health analysis