Get the FREE Ultimate OpenClaw Setup Guide →

plugin-dev

npx machina-cli add skill rube-de/cc-skills/plugin-dev --openclaw
Files (1)
SKILL.md
2.0 KB

Plugin Development Tools

On-demand validation and hook auditing for the cc-skills marketplace.

Triggers

Use this skill when the user says: "validate plugins", "check plugin", "hook audit", "validate skills", "audit hooks", "check skill frontmatter", "plugin validation".

Available Tools

1. Plugin Validation

Validates all registered plugins: JSON Schema, source paths, orphan detection, and SKILL.md frontmatter.

bun scripts/validate-plugins.mjs

What it checks:

  • marketplace.json conforms to JSON Schema
  • All plugin source paths exist on disk
  • No orphaned plugin directories (dirs without marketplace entries)
  • SKILL.md frontmatter has valid name (kebab-case) and non-empty description
  • Every plugin has at least one component directory (skills/, hooks/, commands/, agents/)

2. Hook Audit

Scans hook and script files for silent failure patterns.

bash plugins/plugin-dev/scripts/audit-hooks.sh

What it checks:

  • Shell scripts (.sh): mkdir/cp/mv/rm without error handling (unless set -e is active)
  • Python scripts (.py): bare except: pass or except Exception: pass
  • Optional: ShellCheck integration (skipped with message if not installed)

Exit codes: 0 = clean, 1 = findings

Workflow

When the user asks to validate or audit:

  1. Run bun scripts/validate-plugins.mjs for plugin validation
  2. Run bash plugins/plugin-dev/scripts/audit-hooks.sh for hook auditing
  3. Report results clearly — separate passing checks from failures
  4. For failures, suggest specific fixes

Scaffolding

To scaffold a new plugin interactively, use the command:

/plugin-dev:create [plugin-name]

This is a separate slash command — not part of this skill.

Source

git clone https://github.com/rube-de/cc-skills/blob/main/plugins/plugin-dev/skills/plugin-dev/SKILL.mdView on GitHub

Overview

plugin-dev validates all registered plugins by checking SKILL.md frontmatter, JSON Schema for plugins, and each plugin's source paths. It also audits hook scripts for silent failures in shell and Python, helping keep the marketplace reliable and consistent.

How This Skill Works

It runs two main tools: bun scripts/validate-plugins.mjs and bash plugins/plugin-dev/scripts/audit-hooks.sh. The validator checks the marketplace.json against the JSON Schema, confirms source paths exist, detects orphaned directories, validates SKILL.md frontmatter, and ensures each plugin has at least one component directory. The hook auditor flags unsafe shell patterns and Python bare except blocks, and reports results using exit codes 0 for clean and 1 for findings.

When to Use It

  • When a new plugin is added or updated
  • Before publishing or deploying plugin updates
  • When you suspect silent failures in hooks or scripts
  • During routine quality checks of the marketplace
  • When validating frontmatter conformance and component coverage

Quick Start

  1. Step 1: bun scripts/validate-plugins.mjs
  2. Step 2: bash plugins/plugin-dev/scripts/audit-hooks.sh
  3. Step 3: Review results and fix any failures, then re-run

Best Practices

  • Run both validation and hook audit as part of CI
  • Ensure set -e is enabled in shell scripts or explicit error handling
  • Validate that SKILL.md frontmatter name is kebab-case and description non-empty
  • Confirm every plugin has at least one component directory
  • Review and fix findings with actionable steps

Example Use Cases

  • Validating a newly added image-processor plugin
  • Detecting a Python script with bare except: pass
  • Finding an orphan plugin directory not referenced in marketplace.json
  • Failing marketplace.json schema due to missing fields in a plugin
  • Running audit after a bulk update to hooks

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers