@skill-kit/lint
v1.0.0
Published
SKILL.md format linter for Skill Kit - check and fix your AI agent skills
Downloads
102
Maintainers
Readme
@skill-kit/lint
SKILL.md format linter for Skill Kit - check and fix your AI agent skills.
Installation
npm install @skill-kit/lint
# or
pnpm add @skill-kit/lintUsage
CLI
# Lint all SKILL.md files
skill-lint
# Lint specific files
skill-lint ./path/to/SKILL.md
# Auto-fix issues
skill-lint --fix
# Output in different formats
skill-lint --format json
skill-lint --format github # For CI/CDProgrammatic API
import { Linter } from '@skill-kit/lint';
const linter = new Linter();
// Lint a file
const result = await linter.lint('./SKILL.md');
console.log(result.messages);
// Lint content directly
const result = await linter.lintContent(content, 'SKILL.md');
// Fix issues
const fixResult = await linter.fix('./SKILL.md');
console.log(fixResult.output);Configuration
Create a .skilllintrc.json file in your project root:
{
"extends": "recommended",
"rules": {
"frontmatter-required": "error",
"description-format": "warn",
"max-length": ["warn", { "max": 15000 }]
}
}Presets
recommended- Sensible defaults for most projectsstrict- Stricter rules for production skills
Available Rules
Format Rules
| Rule | Description | Fixable |
|------|-------------|---------|
| frontmatter-required | Ensure frontmatter exists | No |
| frontmatter-fields | Ensure required fields exist | No |
| sections-required | Ensure required sections exist | No |
| section-not-empty | Ensure sections have content | No |
Style Rules
| Rule | Description | Fixable |
|------|-------------|---------|
| description-format | Ensure third-person description | Yes |
Best Practices Rules
| Rule | Description | Fixable |
|------|-------------|---------|
| max-length | Limit SKILL.md length | No |
| examples-exist | Ensure examples are provided | No |
| triggers-count | Limit trigger count | No |
| steps-count | Limit workflow steps | No |
Reference Rules
| Rule | Description | Fixable |
|------|-------------|---------|
| no-broken-links | Check internal links | No |
Output Formats
Stylish (default)
/path/to/SKILL.md
1:1 error Missing frontmatter frontmatter-required
2:1 warning Description should use third-person description-format
2 problems (1 error, 1 warning)JSON
[{
"filePath": "/path/to/SKILL.md",
"messages": [...],
"errorCount": 1,
"warningCount": 1
}]GitHub Actions
::error file=/path/to/SKILL.md,line=1,col=1::frontmatter-required: Missing frontmatterLicense
MIT
