Sandbox
@marian2js/skill-doctor

Skill checker for agent skill packages

Skill Doctor walks a single skill folder or a workspace, finds each `SKILL.md`, and runs static checks over metadata, bundle integrity, trigger quality, instruction quality, and eval hygiene. It then returns a score and findings, with text or JSON output from the CLI and a score output for GitHub Actions.

32 stars3 forksTypeScriptUpdated 6mo ago
Who it's for

Builders who create skill packs for Claude Code or other coding agents and want them reviewed before use.

What it delivers

You can catch weak skill metadata, broken references, and bad eval files before they confuse an agent.

What it does

Score skill quality

Assigns each skill a 0-100 score with labels and findings.

Check metadata and frontmatter

Validates YAML frontmatter, required fields, and common skill conventions.

Find broken bundle references

Detects bad local links, escaped paths, empty helper files, and missing resources.

Review trigger and instruction quality

Flags descriptions that do not clearly say when a skill should trigger and whether the body gives enough workflow guidance.

Validate evals files

Checks `evals/evals.json` for schema shape, duplicate IDs, missing inputs, and mismatched skill names.

Run in CLI or GitHub Actions

Supports command-line use, JSON output, and a workflow action that can fail on warnings or errors.

How to get it

  1. 1Run this at the root of a skill or skill workspace
    npx -y skill-doctor@latest .
  2. 2Show affected files and line numbers
    npx -y skill-doctor@latest . --verbose
  3. 3Get just the numeric score
    npx -y skill-doctor@latest . --score
  4. 4Machine-readable output
    npx -y skill-doctor@latest . --format json

README

Skill DoctorSkill Doctor

CI license

Let coding agents diagnose agent skills before they break routing, onboarding, or evals.

skill-doctor scans local skill packages for frontmatter issues, broken resource references, weak trigger descriptions, missing workflow guidance, and malformed evals/evals.json, then turns the result into a 0-100 score with actionable findings.

How it works

skill-doctor walks a single skill root or a whole workspace, discovers every SKILL.md, and runs a static analysis pass over:

  1. Spec and metadata: frontmatter presence, YAML validity, name, description, and basic compatibility with common skill conventions.
  2. Bundle integrity: broken local links, references that escape the skill root, empty helper files, and missing resource files.
  3. Trigger quality: whether the description clearly says what the skill does and when it should trigger.
  4. Instruction quality: whether the body provides enough workflow or usage guidance to be actionable.
  5. Eval hygiene: optional validation for evals/evals.json, including schema shape, duplicate IDs, missing input files, and mismatched skill names.

The scoring model is intentionally conservative in default mode. Strong real-world skills should score cleanly or near-cleanly. Stricter guidance is available through --strictness strict and --strictness pedantic.

Install

Run this at the root of a skill or skill workspace:

npx -y skill-doctor@latest .

Show affected files and line numbers:

npx -y skill-doctor@latest . --verbose

Get just the numeric score:

npx -y skill-doctor@latest . --score

Machine-readable output:

npx -y skill-doctor@latest . --format json

Example output

skill doctor                                        99 excellent
static diagnostics for agent skills
metadata • bundle integrity • trigger quality • eval hygiene

17 skills scanned • 15 healthy • 0 errors • 2 warnings • 28ms
████████████████████████

workspace overview
name                   score   findings
theme-factory           94   1 warn
webapp-testing          94   1 warn
algorithmic-art        100   clean

GitHub Actions

- uses: actions/checkout@v5
- uses: marian2js/skill-doctor@main
  with:
    directory: .
    strictness: default
    fail-on: error
InputDefaultDescription
directory.Skill directory or workspace to scan
verbosetrueShow file details per finding
fail-onerrorExit with error code on error, warning, or none
strictnessdefaultAnalysis strictness: default, strict, pedantic
node-version20Node.js version to use

The action outputs a score value you can use in later workflow steps.

Options

Usage: skill-doctor [directory] [options]

Options:
  -v, --version              display the version number
  --format <format>          output format: text or json
  --fail-on <level>          exit with error code on diagnostics: error, warning, none
  --strictness <level>       analysis strictness: default, strict, pedantic
  --verbose                  show file details per rule
  --score                    output only the score
  -h, --help                 display help for command

Node.js API

You can also use skill-doctor programmatically:

import { diagnose } from "skill-doctor";

const result = await diagnose("/path/to/skills");

console.log(result.score); // { score: 99, label: "Excellent" }
console.log(result.skills); // per-skill breakdown
console.log(result.diagnostics); // flattened findings across the workspace

Calibration

The analyzer was designed with a mix of sources:

The default heuristics were calibrated against Anthropic's public skill corpus so high-quality skills do not get buried in noisy style warnings.

Development

pnpm install
pnpm build
pnpm test
pnpm typecheck
pnpm lint

Run the CLI locally:

node packages/skill-doctor/dist/cli.js /path/to/skills

More contribution details live in CONTRIBUTING.md.

License

MIT, see LICENSE.

Files in the repo

Repository payload12 top-level entries
  • .github
  • assets
  • packages
  • .gitignore
  • action.yml
  • CONTRIBUTING.md
  • LICENSE
  • package.json
  • pnpm-lock.yaml
  • pnpm-workspace.yaml
  • README.md
  • tsconfig.json

Discussion (0)

Ask about usage, or say what you built with it

Sign in to join the discussion.

No comments yet. Be the first to say what this is good for.

More tools

JuliusBrussee/
caveman

🪨 why use many token when few token do trick — Claude Code skill that cuts 65% of tokens by talking like caveman

105k
1 add
MemPalace/
mempalace

The best-benchmarked open-source AI memory system. And it's free.

59k
stablyai/
orca

Orca is the ADE for working with a fleet of parallel agents. Run any coding agent with your own subscription. Available on desktop, mobile and remote runtime.

66k

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

132k

Never stop coding. Free MIT AI gateway: one endpoint, 352 providers (150+ free), 1200+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 550+ contributors

64k
headroomlabs-ai/
headroom

Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.

71k