Token导航 LogoToken导航

Agent Skill · 研究检索

creating-a-plugin(创建插件)

creating-a-plugin 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

creating-a-plugin 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为执行命令;许可证信息还不明确,第三方扫描有提醒项,按安装量在研究检索类的 73,675 个 Skill 里排第 66,030。

总安装 269周安装 11GitHub Stars 176下载 86核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:creating-a-plugin(创建插件)
来源仓库:https://github.com/ed3dai/ed3d-plugins
仓库路径:skills/creating-a-plugin
安装命令:
npx skills add https://github.com/ed3dai/ed3d-plugins --skill creating-a-plugin
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/ed3dai/ed3d-plugins --skill creating-a-plugin

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

该技能指导如何打包和分发跨项目的可复用组件,包括命令、代理、钩子等。适用于拥有通用功能模块并希望标准化发布到用户级或项目级插件目录时。支持开发阶段任意位置安装,最终可部署至 ~/.claude/plugins/ 或 .claude/plugins/。

安装方式:GitHub 仓库,使用 npx 命令添加;注意插件结构与分发规范遵循。creating-a-plugin 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/creating-a-plugin

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/ed3dai/ed3d-plugins --skill creating-a-plugin;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要执行命令,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

creating-a-plugin 怎么安装?

在终端执行 npx skills add https://github.com/ed3dai/ed3d-plugins --skill creating-a-plugin。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

creating-a-plugin 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

creating-a-plugin 需要什么权限?

权限级别是执行命令。安装流程涉及命令执行,可能通过 npx skills add https://github.com/ed3dai/ed3d-plugins --skill creating-a-plugin 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

creating-a-plugin 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

creating-a-plugin 用的人多吗?

公开数据是累计安装 269 次,近一周安装 11 次,下载 86 次,GitHub 176 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

creating-a-plugin 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 需要执行命令,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 不能接受 Skill 在你机器上执行命令的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
creating-a-plugin

创建插件 · 本页

269176执行命令未明确有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Creating a Plugin

Overview

A Claude Code plugin packages reusable components (commands, agents, skills, hooks, MCP servers) for distribution. Create a plugin when you have components that work across multiple projects.

Don't create a plugin for:

  • Project-specific configurations (use .claude/ in project root)
  • One-off scripts or commands
  • Experimental features still in development

Plugin storage locations:

  • Development: Anywhere during development, installed via file:/// path
  • User-level: ~/.claude/plugins/ (after installation)
  • Project-level: .claude/plugins/ (project-specific installations)

Quick Start Checklist

Minimal viable plugin:

  1. Create directory: my-plugin/
  2. Create .claude-plugin/plugin.json with at minimum: {"name": "my-plugin"}
  3. Add components (commands, agents, skills, hooks, or MCP servers)
  4. Test locally: /plugin install file:///absolute/path/to/my-plugin
  5. Reload: /plugin reload

Directory Structure

my-plugin/
�� .claude-plugin/
   �� plugin.json              # Required: plugin manifest
�� commands/                    # Optional: slash commands
   �� my-command.md
�� agents/                      # Optional: specialized subagents
   �� my-agent.md
�� skills/                      # Optional: reusable techniques
   �� my-skill/
       �� SKILL.md
�� hooks/                       # Optional: event handlers
   �� hooks.json
�� .mcp.json                    # Optional: MCP server configs
�� README.md                    # Recommended: documentation

Critical: The .claude-plugin/ directory with plugin.json inside must exist at plugin root.

Component Reference

ComponentLocationFile FormatWhen to Use
Commandscommands/*.mdMarkdown + YAML frontmatterCustom slash commands for repetitive tasks
Agentsagents/*.mdMarkdown + YAML frontmatterSpecialized subagents for complex workflows
Skillsskills/*/SKILL.mdMarkdown + YAML frontmatterReusable techniques and patterns
Hookshooks/hooks.jsonJSONEvent handlers (format code, validate, etc.)
MCP Servers.mcp.jsonJSONExternal tool integrations

plugin.json Format

Minimal valid manifest:

{
  "name": "my-plugin"
}

Complete annotated manifest:

{
  "name": "my-plugin",                    // Required: kebab-case identifier
  "version": "1.0.0",                     // Recommended: semantic versioning
  "description": "What this plugin does", // Recommended: brief description

  "author": {                             // Optional but recommended
    "name": "Your Name",
    "email": "you@example.com",
    "url": "https://github.com/yourname"
  },

  "homepage": "https://github.com/yourname/my-plugin",
  "repository": "https://github.com/yourname/my-plugin",
  "license": "MIT",
  "keywords": ["productivity", "automation"],

  "commands": [                           // Optional: explicit command paths
    "./commands/cmd1.md",
    "./commands/cmd2.md"
  ],

  "agents": [                             // Optional: explicit agent paths
    "./agents/agent1.md"
  ],

  "hooks": [                              // Optional: inline hooks
    {
      "event": "PostToolUse",
      "matcher": "Edit|Write",
      "command": "npx prettier --write \"$CLAUDE_FILE_PATHS\""
    }
  ],

  "mcpServers": {                         // Optional: inline MCP configs
    "my-server": {
      "command": "${CLAUDE_PLUGIN_ROOT}/servers/my-server",
      "args": ["--port", "8080"],
      "env": {
        "API_KEY": "${API_KEY}"
      }
    }
  }
}

Key points:

  • name is required, everything else is optional
  • Use ${CLAUDE_PLUGIN_ROOT} to reference plugin directory
  • Commands/agents auto-discovered from commands/ and agents/ directories if not listed explicitly
  • Skills auto-discovered from skills/*/SKILL.md pattern

Creating Commands

File location: commands/my-command.md creates /my-command slash command

Nested commands: commands/feature/sub-command.md creates /plugin-name:feature:sub-command

Template:

---
description: Brief description of what this command does
allowed-tools: Read, Grep, Glob, Bash
model: sonnet
argument-hint: "[file-path]"
---

# Command Name

Your command prompt goes here.

You can use:
- $1, $2, etc. for positional arguments
- $ARGUMENTS for all arguments as single string
- @filename to include file contents
- !bash command to execute shell commands

Example implementation instructions...

Frontmatter fields:

  • description - Brief description shown in /help
  • allowed-tools - Comma-separated list: Read, Grep, Glob, Bash, Edit, Write, TodoWrite, Task
  • model - Optional: haiku, sonnet, or opus (defaults to user's setting)
  • argument-hint - Optional: shown in help text
  • disable-model-invocation - Optional: true to prevent auto-run

Complete example (commands/review-pr.md):

---
description: Review pull request for security and best practices
allowed-tools: Read, Grep, Glob, Bash
model: opus
argument-hint: "[pr-number]"
---

# Pull Request Review

Review pull request #$1 for:

1. Security vulnerabilities
2. Performance issues
3. Best practices compliance
4. Error handling

Steps:
1. Use Bash to run: gh pr diff $1
2. Use Read to examine changed files
3. Use Grep to search for common anti-patterns
4. Provide structured feedback with file:line references

Focus on critical issues first.

Creating Agents

File location: agents/code-reviewer.md creates agent named "code-reviewer"

Template:

---
name: agent-name
description: When and why to use this agent (critical for auto-delegation)
tools: Read, Edit, Write, Grep, Glob, Bash
model: opus
---

# Agent Name

Detailed instructions and system prompt for this agent.

## Responsibilities
- Task 1
- Task 2

## Tools Available
- Read: File operations
- Grep: Code search
- Bash: Shell commands

## Workflow
1. Step 1
2. Step 2

Frontmatter fields:

  • name - Required: kebab-case identifier
  • description - Required: Max 1024 chars, used for auto-delegation
  • tools - Comma-separated list of allowed tools
  • model - Optional: haiku, sonnet, or opus

Complete example (agents/security-auditor.md):

---
name: security-auditor
description: Use when reviewing code for security vulnerabilities, analyzing authentication flows, or checking for common security anti-patterns like SQL injection, XSS, or insecure dependencies
tools: Read, Grep, Glob, Bash
model: opus
---

# Security Auditor Agent

You are a security expert specializing in web application security and secure coding practices.

## Your Responsibilities

1. Identify security vulnerabilities (SQL injection, XSS, CSRF, etc.)
2. Review authentication and authorization logic
3. Check for insecure dependencies
4. Verify input validation and sanitization
5. Review cryptographic implementations

## Workflow

1. **Scan for patterns:** Use Grep to find common vulnerability patterns
2. **Read suspicious code:** Use Read to examine flagged files
3. **Check dependencies:** Use Bash to run security audit tools
4. **Report findings:** Provide severity ratings and remediation steps

## Common Vulnerability Patterns

- SQL injection: String concatenation in queries
- XSS: Unescaped user input in templates
- CSRF: Missing CSRF tokens
- Auth bypass: Missing authorization checks
- Hardcoded secrets: API keys, passwords in code

## Reporting Format

For each finding:
- **Severity:** Critical/High/Medium/Low
- **Location:** `file:line`
- **Issue:** What's vulnerable
- **Impact:** What attacker could do
- **Fix:** How to remediate

Creating Skills

REQUIRED SUB-SKILL: Use writing-skills for complete guidance on skill structure, testing, and deployment.

Skills follow a specific structure.

File location: skills/my-skill/SKILL.md

Minimal template:

---
name: my-skill-name
description: Use when [specific triggers] - [what it does]
---

# Skill Name

## Overview
Core principle in 1-2 sentences.

## When to Use
- Symptom 1
- Symptom 2
- When NOT to use

## Quick Reference
[Table or bullets for common operations]

## Implementation
[Code examples, patterns]

## Common Mistakes
[What goes wrong + fixes]

Key principles:

  • name uses only letters, numbers, hyphens (no special chars)
  • description starts with "Use when..." in third person
  • Keep token-efficient (<500 words if frequently loaded)
  • One excellent example beats many mediocre ones
  • Use writing-skills skill for complete guidance

Creating Hooks

File location: hooks/hooks.json or inline in plugin.json

Standalone hooks file:

{
  "hooks": [
    {
      "event": "PreToolUse",
      "matcher": "Bash",
      "command": "echo 'About to run: $CLAUDE_TOOL_NAME'"
    },
    {
      "event": "PostToolUse",
      "matcher": "Edit|Write",
      "command": "npx prettier --write \"$CLAUDE_FILE_PATHS\""
    },
    {
      "event": "SessionStart",
      "matcher": "*",
      "command": "${CLAUDE_PLUGIN_ROOT}/scripts/setup.sh"
    }
  ]
}

Hook events:

  • PreToolUse - Before tool execution (can block)
  • PostToolUse - After tool execution
  • UserPromptSubmit - When user submits prompt
  • Stop - When Claude finishes responding
  • SessionStart - Session initialization
  • SessionEnd - Session cleanup
  • Notification - On Claude Code notifications
  • SubagentStop - When subagent completes
  • PreCompact - Before context compaction

Matcher patterns:

  • Specific tool: "Bash"
  • Multiple tools: "Edit|Write"
  • All tools: "*"

Environment variables:

  • $CLAUDE_EVENT_TYPE - Event type
  • $CLAUDE_TOOL_NAME - Tool being used
  • $CLAUDE_TOOL_INPUT - Tool input (JSON)
  • $CLAUDE_FILE_PATHS - Space-separated file paths

Creating MCP Server Configs

File location: .mcp.json at plugin root or inline in plugin.json

Standalone.mcp.json:

{
  "mcpServers": {
    "database-tools": {
      "command": "${CLAUDE_PLUGIN_ROOT}/servers/db-server",
      "args": ["--config", "${CLAUDE_PLUGIN_ROOT}/config.json"],
      "env": {
        "DB_URL": "${DB_URL}",
        "API_KEY": "${API_KEY:-default-key}"
      }
    },
    "web-scraper": {
      "command": "npx",
      "args": ["web-mcp-server", "--port", "3000"]
    }
  }
}

Configuration fields:

  • command - Executable path or command name
  • args - Array of arguments
  • env - Environment variables (supports ${VAR} or ${VAR:-default})

Special variable:

  • ${CLAUDE_PLUGIN_ROOT} - Resolves to plugin root directory

Setting Up Dev Marketplace

For local development, create a marketplace to organize your plugins:

File: dev-marketplace/.claude-plugin/marketplace.json

{
  "$schema": "https://anthropic.com/claude-code/marketplace.schema.json",
  "name": "my-dev-marketplace",
  "version": "1.0.0",
  "owner": {
    "name": "Your Name",
    "email": "you@example.com"
  },
  "metadata": {
    "description": "Local development marketplace for my plugins",
    "pluginRoot": "./plugins"
  },
  "plugins": [
    {
      "name": "my-plugin-one",
      "version": "1.0.0",
      "description": "What this plugin does",
      "source": "./plugins/my-plugin-one",
      "category": "development",
      "author": {
        "name": "Your Name",
        "email": "you@example.com"
      }
    },
    {
      "name": "my-plugin-two",
      "version": "0.1.0",
      "description": "Experimental plugin",
      "source": "./plugins/my-plugin-two",
      "category": "productivity",
      "strict": false
    }
  ]
}

Directory structure:

dev-marketplace/
�� .claude-plugin/
   �� marketplace.json
�� plugins/
    �� my-plugin-one/
       �� .claude-plugin/
          �� plugin.json
       �� commands/
    �� my-plugin-two/
        �� .claude-plugin/
           �� plugin.json
        �� agents/

Install dev marketplace:

/plugin marketplace add file:///absolute/path/to/dev-marketplace
/plugin browse
/plugin install my-plugin-one@my-dev-marketplace

Plugin entry fields:

  • name - Required: plugin identifier
  • source - Required: relative path or git URL
  • version - Recommended: semantic version
  • description - Recommended: brief description
  • category - Optional: development, productivity, security, etc.
  • author - Optional: author details
  • strict - Optional: default true (requires plugin.json), set false to use marketplace entry as manifest

Source formats:

// Local relative path
"source": "./plugins/my-plugin"

// GitHub repository
"source": {
  "source": "github",
  "repo": "owner/repo"
}

// Git URL
"source": {
  "source": "url",
  "url": "https://gitlab.com/team/plugin.git"
}

Naming Conventions

Use kebab-case everywhere:

  • Plugin names: my-awesome-plugin
  • Command names: review-code
  • Agent names: security-auditor
  • Skill names: test-driven-development

Filename mapping:

  • commands/my-command.md � /my-command
  • commands/project/build.md � /plugin-name:project:build
  • agents/code-reviewer.md � agent name code-reviewer
  • skills/my-skill/SKILL.md � skill name my-skill

Testing Locally

Development workflow:

  1. Create plugin structure: mkdir -p my-plugin/.claude-plugin echo '{"name":"my-plugin"}' > my-plugin/.claude-plugin/plugin.json
  2. Add components (commands, agents, skills)
  3. Install locally: /plugin install file:///absolute/path/to/my-plugin
  4. Test functionality: /my-command arg1 arg2 # Use Task tool with your agent # Use Skill tool with your skill
  5. Iterate:

- Edit plugin files - Run /plugin reload - Test again

Using dev marketplace:

  1. Create marketplace structure
  2. Add marketplace: /plugin marketplace add file:///absolute/path/to/dev-marketplace
  3. Browse and install: /plugin browse /plugin install my-plugin@my-dev-marketplace

Common Mistakes

IssueSymptomFix
Missing .claude-plugin/Plugin not recognizedCreate .claude-plugin/plugin.json at root
Invalid plugin.jsonParse error on loadValidate JSON syntax, ensure name field exists
Wrong tool nameTool not available in command/agentCheck spelling: Read, Grep, Glob, Bash, Edit, Write
Description too longWarning or truncationKeep under 1024 characters total
Not using third personDescription sounds wrongUse "Use when..." not "I will..."
Absolute paths in plugin.jsonBreaks on other machinesUse relative paths or ${CLAUDE_PLUGIN_ROOT}
Forgetting /plugin reloadChanges not visibleRun /plugin reload after edits
Command not foundSlash command doesn't workCheck filename matches expected command, reload plugin
Agent not auto-delegatedAgent never gets usedImprove description with specific triggers and symptoms

Distribution

For production/team use:

  1. Push plugin to Git repository (GitHub, GitLab, etc.)
  2. Create or update team's marketplace repository
  3. Add plugin entry to marketplace.json
  4. Team members install: /plugin marketplace add user-or-org/marketplace-repo /plugin install plugin-name@marketplace-name

For public distribution:

Refer to official Claude Code documentation for publishing to public marketplaces.

Reference Links

平台分布

Codex

35.01%
按下载量换算30

Claude

30.25%
按下载量换算26

Cursor

21.27%
按下载量换算18

Gemini CLI

9.24%
按下载量换算8

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/ed3dai/ed3d-plugins --skill creating-a-plugin 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills