hook-publisher

Publish hook scripts into claude-code-plugin with validated metadata.

35|Updated Feb 15, 2026
One-click install
npx skills add https://github.com/sean-sunagaku/claude-code-plugin --skill hook-publisher
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hook-publisher
Source: https://github.com/sean-sunagaku/claude-code-plugin/tree/main/.internal/hook-publisher/skills/hook-publisher
Command: npx skills add https://github.com/sean-sunagaku/claude-code-plugin --skill hook-publisher

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires python3, jq, and includes scripts (resource) components.

What problem does it solve?

Hook scripts often suffer from misplaced structure and missing metadata, making them hard to publish and maintain. This skill enforces correct placement, prevents duplicates, and automates the generation of plugin.json and marketplace.json.

Core Features & Use Cases

  • Validates the hook's repository layout and required files.
  • Prevents duplicate hook registrations in public and internal repos.
  • Generates plugin.json with portable, $HOME-based commands and updates marketplace.json.
  • Supports both internal and public publishing flows.

Quick Start

Run publish-hook.sh with the source hook path, plugin name, hook event, and matcher to publish the hook to the correct location and register it in marketplace.json.

Frequently Asked Questions about hook-publisher

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I publish hook scripts to the claude-code-plugin marketplace with proper directory structure?

Publishing hook scripts requires enforcing the correct directory structure, validating duplicates, and generating plugin.json and marketplace.json metadata. This skill automates that process by taking a source hook directory and producing a structured, portable plugin package.

What's the best way to prevent duplicate hook registrations when publishing plugins?

To prevent duplicate hook registrations, the publishing process validates the hook's repository layout against existing public and internal repos before packaging. This ensures no overlapping entries are added to the marketplace.json file during the relocation or publishing flow.

Do I need python3 and jq installed to organize and publish hook scripts?

Yes, you need python3 and jq installed to organize and publish hook scripts, as these dependencies are required to validate the repository layout, enforce the directory structure, and generate the necessary plugin.json metadata.

Can I generate plugin.json with portable command paths for hook scripts?

Yes, you can generate plugin.json with portable command paths by using a $HOME-based variable for the hook commands. This ensures the published hook scripts remain portable across different user environments without hardcoded paths.

What files are required in a source hook directory before publishing to the marketplace?

A source hook directory must contain either a hook.py or hook.sh file, along with optional test files. The publishing process validates this repository layout before generating the plugin.json and marketplace.json metadata for the package.

Does the hook publisher support both internal and public plugin publishing flows?

Yes, the hook publisher supports both internal and public plugin publishing flows. It applies the correct directory structure and metadata generation safeguards regardless of whether you are publishing the hook package to an internal repository or a public marketplace.