Plugin validator

From jeremylongshore/tons-of-skills-marketplace · View interactive version

Plugin validator is an AI agent skill from the GitHub repository jeremylongshore/tons-of-skills-marketplace. Validate automatically validates AI assistant code plugin structure, schemas, and compliance when user mentions validate plugin, check plugin, or plugin errors. runs comprehensive validation specific to AI assistant-code-plugins repository standards. Use when validating configurations or code. Trigg

How to use this skill

Skill file

Plugin Validator

Overview

Validates Claude Code plugin structure, JSON schemas, frontmatter format, security compliance, and marketplace catalog consistency. Runs the same checks as the CI pipeline to catch issues before committing.

Prerequisites

Instructions

  1. Identify the target plugin path from context or user request. Default to the current working directory if the path contains a .claude-plugin/ subdirectory.
  2. Validate required files exist (see CODE0):
  1. Validate plugin.json schema:
  1. Validate frontmatter in all component files:
  1. Validate directory structure matches the expected hierarchy (see CODE0 for the complete structure diagram).
  2. Check script permissions: find all .sh files and verify they have execute permission. Report any that lack it with a fix command.
  3. Run security scans: search for hardcoded secrets, AWS keys, private keys, dangerous commands, and suspicious URLs.
  4. Validate marketplace compliance:
  1. Validate README content: confirm it contains installation, usage, and description sections.
  2. Check hook path variables: verify hooks use ${CLAUDE_PLUGIN_ROOT} instead of hardcoded absolute paths (/home/, /Users/).
  3. Compile results into a validation report following the format in CODE0.

Output

A structured validation report containing:

Error Handling

| Error | Cause | Solution |

|---|---|---|

| Plugin directory not found | Incorrect path provided | Verify path matches plugins/[category]/[name]/ and the directory exists |

| jq parse error on JSON | Malformed JSON in plugin.json or catalog | Run jq empty <file> to locate the syntax error line |

| Frontmatter parse failure | Missing --- delimiters or invalid YAML | Ensure YAML frontmatter is enclosed in --- lines with valid key-value pairs |

| Version mismatch | plugin.json and marketplace.extended.json carry different versions | Update the stale version to match; run pnpm run sync-marketplace |

| Scripts not executable | .sh files missing execute permission | Run chmod +x <script> for each flagged file |

| Disallowed fields in plugin.json | Extra fields beyond the allowed set | Remove disallowed fields; only name, version, description, author, repository, homepage, license, keywords are permitted |

Examples

Validate a specific plugin:

Trigger: "Validate the skills-powerkit plugin."

Process: Run all 10 validation checks against plugins/community/skills-powerkit/. Identify 2 failures (script permissions, version mismatch). Provide fix commands: chmod +x scripts/*.sh and version update instruction. Report overall: FAILED (see CODE2).

Pre-commit readiness check:

Trigger: "Check if my plugin is ready to commit."

Process: Detect the plugin from working directory context. Run comprehensive validation including marketplace compliance. Report PASSED or list blocking issues with fixes.

Debug CI failures:

Trigger: "Why is my plugin failing CI?"

Process: Run the same validation checks that CI executes (validate-all-plugins.sh). Identify the exact failure (e.g., disallowed field in plugin.json). Provide the fix command and verify the fix resolves the issue.

Resources

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.