MCP HubMCP Hub
返回技能列表

plugin-validator

jeremylongshore
更新于 3 days ago
108 次查看
712
74
712
在 GitHub 上查看
测试aiautomation

关于

The plugin-validator skill automatically validates Claude Code plugins for structure, schemas, and compliance when triggered by keywords like "validate plugin" or "check plugin." It performs comprehensive checks against repository standards including required files, JSON schemas, permissions, and security. Use this skill during plugin development to ensure your plugins meet all Claude Code requirements.

快速安装

Claude Code

推荐
主要方式
npx skills add jeremylongshore/claude-code-plugins-plus
插件命令备选方式
/plugin add https://github.com/jeremylongshore/claude-code-plugins-plus
Git 克隆备选方式
git clone https://github.com/jeremylongshore/claude-code-plugins-plus.git ~/.claude/skills/plugin-validator

在 Claude Code 中复制并粘贴此命令以安装该技能

技能文档

Plugin Validator

Purpose

Automatically validates Claude Code plugins against repository standards, checking structure, JSON schemas, frontmatter, permissions, security, and marketplace compliance - optimized for claude-code-plugins repository.

Trigger Keywords

  • "validate plugin"
  • "check plugin"
  • "plugin validation"
  • "plugin errors"
  • "lint plugin"
  • "verify plugin"

Validation Checks

1. Required Files

  • .claude-plugin/plugin.json exists
  • README.md exists and not empty
  • LICENSE file exists
  • ✅ At least one component directory (commands/, agents/, skills/, hooks/, mcp/)

2. Plugin.json Schema

# Required fields:
- name (kebab-case, lowercase, hyphens only)
- version (semantic versioning x.y.z)
- description (clear, concise)
- author.name
- author.email
- license (MIT, Apache-2.0, etc.)
- keywords (array, at least 2)

# Optional but recommended:
- repository (GitHub URL)
- homepage (docs URL)

3. Frontmatter Validation

For Commands (commands/*.md):

---
name: command-name
description: Brief description
model: sonnet|opus|haiku
---

For Agents (agents/*.md):

---
name: agent-name
description: Agent purpose
model: sonnet|opus|haiku
---

For Skills (skills/*/SKILL.md):

---
name: Skill Name
description: What it does AND when to use it
allowed-tools: Tool1, Tool2, Tool3  # optional
---

4. Directory Structure

Validates proper hierarchy:

plugin-name/
├── .claude-plugin/          # Required
│   └── plugin.json          # Required
├── README.md                 # Required
├── LICENSE                   # Required
├── commands/                 # Optional
│   └── *.md
├── agents/                   # Optional
│   └── *.md
├── skills/                   # Optional
│   └── skill-name/
│       └── SKILL.md
├── hooks/                    # Optional
│   └── hooks.json
└── mcp/                      # Optional
    └── *.json

5. Script Permissions

# All .sh files must be executable
find . -name "*.sh" ! -perm -u+x
# Should return empty

6. JSON Validation

# All JSON must be valid
jq empty plugin.json
jq empty marketplace.extended.json
jq empty hooks/hooks.json

7. Security Scans

  • ❌ No hardcoded secrets (API keys, tokens, passwords)
  • ❌ No AWS keys (AKIA...)
  • ❌ No private keys (BEGIN PRIVATE KEY)
  • ❌ No dangerous commands (rm -rf /, eval())
  • ❌ No suspicious URLs (non-HTTPS, IP addresses)

8. Marketplace Compliance

  • ✅ Plugin listed in marketplace.extended.json
  • ✅ Source path matches actual location
  • ✅ Version matches between plugin.json and catalog
  • ✅ Category is valid
  • ✅ No duplicate plugin names

9. README Requirements

  • ✅ Has installation instructions
  • ✅ Has usage examples
  • ✅ Has description section
  • ✅ Proper markdown formatting
  • ✅ No broken links

10. Path Variables

For hooks:

  • ✅ Uses ${CLAUDE_PLUGIN_ROOT} not absolute paths
  • ✅ No hardcoded /home/ or /Users/ paths

Validation Process

When activated, I will:

  1. Identify Plugin

    • Detect plugin directory from context
    • Or ask user which plugin to validate
  2. Run Comprehensive Checks

    # Structure validation
    ./scripts/validate-all.sh plugins/category/plugin-name/
    
    # JSON validation
    jq empty .claude-plugin/plugin.json
    
    # Frontmatter check
    python3 scripts/check-frontmatter.py
    
    # Permission check
    find . -name "*.sh" ! -perm -u+x
    
    # Security scan
    grep -r "password\|secret\|api_key" | grep -v placeholder
    
  3. Generate Report

    • List all issues by severity (critical, high, medium, low)
    • Provide fix commands for each issue
    • Summary: PASSED or FAILED

Validation Report Format

🔍 PLUGIN VALIDATION REPORT
Plugin: plugin-name
Location: plugins/category/plugin-name/

✅ PASSED CHECKS (8/10)
- Required files present
- Valid plugin.json schema
- Proper frontmatter format
- Directory structure correct
- No security issues
- Marketplace compliance
- README complete
- JSON valid

❌ FAILED CHECKS (2/10)
- Script permissions: 3 .sh files not executable
  Fix: chmod +x scripts/*.sh

- Marketplace version mismatch
  plugin.json: v1.2.0
  marketplace.extended.json: v1.1.0
  Fix: Update marketplace.extended.json to v1.2.0

⚠️  WARNINGS (1)
- README missing usage examples
  Recommendation: Add ## Usage section with examples

OVERALL: FAILED (2 critical issues)
Fix issues above before committing.

Auto-Fix Capabilities

I can automatically fix:

  • ✅ Script permissions (chmod +x)
  • ✅ JSON formatting (jq reformat)
  • ✅ Marketplace version sync
  • ✅ Missing LICENSE (copy from root)

Repository-Specific Checks

For claude-code-plugins repo:

  • Validates against .claude-plugin/marketplace.extended.json
  • Checks category folder matches catalog entry
  • Ensures marketplace slug is claude-code-plugins-plus
  • Validates against other plugins (no duplicates)
  • Checks compliance with CLAUDE.md standards

Integration with CI

Validation results match GitHub Actions:

  • Same checks as .github/workflows/validate-plugins.yml
  • Compatible with CI error format
  • Can be run locally before pushing

Examples

User says: "Validate the skills-powerkit plugin"

I automatically:

  1. Run all validation checks
  2. Identify 2 issues (permissions, version mismatch)
  3. Provide fix commands
  4. Report overall status: FAILED

User says: "Check if my plugin is ready to commit"

I automatically:

  1. Detect plugin from context
  2. Run comprehensive validation
  3. Check marketplace compliance
  4. Report: PASSED or list issues

User says: "Why is my plugin failing CI?"

I automatically:

  1. Run same checks as CI
  2. Identify exact failure
  3. Provide fix command
  4. Validate fix works

GitHub 仓库

jeremylongshore/claude-code-plugins-plus
路径: plugins/examples/skills-powerkit/skills/plugin-validator
aiautomationclaude-codedevopsmarketplacemcp

相关推荐技能

content-collections

Content Collections 是一个 TypeScript 优先的构建工具,可将本地 Markdown/MDX 文件转换为类型安全的数据集合。它专为构建博客、文档站和内容密集型 Vite+React 应用而设计,提供基于 Zod 的自动模式验证。该工具涵盖从 Vite 插件配置、MDX 编译到生产环境部署的完整工作流。

查看技能

himalaya-email-manager

通信

这个Claude Skill通过Himalaya CLI工具提供IMAP邮箱管理功能,支持使用自然语言查询搜索、总结和删除邮件。它特别适合开发者快速获取每日邮件摘要和执行批量邮件操作,所有功能都通过Python脚本封装,简化了环境配置和命令执行流程。关键特性包括支持富文本表格输出、多文件夹分类处理,以及完整的Unicode字符和表情符号显示。

查看技能

sglang

SGLang是一个专为LLM设计的高性能推理框架,特别适用于需要结构化输出的场景。它通过RadixAttention前缀缓存技术,在处理JSON、正则表达式、工具调用等具有重复前缀的复杂工作流时,能实现极速生成。如果你正在构建智能体或多轮对话系统,并追求远超vLLM的推理性能,SGLang是理想选择。

查看技能

evaluating-llms-harness

测试

该Skill通过60+个学术基准测试(如MMLU、GSM8K等)评估大语言模型质量,适用于模型对比、学术研究及训练进度追踪。它支持HuggingFace、vLLM和API接口,被EleutherAI等行业领先机构广泛采用。开发者可通过简单命令行快速对模型进行多任务批量评估。

查看技能