当前位置: 首页 > Skill >

Plugin Publisher

Plugin Publisher

1.0.0 2026.11.27 浏览:889
获取Skill文件查看使用说明
作者:陈景许可证:
本文目录展开

Plugin Publisher

Create, package, and publish Claude plugins that work across Claude Code, Cowork desktop, and OpenClaw — with correct Anthropic marketplace structure and GitHub integration.

Why This Matters

Plugins that don't follow the exact Anthropic marketplace directory convention won't install correctly in Cowork. The marketplace system expects a specific layout — this skill encodes that layout so you never have to guess. It also generates OpenClaw compatibility automatically, so every plugin you create works in both ecosystems.

Quick Reference: What Goes Where

marketplace-repo/                      ← GitHub repo (one per marketplace)
├── .claude-plugin/
│   └── marketplace.json               ← Catalog listing all plugins in this marketplace
├── my-plugin/                         ← Plugin dir AT REPO ROOT (not nested!)
│   ├── .claude-plugin/
│   │   └── plugin.json                ← Plugin manifest
│   ├── skills/
│   │   └── skill-name/SKILL.md        ← Skills (triggered automatically)
│   ├── commands/
│   │   └── command-name.md            ← Slash commands (invoked explicitly)
│   ├── agents/
│   │   └── agent-name.md              ← Subagent definitions
│   ├── .mcp.json                      ← MCP server connections (optional)
│   ├── CONNECTORS.md                  ← Tool-agnostic placeholders (optional)
│   └── README.md
├── another-plugin/                    ← Additional plugins in same marketplace
│   └── ...
├── openclaw-install.sh                ← Generated OpenClaw deployer
└── README.md                          ← Marketplace-level documentation

Critical rule: Each plugin directory lives at the REPO ROOT, not nested under plugins/. The marketplace.json source path is "./my-plugin", never "./plugins/my-plugin". This matches how Anthropic's own knowledge-work-plugins marketplace works.

Read references/marketplace-structure.md for the complete format specification before creating any files.

Workflow

Phase 1: Understand What We're Building

Determine the scope through conversation:

  1. What does this plugin do? — Get a clear description of the plugin's purpose.
  2. What components does it need? — Skills, commands, agents, hooks, MCP servers?
  3. Is this a new marketplace or adding to an existing one? — Check if the user already has a marketplace repo on GitHub.
  4. Who's the audience? — Internal use only, or shared publicly? This affects whether to use ~~placeholder connectors.

If the user already has skills, agents, or workflows in this session or in files, offer to convert them directly rather than starting from scratch.

Phase 2: Scaffold the Plugin

Create all files in a working directory, following this exact order:

2a. Plugin manifest

Write .claude-plugin/plugin.json:

{
  "name": "plugin-name",
  "version": "1.0.0",
  "description": "What it does in one sentence",
  "author": {
    "name": "Author Name",
    "url": "https://example.com"
  },
  "homepage": "https://github.com/owner/repo",
  "license": "MIT",
  "keywords": ["relevant", "keywords"]
}

Name rules: kebab-case, lowercase, hyphens only, no spaces.

2b. Skills

Each skill is a directory with a SKILL.md file. Skills trigger automatically when Claude detects a matching user request.

---
name: skill-name
description: >
  Third-person description with trigger phrases.
  "When the user asks to X, Y, or Z, use this skill."
---

Body: imperative instructions, under 3,000 words. Use references/ for detailed content.

2c. Commands

Each command is a .md file with optional YAML frontmatter. Commands are invoked explicitly by the user (e.g., /plugin-name:command).

---
description: Short description (under 60 chars)
allowed-tools: Read, Write, Edit, Bash, WebSearch
argument-hint: [concept-description]
---

Body: directives FOR Claude to follow. Use $ARGUMENTS for user input.

2d. Agents

Each agent is a .md file with YAML frontmatter. Agents are subagent definitions that run in isolated context windows.

---
name: agent-name
description: When to use this agent, with <example> blocks
model: sonnet
allowed-tools: Read Write WebSearch WebFetch
---

Body: system prompt for the subagent.

2e. MCP Servers (if needed)

Write .mcp.json at plugin root. Use ${CLAUDE_PLUGIN_ROOT} for local paths. Use ${ENV_VAR} for secrets. Document required env vars in README.

2f. CONNECTORS.md (if sharing externally)

Only create this if the plugin references external tools by category (~~chat, ~~project tracker).

2g. README.md

Write a plugin-level README covering: overview, components, setup, usage.

Phase 3: Create the Marketplace Wrapper

Wrap the plugin in a marketplace structure. Read references/marketplace-structure.md for the exact marketplace.json format.

Write .claude-plugin/marketplace.json at the repo root:

{
  "name": "marketplace-name",
  "owner": { "name": "Owner Name", "email": "email@example.com" },
  "metadata": { "description": "What this marketplace offers", "version": "1.0.0" },
  "plugins": [
    {
      "name": "plugin-name",
      "source": "./plugin-name",
      "description": "Plugin description",
      "version": "1.0.0",
      "author": { "name": "Author Name" },
      "homepage": "https://github.com/owner/repo",
      "license": "MIT",
      "keywords": ["keyword1", "keyword2"],
      "category": "category-name",
      "tags": ["tag1", "tag2"]
    }
  ]
}

Write a marketplace-level README.md covering:

  • What plugins are available
  • Install instructions for Cowork, Claude Code, and OpenClaw
  • Repo structure diagram
  • How the plugin works (architecture overview)

Phase 4: Generate OpenClaw Compatibility

Every plugin gets an openclaw-install.sh at the repo root. Read references/openclaw-template.md for the template and adaptation rules.

The script translates the Claude plugin structure into an OpenClaw agent workspace:

  • Skills → skills/ directory
  • Agents → agent prompts inside skills/[methodology]/agents/
  • Commands → incorporated into AGENTS.md operating instructions
  • SOUL.md → personality, boundaries, tone (derived from plugin description)
  • AGENTS.md → operating instructions, pipeline logic
  • MEMORY.md → continuity structure

Key adaptation: OpenClaw runs everything in a single context window. Agent prompts that assume independent subagent execution need a "mental isolation" discipline section.

Phase 5: Push to GitHub

Check if a repo already exists or create a new one:

If the user has gh CLI available (Claude Code / local terminal):

# Create new repo
gh repo create owner/repo-name --public --description "Description" --clone
cd repo-name

# ... copy all files ...

git add -A
git commit -m "Initial release: plugin-name marketplace v1.0.0"
git push origin main

If in Cowork (no git access):

Prepare all files in the outputs directory and generate a PowerShell script the user can run locally. The script should:

  1. Clone or create the repo
  2. Copy/restructure files
  3. Commit with a descriptive message
  4. Stop before pushing (let user review)
  5. Print the git push command to run

Always detect the user's OS (check for Windows paths, PowerShell indicators) and generate the appropriate script format (.ps1 for Windows, .sh for Mac/Linux).

If adding to an existing marketplace repo:

  1. Clone the existing repo
  2. Add the new plugin directory at root level
  3. Update marketplace.json to add the new plugin entry
  4. Update the marketplace README
  5. Commit and push

Phase 6: Package as .plugin File

Create a .plugin file (a zip) for direct Cowork installation:

cd /path/to/plugin-dir
zip -r /tmp/plugin-name.plugin . -x "*.DS_Store"
cp /tmp/plugin-name.plugin /path/to/outputs/

Always create the zip in /tmp/ first, then copy to outputs. The .plugin file renders as an interactive card in Cowork where the user can browse files and install with one click.

Phase 7: Present Everything

Deliver to the user:

  1. The .plugin file for immediate Cowork installation
  2. The push script (if in Cowork) or confirmation that the repo is pushed (if in Claude Code)
  3. Install instructions for all three platforms:
    • Cowork: drag the .plugin file, or /plugin marketplace add owner/repo
    • Claude Code: /plugin marketplace add owner/repo then /plugin install name@marketplace
    • OpenClaw: git clone + bash openclaw-install.sh

Adding a Plugin to an Existing Marketplace

When the user already has a marketplace repo and wants to add a new plugin:

  1. Clone the existing repo
  2. Create the new plugin directory at root level
  3. Add the plugin entry to the existing marketplace.json plugins array
  4. Generate/update the OpenClaw install script to handle the new plugin
  5. Update the marketplace README with the new plugin
  6. Commit, push, and package

Converting Existing Work to a Plugin

When the user says "turn this into a plugin" or has skills/agents/workflows already built:

  1. Identify all components in the current session or provided files
  2. Map them to plugin component types (skills → skills/, agents → agents/, etc.)
  3. Ensure frontmatter follows the correct schema (read references/marketplace-structure.md)
  4. Wrap in marketplace structure
  5. Proceed with Phase 5-7

Updating an Existing Plugin

When the user wants to update a published plugin:

  1. Clone the marketplace repo
  2. Make the changes to the plugin files
  3. Bump the version in both plugin.json and marketplace.json
  4. Commit with a descriptive message noting the changes
  5. Push and re-package the .plugin file

Validation Checklist

Before declaring done, verify:

  • plugin.json has name field (kebab-case)
  • marketplace.json has correct source path ("./plugin-name", not nested)
  • Plugin directory is at repo root, not under plugins/
  • All skills have name and description in frontmatter
  • All agents have name, description, and model in frontmatter
  • All commands have description in frontmatter
  • README exists at both marketplace and plugin level
  • OpenClaw install script references correct paths
  • .plugin file contains all expected files
  • No hardcoded absolute paths (use ${CLAUDE_PLUGIN_ROOT} for intra-plugin refs)

推荐文章

更多
PHP时间戳与日期字符串相互转换方法详解

本文介绍PHP中时间数值(Unix时间戳)与日期字符串之间的相互转换方法。通过strtotime和date函数,实现将当前时间、指定日期转换为时间戳,以及将时间戳格式化为可读的日期时间字符串,并提供相关在线计算工具推荐。

2025.11.30 1,031
PHP日期转时间戳时区偏差怎么解决

在 PHP 中将日期字符串转换为时间戳时,若未显式指定时区,默认使用脚本配置的 date.timezone 或系统时区。当服务器时区与业务逻辑预期(如 UTC )不一致时,会产生偏差。解决核心是确保输入字符串携带明确时区信息,或在转换前统一设置时区上下文。

2026.10.24 1,029
PHP跨域配置:怎么安全地允许指定域名而非使用通配符

在 PHP 中安全地允许指定域名跨域,核心是解析请求头中的 Origin ,验证其是否在白名单内,然后动态设置 Access-Control-Allow-Origin 响应头。不要使用通配符 * ,也不要硬编码单一域名。

2025.03.29 1,017
JavaScript中利用replace结合正则实现replaceAll效果

JavaScript原生仅支持replace()进行单次或全局替换,缺乏类似Java的replaceAll()便捷方法。本文总结四种在JS中实现全量替换的方案:使用带g标志的正则、带gm标志的正则、扩展String原型以及split后join。通过对比代码示例,展示各方法的实现细节与适用场景,帮助开发者根据需求选择最优解。

2025.04.29 1,014
OpenAI的Jalapeno芯片未落地,教你分辨300兆瓦算力消息

OpenAI计划在SB Energy租赁的数据中心部署约300兆瓦自研Jalapeno推理芯片,但目前双方仍处于洽谈阶段,交易细节与上线时间表均未公布。本文带你按报道原文核实项目所处阶段,厘清芯片发布、电力功率与实际推理算力的边界,并将融资意向与签约、开工、投运节点分开追踪,避免误将规划容量计入现有算力。

2026.12.02 1,011
PHP实现基础文件上传:HTML表单与$_FILES处理流程

在 HTML 表单中设置 enctype="multipart/form-data" ,并在 PHP 后端通过 $_FILES 数组接收文件,调用 move_uploaded_file() 将临时文件移动到目标目录即可完成上传。

2026.09.07 1,011
Skill 文件
  • SKILL.md
    • Plugin Publisher
    • Why This Matters
    • Quick Reference: What Goes Where
    • Workflow
      • Phase 1: Understand What We're Building
      • Phase 2: Scaffold the Plugin
        • 2a. Plugin manifest
        • 2b. Skills
        • 2c. Commands
        • 2d. Agents
        • 2e. MCP Servers (if needed)
        • 2f. CONNECTORS.md (if sharing externally)
        • 2g. README.md
      • Phase 3: Create the Marketplace Wrapper
      • Phase 4: Generate OpenClaw Compatibility
      • Phase 5: Push to GitHub
      • Phase 6: Package as .plugin File
      • Phase 7: Present Everything
    • Adding a Plugin to an Existing Marketplace
    • Converting Existing Work to a Plugin
    • Updating an Existing Plugin
    • Validation Checklist
  • 项目或源文件

相关 Skill

更多
service-qa-coach service-qa-coach Review support quality for chat, email, phone, social DM, or marketplace service teams. Use when a team needs a QA scorecard, failure-mode analysis, coaching plan, calibration checklist, or service-improvement brief without live ticketing, CRM, or contact-center system access.
高中数学作业批改助手 高中数学作业批改助手 >图片识别 直接读取学生手写作答照片,识别公式、符号、步骤 🧮 自动推导 根据题目自动生成参考答案和评分细则,无需教师预设 📊 逐步给分 每个关键步骤独立评分,体现过程分 📝 结构化报告 输出含识别内容、参考答案、逐步评分、改进建议的完整报告 🗂 批量批改 支持一次性批改多道题,最终汇总得分表
Vibration Analysis Vibration Analysis 分析来自CMS趋势、RMS/峰值、频谱及SCADA报警的风机传动链(主轴、齿轮箱、发电机)振动数据。
Traditional Bone Tool Making Basics Traditional Bone Tool Making Basics Use when you need custom, durable, repairable tools like awls, needles, scrapers, harpoons, or fishing hooks made from local animal bones or antlers and comm...
音频混音工具 音频混音工具 名称:Sound Mixing Tool(标识 sound-mixing-tool) 短简介(≤60字):音乐/音效响度精确对齐 + 融合混音工作流:用 ffmpeg 两段式 loudnorm 把多组素材 LUFS 偏差压到 <0.10,再最小干预融合、导出可进引擎的独立分轨。 标签/关键词:音频混音 响度匹配 LUFS ffmpeg 游戏音频 音效设计 Wwise FMOD 分轨导出 后期处理 触发词:混音 · 响度匹配 · LUFS 对齐 · MIX 版本 · 音乐音效分轨 · 融合 · 不打架 · 不能盖住 适用场景 :游戏音频集成、影视短视频配乐、播客后期