Skip to content

/validate-skills

Validates Claude Code skills for schema, naming, documentation, and security. Use when user asks to "check my skill", "validate skill syntax", "why isn't my skill loading", "skill errors", or "dangerous command detected". Validates SKILL.md frontmatter, allowed-tools, file

From plugin
claudelint
149 skills13 agents1 command1 hook

Claude Code

$ npx -y skills add pdugan20/claudelint --skill validate-skills --agent claude-code

SKILL.md

validate-skills.SKILL.md
name: validate-skills
description: Validates Claude Code skills for schema, naming, documentation, and security. Use when user asks to "check my skill", "validate skill syntax", "why isn't my skill loading", "skill errors", or "dangerous command detected". Validates SKILL.md frontmatter, allowed-tools, file references, directory organization, and shell script security.
version: 1.0.0
argument-hint: "[flags]"
allowed-tools:
  - Bash(claudelint:*)
  - Read

Validate Claude Code Skills

Runs `claudelint validate-skills` to validate Claude Code skill directories.

Usage

claudelint validate-skills $ARGUMENTS

Options

  • `--path <path>` - Custom path to skills directory
  • `--skill <name>` - Validate specific skill
  • `--verbose` - Show detailed output
  • `--warnings-as-errors` - Treat warnings as errors

Examples

Example 1: Skill appears in slash menu but won't execute

**User says**: "I see my skill /deploy-app in the menu but when I run it, Claude says it can't find it" **What happens**:

1. Checks directory name is `deploy-app/` but SKILL.md has `name: deployApp` 2. Shows mismatch: directory uses kebab-case, frontmatter uses camelCase 3. Explains skill names must match directory name exactly 4. Shows fix: change frontmatter to `name: deploy-app`

**Result**: Skill executes correctly after fixing name mismatch

Example 2: Claude won't use Bash tool even though it's needed

**User says**: "My skill script.sh needs to run bash commands but Claude says 'Tool Bash not allowed'" **What happens**:

1. Checks SKILL.md frontmatter has `allowed-tools: ["bash", "read"]` 2. Shows tool names are case-sensitive - found lowercase "bash" instead of "Bash" 3. Lists all valid tool names with correct capitalization 4. Shows fix: `allowed-tools: ["Bash", "Read"]`

**Result**: Claude can now execute bash commands in the skill

Example 3: Skill validation blocks git commit with "dangerous command"

**User says**: "Pre-commit hook is failing on my cleanup skill with 'dangerous command detected: rm -rf'" **What happens**:

1. Scans cleanup.sh script, finds `rm -rf $TEMP_DIR` 2. Flags it because `$TEMP_DIR` could be empty or `/` (dangerous) 3. Suggests safer alternative: validate directory first, use explicit path 4. Shows fixed version: `[[ -n "$TEMP_DIR" && "$TEMP_DIR" != "/" ]] && rm -rf "$TEMP_DIR"`

**Result**: Skill now validates paths before deletion, commit succeeds

Command Examples

Validate all skills:

claudelint validate-skills

Validate specific skill:

claudelint validate-skills --skill my-skill

What Gets Validated

Required Fields

  • `name` field must match directory name
  • `description` must be present
  • Name must be kebab-case (lowercase with hyphens)
  • Name must not exceed 64 characters

allowed-tools Validation

  • Must be an array
  • Warns for unknown tools
  • Accepts: Bash, Read, Write, Edit, Grep, Glob, LSP, WebFetch, WebSearch, etc.

Model Validation

  • Validates model field if present
  • Accepted values: sonnet, opus, haiku

File References

  • Checks that referenced files in SKILL.md exist
  • Validates relative paths

Directory Organization

  • Warns if skill has >10 loose files (suggest subdirectories)
  • Warns if directory nesting >3 levels deep

Documentation

  • Warns if CHANGELOG.md is missing
  • Warns if SKILL.md lacks usage examples (no code blocks)
  • Warns if multi-file skill (>3 scripts) lacks README.md
  • Warns if skill lacks version field

Best Practices

  • Warns if shell scripts lack shebang (#!/bin/bash)
  • Warns if scripts have no explanatory comments
  • Detects inconsistent naming conventions

Security

  • Errors for dangerous commands (rm -rf /, dd, mkfs)
  • Warns for eval/exec usage
  • Warns for path traversal patterns

Exit Codes

  • `0` - No errors or warnings
  • `1` - Warnings found
  • `2` - Errors found

For troubleshooting, see [common issues](./references/common-issues.md). For customization, see [configuration](./references/configuration.md).

See Also

  • [validate-all](../validate-all/SKILL.md) - Run all validators
  • [optimize-cc-md](../optimize-cc-md/SKILL.md) - Optimize CLAUDE.md files
Read more
@pdugan20
Ships withclaudelint

A linter for Claude Code projects. Validates CLAUDE.md files, skills, settings, hooks, MCP servers, plugins, and more.

Stars on GitHub

Momentum

stars in total
14
Star history of pdugan20/claudelint on GitHub, a chart by star-history.com

Other skills on claudelint.

format-cc
Auto-invoked

format-cc

Formats Claude Code files with markdownlint, prettier, and shellcheck. Use when user asks to "format my files", "fix markdown…

@pdugan20@pdugan20Install Skill
optimize-cc-md
Auto-invoked

optimize-cc-md

Interactively helps users optimize their CLAUDE.md files. Use when user asks to "optimize my CLAUDE.md", "my CLAUDE.md is too…

@pdugan20@pdugan20Install Skill
validate-all
Auto-invoked

validate-all

Runs comprehensive claudelint validation on all Claude Code project files. Use when user asks to "check everything", "run all…

@pdugan20@pdugan20Install Skill
validate-cc-md
Auto-invoked

validate-cc-md

Validates CLAUDE.md files for size, imports, and structure. Use when user asks to "check my CLAUDE.md", "why is my CLAUDE.md too…

@pdugan20@pdugan20Install Skill
validate-hooks
Auto-invoked

validate-hooks

Validates Claude Code hooks.json files for schema, events, and commands. Use when user asks to "check my hooks", "validate…

@pdugan20@pdugan20Install Skill
validate-mcp
Auto-invoked

validate-mcp

Validates MCP server configuration files (.mcp.json). Use when user asks to "check my .mcp.json", "why isn't my MCP working",…

@pdugan20@pdugan20Install Skill

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills12d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc13d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react3d252k
@facebook@facebookInstall Skill

Questions about validate-skills.

Which coding agents can use validate-skills?
validate-skills installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.