A lightweight Node.js CLI tool for linting and validating OpenClaw SKILL.md files before publishing to ClawHub.
skill-lint ensures that your OpenClaw skills follow best practices and are ready for publication. It validates SKILL.md file structure, required fields, metadata completeness, and markdown content quality.
- Frontmatter Validation - Checks YAML structure and required fields (name, description)
- Metadata Inspection - Validates metadata.openclaw structure and installation methods
- Installation Validation - Ensures install entries have correct format (brew, apt, manual, npm, pip)
- Content Validation - Checks markdown body for required sections (Purpose, When to Use, Setup)
- Emoji Validation - Warns if display emoji is missing for better ClawHub discoverability
- Description Quality - Validates description length (20-200 chars) for clarity
- Colored Output - Human-readable terminal output with errors, warnings, and info
- JSON Output - Machine-readable JSON output with
--jsonflag - No External Dependencies - Built with Node.js built-ins only
npm install -g @openclawHQ/skill-lintOr install locally:
npm install --save-dev @openclawHQ/skill-lintValidate a SKILL.md file in the current directory:
skill-lintValidate a specific file:
skill-lint path/to/SKILL.md-h, --help Show help message
-v, --version Show version number
-q, --quiet Suppress info messages (errors and warnings only)
--json Output results as JSON for programmatic use
Validate with minimal output:
skill-lint -q SKILL.mdGet JSON output for CI/CD integration:
skill-lint --json path/to/SKILL.md- required-fields - Missing
nameordescriptionin frontmatter - install-missing-id - Install method missing required
idfield - install-missing-kind - Install method missing required
kindfield - install-no-target - Install method missing target (formula/package/steps)
- install-missing-formula - Brew install method requires
formulafield - install-missing-package - APT install method requires
packagefield - install-missing-steps - Manual install method requires
stepsarray
- name-format - Skill name should be kebab-case (e.g.,
my-skill, notMySkill) - name-length - Skill name longer than 50 characters
- description-length - Description shorter than 20 or longer than 200 characters
- description-format - Description should start with capital letter
- missing-emoji - No emoji in metadata.openclaw.emoji
- emoji-format - Emoji should be a single character
- install-invalid-kind - Install kind is not one of: brew, apt, manual, npm, pip
- missing-sections - Body missing recommended sections (Purpose, When to Use, Setup)
- empty-body - Skill description body is empty
- no-install - No installation methods specified
- no-examples - Consider adding Examples section
- metadata-structure - Consider adding metadata.openclaw section
- no-examples - Consider adding Examples section with usage patterns
A valid SKILL.md file requires:
---
name: skill-name
description: "Brief description of what this skill does"
# Optional: Extended metadata for ClawHub
metadata:
openclaw:
emoji: π§
requires:
bins:
- required-binary
env:
- REQUIRED_ENV_VAR
install:
- id: brew
kind: brew
formula: package-name
label: "Install via Homebrew"
- id: manual
kind: manual
label: "Manual installation"
steps:
- "Step 1"
- "Step 2"
---
## Purpose
Describe what this skill does and its primary use cases.
## When to Use
Explain scenarios where this skill is appropriate.
## When NOT to Use
Explain scenarios where alternatives would be better.
## Setup
Installation and configuration instructions.
### Prerequisites
List required tools and dependencies.
### Local Testing
How to install and test the skill locally.
## Commands / Actions
List and describe available commands.
## Examples
Provide copy-paste-ready usage examples.
## Notes
- **Limitations**: Known limitations and edge cases
- **Performance**: Expected performance characteristics
- **Troubleshooting**: Common issues and solutions
- **Security**: Security considerations for API keys, etc.0- No errors found (warnings and info may still be present)1- One or more errors found
Add to .git/hooks/pre-commit:
#!/bin/bash
skill-lint SKILL.md || exit 1Add to .github/workflows/validate.yml:
name: Validate SKILL.md
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- run: npm install -g @openclawHQ/skill-lint
- run: skill-lint SKILL.mdAdd to package.json:
{
"scripts": {
"validate": "skill-lint SKILL.md"
}
}.
βββ bin/
β βββ skill-lint.js # CLI entry point
βββ src/
β βββ parser.js # SKILL.md parser
β βββ rules.js # Validation rules
β βββ reporter.js # Output formatting
βββ test/
β βββ parser.test.js # Parser tests
β βββ rules.test.js # Rules tests
β βββ reporter.test.js # Reporter tests
β βββ integration.test.js # Integration tests
β βββ fixtures/ # Test fixtures
βββ package.json
βββ README.md
npm testAll tests use Node.js built-in test runner (Node 18+).
- Add validation function to
src/rules.js - Add tests in
test/rules.test.js - Update README with rule documentation
- Run tests to verify:
npm test
- Auto-fix capabilities for common issues
- Support for skill templates and scaffolding
- Integration with ClawHub API for pre-publish checks
- Custom rule configuration
- Multiple file validation
- Watch mode for development
Contributions welcome! Please:
- Fork the repository
- Create a feature branch
- Add tests for new functionality
- Ensure all tests pass:
npm test - Submit a pull request
MIT - See LICENSE file
- OpenClaw - Main project
- ClawHub - Official skill registry
- SKILL.md Specification - Full format documentation
Built by the OpenClaw community. We move first.