lint
/lint
Lint and audit a Claude Code plugin, skill, or hook for correctness, token efficiency, and quality. Runs static analysis against verified Claude Code internals, then delegates to skill-creator for description optimization and eval benchmarking. Use when reviewing plugin changes, writing new hooks/skills, debugging a hook that silently does nothing, or before merging to main.
- Author
- Zate ↗
- Repository
- cc-plugins ↗
- Licence
- MIT
- Last repository change
- 13.05.2026
Assessment and security
- Files in this package
- 4
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 13.05.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Lint and audit a Claude Code plugin, skill, or hook for correctness, token efficiency, and quality. Runs static analysis against verified Claude Code internals, then delegates to skill-creator for description optimization and eval benchmarking. Use when reviewing plugin changes, writing new hooks/skills, debugging a hook that silently does nothing, or before merging to main.
Arguments
/lint [path-to-plugin|skill-dir|hooks-dir] [--static-only] [--fix]
Original author description
Lint and audit a Claude Code plugin, skill, or hook for correctness, token efficiency, and quality. Runs static analysis against verified Claude Code internals, then delegates to skill-creator for description optimization and eval benchmarking. Use when reviewing plugin changes, writing new hooks/skills, debugging a hook that silently does nothing, or before merging to main.
How it works
- Phase 1: Discover Target
- Phase 2: Static Correctness Audit
- Phase 3: CC Source Verification (optional deep check)
- Phase 4: Description Quality Delegation
- Phase 5: Synthesize and Report
- Reference Files
SKILL.md preview
---
name: lint
description: "Lint and audit a Claude Code plugin, skill, or hook for correctness, token efficiency, and quality. Runs static analysis against verified Claude Code internals, then delegates to skill-creator for description optimization and eval benchmarking. Use when reviewing plugin changes, writing new hooks/skills, debugging a hook that silently does nothing, or before merging to main."
when_to_use: "Before merging plugin changes, after writing a new skill or hook, debugging unexpected hook behavior, validating a whole plugin directory, or running pre-commit quality checks."
argument-hint: "[path-to-plugin|skill-dir|hooks-dir] [--static-only] [--fix]"
context: fork
user-invocable: true
allowed-tools:
- Read
- Grep
- Glob
- Bash
- AskUserQuestion
- Agent
- Skill
- TaskCreate
- TaskUpdate
- TaskList
---
# plugin-lint
Orchestrated quality audit for Claude Code plugins. Runs static correctness checks first (the unique value), then delegates to existing tools for depth.
**Flags:**
- (default): Full lint — static analysis + skill-creator description optimization
- `--static-only`: Skip description optimization, faster pass
- `--fix`: Auto-apply all HIGH severity fixes without prompting
---
## Phase 1: Discover Target
Parse `$ARGUMENTS`. Extract path and flags.
**Target resolution:**
- No path → use current working directory
- Path ends in `SKILL.md` → single skill file
- Path contains `hooks/` or ends in `hooks.json` → hooks audit only
- Path contains `.claude-plugin/` or has `plugin.json` → whole plugin
- Otherwise → try as plugin root, skill dir, or hooks dir in that order
**Enumerate components (silent):**
```bash
find "$TARGET" -name "SKILL.md" 2>/dev/null
find "$TARGET" -name "hooks.json" 2>/dev/null
find "$TARGET" -name "*.sh" -path "*/hooks/*" 2>/dev/null
find "$TARGET" -name "*.md" -path "*/agents/*" 2>/dev/null
find "$TARGET" -name "plugin.json" 2>/dev/null
```
Store discovered files. Note counts: N skills, M hooks, P agents.
---
## Phase 2: Static Correctness Audit
Read all three reference files before starting:
- `${CLAUDE_SKILL_DIR}/references/hook-schemas.md`
- `${CLAUDE_SKILL_DIR}/references/frontmatter-fields.md`
- `${CLAUDE_SKILL_DIR}/references/common-mistakes.md`
Collect findings as a list. Each finding: `{severity, file, line, issue, fix}`.
### 2a. Audit hooks.json files
For each `hooks.json` found:
**`if` condition syntax:**
```bash
grep -n '"if"' "$HOOKS_JSON"
```
Flag any value containing `==`, `===`, `||`, `&&`, `!=` — these are JS expressions, not permission-rule syntax. Correct form: `"Bash"`, `"Bash(git *)"`, `"Write"`.
**hookSpecificOutput event names:**
```bash
grep -n '"hookEventName"' "$HOOKS_JSON"
```
Cross-reference against the valid-events table in `hook-schemas.md`. Flag `"PreCompact"` — it has no schema entry. Flag any unknown event name.
**SessionStart matcher:**
```bash
grep -n '"matcher"' "$HOOKS_JSON"
```
If the hook event is `SessionStart` and the matcher doesn't include `clear`, flag as MEDIUM.
**updatedMCPToolOutput on built-in tools:**
For each PostToolUse hook, check if the hook script references `updatedMCPToolOutput`. If so, also check the `if` condition — if it targets a built-in tool (Bash, Read, Write, Edit, Grep, Glob), flag HIGH.
### 2b. Audit hook shell scripts
For each `.sh` in `hooks/`:
**Wrong input field name:**
```bash
grep -n 'tool_output' "$SCRIPT"
```
Flag any `tool_output` reference — correct field is `tool_response`.
**JSON PreCompact output:**
```bash
grep -n 'hookEventName.*PreCompact' "$SCRIPT"
```
Flag — PreCompact must use plain stdout, not JSON hookSpecificOutput.
**Placeholder scripts:**
If script has fewer than 5 non-comment lines and only outputs `suppressOutput: true`, flag as LOW (dead weight — spawns process for nothing).
### 2c. Audit SKILL.md files
For each `SKILL.md` found:
**Extract frontmatter** (between first and second `---`):
```bash
awk 'BEGIN{f=0} /^---/{f++; next} f==1{print}' "$SKILL"
```
**Unknown frontmatter keys:**
Compare all keys against the valid list in `frontmatter-fields.md`. Flag anything not in the list as MEDIUM.
**Nonexistent fields:**
Flag `when_not_to_use` as HIGH (not in parser, dead metadata).
**Missing `when_to_use`:**
If skill has a description but no `when_to_use`, flag as LOW (skill may not appear in model listing).
**No-op paths glob:**
If `paths` is set and includes `**/*` or `**`, flag as LOW.
**Body length:**
```bash
wc -l < "$SKILL"
```
Warn at 400 lines, flag at 600 lines.
**Body corruption — frontmatter keys leaking into body:**
```bash
# Count when_to_use occurrences total
grep -c '^when_to_use:' "$SKILL" 2>/dev/null || echo 0
```
If count > 1: lines outside the frontmatter fence. Flag HIGH — indicates find-and-replace corruption.
**AskUserQuestion block integrity:**
```bash
grep -n 'AskUserQuestion\|options:\|- label:' "$SKILL"
```
If `AskUserQuestion` block exists, verify each `- label:` is immediately followed by valid indented content (not a stray `when_to_use:` line).
### 2d. Audit agent .md files
For each agent `.md` in `agents/`:
**Extract frontmatter**, check valid fields.
**effort: low with code tools:**
If `effort: low` and `tools:` includes `Write`, `Edit`, or `Bash` → flag MEDIUM.
**Model quality mismatch:**
If `model: haiku` and tools include `Write`/`Edit`/`Bash` → flag MEDIUM.
---
## Phase 3: CC Source Verification (optional deep check)
Check if source is available:
```bash
ls ~/projects/claude-code/src/types/hooks.ts 2>/dev/null && echo "available"
```
If available, cross-reference:
```bash
grep -n 'z.literal' ~/projects/claude-code/src/types/hooks.ts | grep -v '//'
```
Compare against hookSpecificOutput event names found in target's hooks. Cite actual source line numbers in findings. Upgrade confidence of all schema findings from "reference says" to "source-verified at line N".
If not available, note "source not present — findings based on reference docs only."
---
## Phase 4: Description Quality Delegation
Skip if `--static-only` flag is set.
For each SKILL.md with a non-empty `description`:
Invoke skill-creator's description optimization. Spawn as background Agent tasks (parallel if multiple skills):
```
Agent task prompt:
"Use the skill-creator skill to run description optimization on this skill.
Skill path: <path>
Current description: <description>
Run the description optimization loop (not full evals — just the trigger optimization).
Find the skill-creator scripts at: ~/.claude/plugins/cache/claude-plugins-official/skill-creator/unknown/skills/skill-creator/
Report: original score, best score, and the improved description if score improved by >0.05."
```
Collect results as each task completes. Note: skill-creator needs the `claude` CLI available for `run_loop.py`.
If `claude` CLI is not found or skill-creator scripts are absent, skip this phase and note why.
---
## Phase 5: Synthesize and Report
Present unified report:
```
## plugin-lint Report: <target path>
Checked: <N> skills, <M> hooks.json, <P> hook scripts, <Q> agents
Source verification: [available / not available]
### 🔴 HIGH — Must Fix (<count>)
<file>:<line> <issue>
→ Fix: <specific correction>
### 🟡 MEDIUM — Should Fix (<count>)
...
### 🟢 LOW — Consider (<count>)
...
### ✅ Clean
<files with no issues>
### Description Optimization Results
<skill-name>: <old-score> → <new-score>
New description: "<improved text>"
<skill-name>: <score> — no improvement found
[skipped — --static-only]
```
If zero findings and no description improvements: "All checks passed. No issues found."
Then — unless `--fix` was passed:
```yaml
AskUserQuestion:
question: "Found <N> issues. How would you like to proceed?"
header: "plugin-lint"
multiSelect: false
options:
- label: "Apply all HIGH fixes"
description: "Auto-fix the <count> HIGH severity issues"
- label: "Walk me through each issue"
description: "Review and approve fixes one by one"
- label: "Apply description improvements"
description: "Update descriptions with optimized versions"
- label: "Just the report"
description: "No changes — report only"
```
If `--fix`: apply all HIGH fixes automatically, then show report.
### Applying Fixes
For each HIGH finding, apply the specific correction:
- Bad `if` syntax → rewrite the `"if"` value in hooks.json
- `when_not_to_use` frontmatter → remove the line
- Body corruption (extra `when_to_use:` lines) → remove all occurrences after the frontmatter close
- Wrong `tool_output` field → replace with `tool_response` in the script
- PreCompact JSON → rewrite script to output plain text
After applying fixes, re-run Phase 2 on modified files to confirm clean.
---
## Reference Files
Load on demand — do not load all at once:
- `references/hook-schemas.md` — hook event schemas, `if` syntax, input fields
- `references/frontmatter-fields.md` — valid frontmatter keys for skills and agents
- `references/common-mistakes.md` — top 10 failure patterns with source citations
Files in this package (4)
- SKILL.md 9 KB
- references/common-mistakes.md 5 KB
- references/frontmatter-fields.md 3 KB
- references/hook-schemas.md 3 KB
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · Zate/cc-plugins | 100 | MIT |
| RediSearch/RediSearch | 100 | AGPL-3.0 |
| pmdevsolutions/aurelius | 100 | MIT |
| rvdbreemen/adr-kit | 100 | MIT |
| mehrad-dm/mastermind | 100 | MIT |
| rjroy/vibe-garden | 100 | MIT |
| muon-m2/magento2-tools | 100 | MIT |
| arbazkhan971/godmode | 100 | MIT |
| plato-corp/skills | 100 | MIT |
Database snapshot: 13.11.2026 · package version 066c7b2129e1 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 2 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100skill-review
Quality review and audit for Claude Code skills. Analyzes skill structure, description quality, workflow design, token efficiency, and anti-patterns against best practices. Use when user wants to review a skill, audit a skill, check skill quality, evaluate a skill, critique a… - 90ck:skill-creator
Create or update Claude skills with eval-driven iteration. Use for new skills, skill scripts, references, benchmark optimization, description optimization, eval testing, extending Claude's capabilities. - 100cc-plugin-eval
Analyze, lint, and check a local Claude Code add-on or capability, explain the result, and rank the top fixes first. Use when the user says "audit this", "why did it score that way", "what should I fix first", "validate the manifest", "lint the hooks", or "benchmark the real token usage". - 100skill-reviewer
Use this skill to audit, review, or validate Claude Code skills (.md files in .claude/commands/). Invoke when user wants to check skill quality, cross-platform compatibility, cross-agent compatibility, prerequisite declarations, or description triggering accuracy. Triggers on:… - 95eval-hooks
Audit Claude Code and Codex hooks for validity, safety, and correctness across settings.json, hooks.json, config.toml, plugin, and skill or agent frontmatter hooks. Resolves each command, checks event names, handler types, matchers, exit-code and JSON decision strategy, and… - 100hook-publisher
Hook スクリプトを claude-code-plugin リポジトリの正しい構造に配置するスキル。 hook の構造検証、既存 hook との重複チェック、plugin.json 生成、marketplace.json 登録を行う。 Use when: hook をプラグインリポジトリに公開したい、hook を移動したい、hook をパッケージ化したい。 Triggers: "hook を公開", "hook publish", "hook をプラグインに追加", "PostToolUse hook を配置", "hook をコピー", "hook publisher