Comprehensive audit pipeline for skills, plugins, agents, and commands. Validates structure, quality, security, marketplace compliance, cross-platform compatibi
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-claude-skills-d281a5b40a37 ,按照其中的说明把「plugin-audit」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
Full audit pipeline for any skill, plugin, agent, or command in this repository. Runs 8 validation phases, auto-fixes what it can, and only stops for user input on critical decisions (breaking changes, new dependencies).
/plugin-audit product-team/code-to-prd
/plugin-audit engineering/agenthub
/plugin-audit engineering-team/playwright-pro
Execute all 8 phases sequentially. Stop on critical failures. Auto-fix non-critical issues. Report results at the end.
Identify what the skill contains and classify it.
{skill_path} exists and contains SKILL.mdSKILL.md frontmatter — extract name, description, Category, Tierscripts/ → has Python toolsreferences/ → has reference docsassets/ → has templates/samplesexpected_outputs/ → has test fixturesagents/ → has embedded agentsskills/ → has sub-skills (compound skill).claude-plugin/plugin.json → is a standalone pluginsettings.json → has command registrationsengineering/, product-team/, marketing-skill/, etc.commands/ for a .md file matching the skill nameDisplay discovery summary before proceeding:
Auditing: code-to-prd
Domain: product-team
Type: STANDARD skill with standalone plugin
Scripts: 2 | References: 2 | Assets: 1 | Expected outputs: 3
Command: /code-to-prd (found)
Plugin: .claude-plugin/plugin.json (found)
Run the skill-tester validator.
python3 engineering/skills/skill-tester/scripts/skill_validator.py {skill_path} --tier {detected_tier} --json
Parse the JSON output. Extract:
Gate rule: Score must be ≥ 75 (GOOD). If below 75:
Run the quality scorer.
python3 engineering/skills/skill-tester/scripts/quality_scorer.py {skill_path} --detailed --json
Parse the JSON output. Extract:
Gate rule: Score must be ≥ 60 (C). If below 60, report the improvement roadmap items as action items.
If the skill has scripts/ with .py files, run the script tester.
python3 engineering/skills/skill-tester/scripts/script_tester.py {skill_path} --json --verbose
Parse the JSON output. For each script, extract:
Gate rule: All scripts must PASS. Any FAIL is a blocker. PARTIAL triggers a warning.
Auto-fix: If a script fails the --help test, check if it has argparse — if not, this is a real issue. If it fails the stdlib-only test, flag the import and ask the user whether the dependency is acceptable (this is a critical decision).
Run the skill security auditor.
python3 engineering/skills/skill-security-auditor/scripts/skill_security_auditor.py {skill_path} --strict --json
Parse the JSON output. Extract:
Gate rule: Zero CRITICAL findings. Zero HIGH findings. Any CRITICAL or HIGH is a blocker — report the exact file, line, pattern, and recommended fix.
Do NOT auto-fix security issues. Report them and let the user decide.
If {skill_path}/.claude-plugin/plugin.json exists:
name, description, version, author, homepage, repository, license, skills2.1.2)skills must be "./"name must match the skill directory nameAuto-fix: If version is wrong, update it. If extra fields exist, remove them.
If {skill_path}/settings.json exists:
commands field exists, verify each command has a matching file in commands/Check if the skill has an entry in .claude-plugin/marketplace.json:
plugins array for an entry with source matching ./ + skill pathversion, name, and that source path existsproduct-skills) would include it via its source pathCheck the parent domain's .claude-plugin/plugin.json:
Auto-fix: Update stale counts. Fix version mismatches.
Verify the skill appears in platform indexes:
grep -l "{skill_name}" .codex/skills-index.json .gemini/skills-index.json
If missing from either index:
python3 scripts/sync-codex-skills.py --verbose
python3 scripts/sync-gemini-skills.py --verbose
If the skill has associated commands (from settings.json commands field or matching name in commands/):
.md file has valid YAML frontmatter (name, description)mkdocs.yml navAuto-fix: Add missing mkdocs.yml nav entries.
If the skill has embedded agents ({skill_path}/agents/*.md):
Search agents/ for any cs-* agent that references this skill:
grep -rl "{skill_name}\|{skill_path}" agents/
If found, verify the agent's skill references are correct.
Read the SKILL.md for references to other skills (look for ../ paths, skill names in "Related Skills" sections):
Based on the skill's domain, invoke the appropriate agent's review perspective:
| Domain | Agent | Review Focus |
|---|---|---|
engineering/ or engineering-team/ | cs-senior-engineer | Architecture, code quality, CI/CD integration |
product-team/ | cs-product-manager | PRD quality, user story coverage, RICE alignment |
marketing-skill/ | cs-content-creator | Content quality, SEO optimization, brand voice |
ra-qm-team/ | cs-quality-regulatory | Compliance checklist, audit trail, regulatory alignment |
business-growth/ | cs-growth-strategist | Growth metrics, revenue impact, customer success |
finance/ | cs-financial-analyst | Financial model accuracy, metric definitions |
| Other | cs-senior-engineer | General code and architecture review |
How to invoke: Read the agent's .md file to understand its review criteria. Apply those criteria to review the skill's SKILL.md, scripts, and references. This is NOT spawning a subagent — it's using the agent's documented perspective to structure your review.
Review checklist (apply domain-appropriate lens):
Present results as a structured table:
╔══════════════════════════════════════════════════════════════╗
║ PLUGIN AUDIT REPORT: {skill_name} ║
╠══════════════════════════════════════════════════════════════╣
║ ║
║ Phase 1 — Discovery ✅ {type}, {domain} ║
║ Phase 2 — Structure ✅ {score}/100 ({level}) ║
║ Phase 3 — Quality ✅ {score}/100 ({grade}) ║
║ Phase 4 — Scripts ✅ {n}/{n} PASS ║
║ Phase 5 — Security ✅ PASS (0 critical, 0 high) ║
║ Phase 6 — Marketplace ✅ plugin.json valid ║
║ Phase 7 — Ecosystem ✅ Codex + Gemini synced ║
║ Phase 8 — Code Review ✅ {domain} review passed ║
║ ║
║ VERDICT: ✅ PASS — Ready for merge/publish ║
║ ║
║ Auto-fixes applied: {n} ║
║ Warnings: {n} ║
║ Action items: {n} ║
║ ║
╚══════════════════════════════════════════════════════════════╝
| Condition | Verdict |
|---|---|
| All phases pass | PASS — Ready for merge/publish |
| Only warnings (no blockers) | PASS WITH WARNINGS — Review warnings before merge |
| Any phase has a blocker | FAIL — List blockers with fix instructions |
| Tool | Path |
|---|---|
| Skill Validator | engineering/skills/skill-tester/scripts/skill_validator.py |
| Quality Scorer | engineering/skills/skill-tester/scripts/quality_scorer.py |
| Script Tester | engineering/skills/skill-tester/scripts/script_tester.py |
| Security Auditor | engineering/skills/skill-security-auditor/scripts/skill_security_auditor.py |
| Quality Standards | standards/quality/quality-standards.md |
| Security Standards | standards/security/security-standards.md |
| Git Standards | standards/git/git-workflow-standards.md |