---
name: skill-check
description: Use when the user wants to validate, lint, or audit agent skill files (SKILL.md). Use when they say "validate these skills," "check this repo's skills," "lint SKILL.md files," or "audit skills in [repo URL]." Run skill-check locally or against a cloned GitHub repo and summarize findings.
title: skill-check
canonical_url: https://skilld.dev/gh/thedaviddias/skill-check/skill-check
last_updated: 2026-10-20T01:01:26.000Z
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> If the user asked to install this Skill, run `npx skilld install thedaviddias/skill-check/skill-check`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/skill-check`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/thedaviddias/skill-check/skill-check) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/skill-check`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/skill-check --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/skill-check --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

# skill-check

Validate agent skill files (SKILL.md) using the skill-check tool. Support both local paths and GitHub repos.

## Installation

Ensure skill-check is available before running checks:

- **No install (recommended for one-off or agent use):** `npx skill-check` — uses npm to run the latest version; requires Node.js and network on first run.
- **Global install (curl):** `curl -fsSL https://raw.githubusercontent.com/thedaviddias/skill-check/main/scripts/install.sh | bash` — installs a global `skill-check` binary.
- **Homebrew:** `brew tap thedaviddias/skill-check https://github.com/thedaviddias/skill-check` then `brew install skill-check`.

If the user has not installed skill-check, use `npx skill-check` so no prior install is needed. To confirm the tool is available, run `npx skill-check rules` and expect a list of built-in rule IDs.

## When to use

- User asks to validate, lint, or check skill files
- User provides a local path (e.g. `~/.cursor/skills`, `./skills`, or a repo root)
- User provides a GitHub repo URL and wants skills in that repo validated

## Local validation

1. Run skill-check against the given path:
   - Quick lint only: `npx skill-check check <path> --no-security-scan --format json`
   - Full check (includes security scan): `npx skill-check check <path> --format json`
2. Parse the JSON output to get diagnostics (ruleId, severity, message, file, line).
3. Summarize results for the user: number of skills found, errors vs warnings, and any suggested fixes.

Use `--format json` when you need to parse output programmatically. Use default text format when showing output directly to the user.

## GitHub repo validation

1. Clone the repo shallowly into a temp directory, e.g. `git clone --depth 1 <url> /tmp/skill-check-<short-hash>` (or use a system temp path).
2. Run `npx skill-check check /tmp/skill-check-<hash>` (with `--format json` if you will parse results).
3. Report findings to the user.
4. Remove the temp directory when done.

## Commands reference

- `npx skill-check check [path]` — run validation (+ optional security scan). Default path is `.`
- `npx skill-check check [path] --no-security-scan` — lint only, skip security scan
- `npx skill-check check [path] --format json` — machine-readable output with quality scores
- `npx skill-check check [path] --format github` — GitHub Actions `::error` / `::warning` annotations
- `npx skill-check check [path] --format html --no-open` — self-contained HTML report
- `npx skill-check check [path] --fix` — auto-fix supported findings
- `npx skill-check check [path] --fix --interactive` — prompt before each fix (TTY only)
- `npx skill-check check [path] --baseline baseline.json` — compare against previous run
- `npx skill-check new <name>` — scaffold a new skill directory
- `npx skill-check watch [path]` — re-run on file changes
- `npx skill-check diff <pathA> <pathB>` — compare diagnostics between two directories
- `npx skill-check rules` — list all built-in rules with severity and fixable status
- `npx skill-check rules <id>` — show detail for a specific rule
- `npx skill-check report [path]` — generate a markdown health report

## Interpreting results

- **error** — spec or rule violation; should be fixed.
- **warn** — recommendation; may be acceptable depending on context.
- **suggestion** — every diagnostic includes an actionable suggestion text.
- **quality score** — 0-100 per skill, weighted across frontmatter (30%), description (30%), body (20%), links (10%), file (10%).
- **duplicates** — `duplicates.name` / `duplicates.description` warnings when multiple skills share the same name or description.
- Exit code 0 means no errors; non-zero means validation failed or security scan found issues.

## Testing this skill

To verify this skill and the skill-check CLI work:

1. **Check CLI is available:** Run `npx skill-check rules`. You should see a list of built-in rules (e.g. `frontmatter.required`, `body.max_tokens`, etc.).
2. **Validate this repo's skills:** From the skill-check repo root, run `npx skill-check check skills/ --no-security-scan`. Expect one skill (`skills/skill-check/SKILL.md`) and zero diagnostics (PASS).
3. **Scaffold a test skill:** Run `npx skill-check new test-skill --dir /tmp`. Verify `/tmp/test-skill/SKILL.md` was created, then `npx skill-check check /tmp/test-skill --no-security-scan` should pass.
4. **Optional — validate with security scan:** Run `npx skill-check check skills/` (no `--no-security-scan`). Requires `mcp-scan` or `uv`/`pipx` for the security scan step.
