
claude-code-plugin
Claude Code Plugin development, publishing, and marketplace management
- version
- 1.0.0
- GitHub stars
- 26
Add marketplace
/plugin marketplace add miles990/claude-software-skillsRun it inside Claude Code once, then install the plugin below.
Install
/plugin install claude-code-plugin@claude-software-skillsRun it inside Claude Code after adding the marketplace.
Files
Discovered from sourceClaude Code Plugin 完整指南
建立、發布、安裝、更新、同步 Claude Code Plugin 的完整指南
適用場景
- 開發新的 Claude Code Plugin
- 發布 Plugin 到 Marketplace
- 安裝和更新 Plugin
- 管理 Plugin 版本
- 同步最新版本
- 建立自訂 Marketplace
Part 1: Plugin 架構
目錄結構
my-plugin/
├── .claude-plugin/
│ ├── plugin.json # Plugin manifest(必要)
│ └── marketplace.json # Marketplace 索引(選用)
├── commands/ # Slash 命令(在根目錄!)
│ └── my-command.md
├── skills/ # Agent Skills
│ └── my-skill/
│ └── SKILL.md
├── hooks/
│ └── hooks.json # Hook 配置
├── agents/ # Subagent 定義
├── .mcp.json # MCP 伺服器配置
├── CHANGELOG.md
└── README.md
⚠️ 重要:commands/、skills/、hooks/ 必須在根目錄,不要放進 .claude-plugin/
plugin.json 規範
{
"name": "my-plugin",
"version": "1.0.0",
"description": "Plugin 功能描述",
"author": {
"name": "作者名稱",
"email": "email@example.com"
},
"license": "MIT",
"keywords": ["keyword1", "keyword2"]
}
四大組件
| 組件 | 用途 | 觸發方式 | 檔案格式 |
|---|---|---|---|
| Commands | 用戶執行的斜線命令 | /command 手動 | Markdown |
| Skills | 教 Claude 如何做事 | 自動根據上下文 | SKILL.md |
| Hooks | 事件驅動自動化 | 系統事件觸發 | JSON + Shell |
| MCP | 提供工具能力 | Claude 呼叫 | .mcp.json |
Part 2: 發布 Plugin
方式一:GitHub Marketplace(推薦)
Step 1: 建立 marketplace.json
{
"$schema": "https://anthropic.com/claude-code/marketplace.schema.json",
"name": "my-marketplace",
"description": "我的 Plugin 集合",
"owner": {
"name": "username",
"email": "email@example.com"
},
"plugins": [
{
"name": "my-plugin",
"version": "1.0.0",
"source": "./",
"description": "Plugin 描述",
"category": "development"
}
]
}
Step 2: 推送到 GitHub
git add .
git commit -m "feat: add Plugin marketplace format"
git tag -a v1.0.0 -m "Release v1.0.0"
git push origin main
git push origin v1.0.0
Step 3: 用戶安裝
# 添加 marketplace
/plugin marketplace add owner/repo
# 安裝 plugin
/plugin install my-plugin@my-marketplace
方式二:npm 發布
# 1. 在 package.json 中命名(加 claude-plugin- 前綴)
{
"name": "claude-plugin-my-plugin",
"version": "1.0.0"
}
# 2. 發布
npm publish
# 3. 用戶安裝
npm install -g claude-plugin-my-plugin
方式三:直接分享
# 用戶下載後本地安裝
/plugin install /path/to/my-plugin
Part 3: 安裝 Plugin
從 Marketplace 安裝
# 1. 先添加 marketplace(只需一次)
/plugin marketplace add owner/repo
# 2. 列出可用 plugins
/plugin marketplace list
# 3. 安裝 plugin
/plugin install plugin-name@marketplace-name
從 GitHub 直接安裝
# 完整路徑安裝
/plugin install github:owner/repo#path/to/plugin
# 範例
/plugin install github:miles990/evolve-plugin
本地安裝
# 從本地目錄安裝
/plugin install /path/to/my-plugin
查看已安裝
# 列出所有已安裝的 plugins
/plugin list
# 查看詳細資訊
/plugin info plugin-name@marketplace
解除安裝
# 解除安裝特定 plugin
/plugin uninstall plugin-name@marketplace
# 範例
/plugin uninstall evolve@evolve-plugin
# 強制解除安裝(忽略相依性)
/plugin uninstall plugin-name@marketplace --force
解除安裝注意事項:
- 解除安裝不會移除 marketplace,只移除已安裝的 plugin
- 如果其他 plugin 依賴此 plugin,會警告
- 解除安裝後可隨時重新安裝
Part 4: 更新 Plugin
檢查更新
# 檢查所有 plugins 是否有更新
/plugin update --check
# 檢查特定 plugin
/plugin update --check plugin-name@marketplace
執行更新
# 更新特定 plugin
/plugin update plugin-name@marketplace
# 更新所有 plugins
/plugin update --all
自動版本檢查流程
本地版本 → 遠端版本 → 比較
↓ ↓
plugin.json GitHub API / marketplace.json
↓
若遠端較新 → 提示用戶更新
手動版本檢查
# 取得本地版本
cat ~/.claude/plugins/installed_plugins.json | jq '.plugins["plugin@marketplace"][0].version'
# 取得遠端版本
curl -s https://raw.githubusercontent.com/owner/repo/main/.claude-plugin/plugin.json | jq -r '.version'
Part 5: 版本控管
版本位置(必須同步)
| 位置 | 說明 |
|---|---|
.claude-plugin/plugin.json | Plugin manifest |
.claude-plugin/marketplace.json | Marketplace 索引 |
skills/*/SKILL.md | Skill 版本(如適用) |
CHANGELOG.md | 變更記錄 |
| Git tag | 發布標記 |
語意化版本
MAJOR.MINOR.PATCH
│ │ └── Bug fixes(修復)
│ └── 新功能(向後相容)
└── 破壞性變更(不相容)
發布檢查清單
# 更新所有版本位置
- [ ] plugin.json → version
- [ ] marketplace.json → plugins[].version
- [ ] SKILL.md → version: (如適用)
- [ ] CHANGELOG.md → 新條目
- [ ] README.md → 版本徽章
# Git 操作
git add .
git commit -m "chore: bump version to vX.Y.Z"
git tag -a vX.Y.Z -m "Release vX.Y.Z: 描述"
git push origin main
git push origin vX.Y.Z
CHANGELOG.md 格式
## [1.1.0] - 2026-01-16
### Added
- 新功能描述
### Changed
- 變更描述
### Fixed
- 修復描述
### Security
- 安全修復
Part 6: 同步最新版本
從主 repo 同步到獨立 plugin repo
當 plugin 是從主專案分離出來時:
# 1. 複製 skills 目錄
cp -r /path/to/main-project/skills /path/to/plugin-repo/
# 2. 更新版本
# 編輯 plugin.json, marketplace.json
# 3. 提交並推送
cd /path/to/plugin-repo
git add -A
git commit -m "chore: sync with main-project vX.Y.Z"
git push origin main
同步腳本範例
#!/bin/bash
# sync-plugin.sh - 同步 plugin 到獨立 repo
MAIN_REPO="$1"
PLUGIN_REPO="$2"
VERSION="$3"
# 複製 skills
rm -rf "$PLUGIN_REPO/skills"
cp -r "$MAIN_REPO/skills" "$PLUGIN_REPO/"
# 更新版本
sed -i '' "s/\"version\": \".*\"/\"version\": \"$VERSION\"/" \
"$PLUGIN_REPO/.claude-plugin/plugin.json"
# 提交
cd "$PLUGIN_REPO"
git add -A
git commit -m "chore: sync with main-project v$VERSION"
git push origin main
自動同步(使用 GitHub Actions)
# .github/workflows/sync-plugin.yml
name: Sync Plugin
on:
push:
branches: [main]
paths:
- 'skills/**'
- 'evolve-plugin/**'
jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Sync to plugin repo
run: |
# Clone plugin repo
git clone https://github.com/owner/plugin-repo.git
# Copy files
cp -r skills/ plugin-repo/
cp evolve-plugin/.claude-plugin/* plugin-repo/.claude-plugin/
# Push
cd plugin-repo
git add -A
git commit -m "chore: auto-sync from main repo"
git push
Part 7: Marketplace 管理
建立自己的 Marketplace
Step 1: 建立 marketplace.json
{
"$schema": "https://anthropic.com/claude-code/marketplace.schema.json",
"name": "my-marketplace",
"description": "我的 Plugin 集合",
"owner": {
"name": "username"
},
"plugins": [
{
"name": "plugin-a",
"version": "1.0.0",
"source": "./plugin-a",
"description": "Plugin A 描述",
"category": "development"
},
{
"name": "plugin-b",
"version": "2.0.0",
"source": "./plugin-b",
"description": "Plugin B 描述",
"category": "productivity"
}
]
}
Step 2: 組織目錄結構
my-marketplace/
├── .claude-plugin/
│ └── marketplace.json
├── plugin-a/
│ ├── .claude-plugin/
│ │ └── plugin.json
│ ├── commands/
│ └── skills/
├── plugin-b/
│ ├── .claude-plugin/
│ │ └── plugin.json
│ └── commands/
└── README.md
管理已添加的 Marketplace
# 列出已添加的 marketplaces
/plugin marketplace list
# 添加新 marketplace
/plugin marketplace add owner/repo
# 移除 marketplace
/plugin marketplace remove marketplace-name
# 更新 marketplace 索引
/plugin marketplace refresh
已知 Marketplaces 儲存位置
~/.claude/plugins/known_marketplaces.json
Part 8: Hooks 開發
Hook 事件類型
| 事件 | 時機 | 用途 |
|---|---|---|
| PreToolUse | 工具執行前 | 阻擋/修改工具調用 |
| PostToolUse | 工具執行後 | 後處理、通知 |
| UserPromptSubmit | 用戶輸入時 | 輸入驗證 |
| SessionStart | 會話開始 | 初始化 |
| SessionEnd | 會話結束 | 清理 |
| Stop | AI 完成回應 | 後處理 |
| SubagentStop | Subagent 完成 | 子任務處理 |
hooks.json 配置
{
"hooks": [
{
"type": "command",
"event": "PreToolUse",
"command": "./hooks/protect-env.sh"
},
{
"type": "command",
"event": "PostToolUse",
"command": "./hooks/format-code.sh"
},
{
"type": "command",
"event": "SessionStart",
"command": "./hooks/init.sh"
}
]
}
範例 Hook:保護敏感檔案
#!/bin/bash
# hooks/protect-env.sh
FILE_PATH=$(echo "$1" | jq -r '.tool.input.path // .tool.input.file_path // empty')
if [[ "$FILE_PATH" =~ \.(env|key|secret|credentials)$ ]]; then
echo '{"decision": "block", "reason": "Protected file type"}' >&2
exit 1
fi
exit 0
範例 Hook:自動格式化
#!/bin/bash
# hooks/format-code.sh
FILE_PATH=$(echo "$1" | jq -r '.tool.input.path // empty')
if [[ "$FILE_PATH" =~ \.(ts|tsx|js|jsx)$ ]]; then
prettier --write "$FILE_PATH" 2>/dev/null
fi
exit 0
Part 9: 常見錯誤與解決
Sharp Edges
SE-1: 目錄結構錯誤
- 嚴重度: critical
- 症狀:
/plugin list顯示 plugin 但命令不存在 - 原因: commands/、skills/ 放進 .claude-plugin/ 目錄
- 解決: 把所有組件目錄移到 plugin 根目錄
SE-2: 版本不同步
- 嚴重度: high
- 症狀:
/plugin list與 CHANGELOG 版本不符 - 原因: plugin.json、marketplace.json 版本不一致
- 解決: 建立發布 checklist,每次都檢查所有位置
SE-3: Hook 權限過高
- 嚴重度: high
- 症狀: 意外的檔案變更、數據丟失
- 原因: Hook 以用戶權限執行,範圍太廣
- 解決: 精確指定 Hook 目標,加入安全檢查
SE-4: MCP Prompt Injection
- 嚴重度: critical
- 症狀: Claude 執行意外操作
- 原因: MCP 從不信任來源獲取內容
- 解決: 只使用信任來源的 MCP
常見錯誤對照表
| 錯誤 | 正確做法 |
|---|---|
| 把 commands/ 放進 .claude-plugin/ | 放在 plugin 根目錄 |
| 版本號不一致 | 同步更新所有位置 |
| Hook 範圍太廣 | 精確指定目標工具 |
| 忘記 git tag | 每次發布都要 tag |
| 直接上線未測試 | 先用 --plugin-dir 測試 |
Part 10: 本地測試
# 測試 plugin(不安裝)
claude-code --plugin-dir /path/to/my-plugin
# 驗證結構
tree /path/to/my-plugin
# 檢查 plugin.json 語法
cat /path/to/my-plugin/.claude-plugin/plugin.json | jq .
# 驗證 hooks
cat /path/to/my-plugin/hooks/hooks.json | jq .
官方文檔
- Plugins
- Plugins Reference
- Plugin Marketplaces
- Hooks Guide
- Hooks Reference
- Skills
- MCP
- Subagents
- Slash Commands
延伸資源
- Claude Code GitHub
- Official Plugins
- evolve-plugin 範例:參考
evolve-plugin/.claude-plugin/結構
From the miles990/claude-software-skills README
Claude Software Skills
55 modular software development skills for Claude Code - from architecture to deployment
┌─────────────────────────────────────────────────────────────────┐
│ Claude Software Skills │
│ │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ Software │ │ Software │ │ Development │ │
│ │ Design │ │ Engineering │ │ Stacks │ │
│ │ 6 │ │ 8 │ │ 8 │ │
│ └──────────────┘ └──────────────┘ └──────────────┘ │
│ │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ Tools & │ │ Domain │ │ Programming │ │
│ │ Integrations │ │ Applications │ │ Languages │ │
│ │ 9 │ │ 12 │ │ 12 │ │
│ └──────────────┘ └──────────────┘ └──────────────┘ │
│ │
│ AI 自動識別任務 → 載入對應領域知識 │
└─────────────────────────────────────────────────────────────────┘
Features
- MCP Compatible - Works with Claude Code, Cursor, and other MCP clients
- Semantic Search - Claude automatically finds relevant skills for your task
- Cross-Domain Integration - Skills work together seamlessly
- Best Practices Built-In - Each skill includes patterns and anti-patterns
- Modular Architecture - Use only what you need
- Sharp Edges - Proactive warnings about common pitfalls with detection patterns
- Validations - Executable code quality rules with regex/ast patterns
- Collaboration - Skills declare relationships for smart delegation and context passing
Installation
Plugin Marketplace (Recommended)
# 1. Add marketplace (GitHub format: owner/repo)
/plugin marketplace add miles990/claude-software-skills
# 2. Open plugin management interface, view available plugins in Discover tab
/plugin
# 3. Install specific skills (choose what you need)
/plugin install frontend@claude-software-skills
/plugin install backend@claude-software-skills
/plugin install api-design@claude-software-skills
# Or mention skill name in conversation, Claude will auto-load
Supported GitHub formats:
# Short format (recommended)
/plugin marketplace add miles990/claude-software-skills
# HTTPS URL
/plugin marketplace add https://github.com/miles990/claude-software-skills.git
# Specify branch or tag
/plugin marketplace add miles990/claude-software-skills#main
Plugin commands:
| Command | Description |
|---|---|
/plugin | Open interactive plugin management interface |
/plugin install <name>@<marketplace> | Install specific plugin |
/plugin disable <name>@<marketplace> | Temporarily disable plugin |
/plugin uninstall <name>@<marketplace> | Completely remove plugin |
Available Skills
Software Design (6 skills)
| Skill | Description |
|---|---|
architecture-patterns | Software architecture patterns and best practices |
design-patterns | Classic and modern software design patterns |
api-design | RESTful, GraphQL, gRPC, and API best practices |
system-design | Scalability, availability, and distributed systems design |
data-design | Data modeling, schema design, and data architecture |
ux-principles | User experience design principles for developers |
Software Engineering (8 skills)
| Skill | Description |
|---|---|
code-quality | Clean code principles, SOLID, and code review practices |
testing-strategies | Unit, integration, E2E testing and TDD practices |
devops-cicd | CI/CD pipelines, infrastructure as code, and deployment |
performance-optimization | Profiling, optimization techniques, and best practices |
security-practices | OWASP Top 10, authentication, and secure coding |
reliability-engineering | SRE principles, observability, and incident management |
documentation | Technical writing, API docs, and documentation best practices |
internationalization | i18n/l10n architecture design and multi-language support |
Development Stacks (8 skills)
| Skill | Description |
|---|---|
frontend | Modern frontend with React, Vue, and web technologies |
backend | Backend with Node.js, Express, NestJS, and server patterns |
mobile | Mobile with React Native, Flutter, and native patterns |
database | Database design, SQL, NoSQL, and data management |
cloud-platforms | AWS, GCP, Azure services and cloud-native development |
ai-ml-integration | AI/ML APIs, LLM integration, and intelligent apps |
realtime-systems | WebSocket, real-time communication, event-driven |
edge-iot | Edge computing, IoT protocols, and embedded systems |
Tools & Integrations (9 skills)
| Skill | Description |
|---|---|
git-workflows | Git version control, branching, and collaboration |
project-management | Agile, Scrum, Kanban, and issue tracking |
development-environment | IDE setup, dev containers, and local development |
monitoring-logging | Application monitoring, logging, and alerting |
api-tools | API testing, documentation, and development tools |
automation-scripts | Build automation, task runners, and scripting |
auto-dev-setup | Auto-Dev workflow for Human-in-the-Loop automation |
claude-code-plugin | Claude Code Plugin development and marketplace management |
claude-code-sdk | Claude Code SDK for AI-powered applications |
Domain Applications (12 skills)
| Skill | Description |
|---|---|
application-patterns | Common application development patterns |
e-commerce | E-commerce platforms, payments, shopping cart |
saas-platforms | SaaS architecture, multi-tenancy, subscriptions |
content-platforms | CMS, blogging platforms, content management |
communication-systems | Email, notifications, messaging systems |
developer-tools | CLI tools, SDKs, developer experience |
game-development | Game development patterns and architectures |
flame | Flame Engine 2D game development for Flutter |
flame-core | Flame Engine core - components, input, collision |
flame-systems | Flame Engine 14 game systems |
flame-templates | Game templates - RPG, Platformer, Roguelike |
desktop-apps | Desktop apps with Electron and Tauri |
Programming Languages (12 skills)
| Skill | Description |
|---|---|
javascript-typescript | Modern JavaScript and TypeScript patterns |
python | Python programming patterns and best practices |
go | Go programming patterns and idioms |
rust | Rust patterns and ownership concepts |
java-kotlin | Java and Kotlin programming patterns |
csharp-dotnet | C# and .NET development patterns |
cpp | Modern C++ programming patterns and idioms |
ruby | Ruby programming patterns and idioms |
php | Modern PHP programming patterns |
swift | Swift patterns for iOS and macOS |
shell-bash | Shell scripting and Bash programming |
sql | SQL patterns for database querying and design |
Other Installation Methods
Clone to Skills Directory
# Clone to your skills directory
git clone https://github.com/miles990/claude-software-skills.git ~/.claude/skills/software-skills
Claude will automatically discover and use the skills when relevant to your tasks.
With MCP Server
This repository is compatible with claude-skills-mcp:
# Install the MCP server
pip install claude-skills-mcp
# Add this repository as a skill source
# The server will load skills from ~/.claude/skills/
Cursor IDE
Add to your Cursor MCP settings:
{
"mcpServers": {
"software-skills": {
"command": "npx",
"args": ["-y", "claude-skills-mcp"],
"env": {
"SKILLS_PATH": "/path/to/claude-software-skills"
}
}
}
}
Manual Reference
Simply clone and reference the SKILL.md files in your prompts:
git clone https://github.com/miles990/claude-software-skills.git
Auto-Dev: Automated Development Workflow
One-click setup for GitHub Actions automated development workflow, let Claude help you complete development tasks.
Quick Setup
Using API Key:
curl -fsSL https://raw.githubusercontent.com/miles990/claude-software-skills/main/scripts/setup-auto-dev-apikey.sh | bash
Using Claude Max (OAuth):
curl -fsSL https://raw.githubusercontent.com/miles990/claude-software-skills/main/scripts/setup-auto-dev-max.sh | bash
Post-Installation Setup
| Version | Setup Method |
|---|---|
| API Key | Get Key from console.anthropic.com, set in GitHub Secrets ANTHROPIC_API_KEY |
| Claude Max | Run claude /install-github-app for auto OAuth Token setup |
Usage
- Issue Trigger: Create Issue → Add
auto-devlabel - Comment Trigger: Comment
@claude [instruction]on any Issue/PR
Detailed docs: AUTO-DEV.md
Usage Examples
User: Help me design a microservices architecture for an e-commerce platform
Claude: [Automatically uses architecture-patterns + e-commerce + api-design skills]
User: Review this Python code for performance issues
Claude: [Automatically uses python + performance-optimization + code-quality skills]
User: Set up CI/CD for a React + Node.js monorepo
Claude: [Automatically uses devops-cicd + frontend + backend + git-workflows skills]
Directory Structure
claude-software-skills/
├── .claude-plugin/ # Plugin configuration
│ └── marketplace.json # Lists all 55 skills as individual plugins
├── .github/
│ └── workflows/ # CI/CD automation
├── software-design/ # Architecture & design skills
├── software-engineering/ # Development practices
├── development-stacks/ # Tech stack skills
├── tools-integrations/ # Developer tools
├── domain-applications/ # Domain-specific patterns
├── programming-languages/ # Language-specific skills
├── docs/
│ ├── SKILL-TEMPLATE.md # Template for new skills
│ └── software-skills.md
├── CONTRIBUTING.md
├── LICENSE
└── README.md
How It Works
Each skill module contains a SKILL.md file with:
- Metadata - Name, description, tags for semantic search
- Key Concepts - Core knowledge and terminology
- Best Practices - Recommended approaches with examples
- Common Pitfalls - What to avoid and why
- Patterns & Anti-patterns - Do's and don'ts with code
- Tools & Resources - Recommended tools and references
- Decision Guide - When to use this skill
When you describe a task, Claude:
- Searches for relevant skills using semantic matching
- Loads the appropriate SKILL.md files
- Applies the knowledge to your specific context
- Follows best practices while avoiding common pitfalls
Contributing
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
Adding a New Skill
- Create a directory under the appropriate category
- Add a
SKILL.mdfollowing our template - Include practical examples and best practices
- Submit a pull request
License
MIT License - See LICENSE for details.
Related Projects
- claude-domain-skills - Non-technical domain skills
- claude-skills-mcp - MCP server for skill discovery
Built for developers, by developers, with Claude
Details
- Marketplace
- miles990/claude-software-skills
- Source
- tools-integrations/claude-code-plugin
- Category
- Community
- Listed since
- Apr 6, 2026
More from miles990/claude-software-skills
All 56- claude-code-sdkv1.0.0
- cloud-platformsv1.0.0
- code-qualityv1.0.0
- communication-systemsv1.0.0
- content-platformsv1.0.0
- cppv1.0.0
- csharp-dotnetv1.0.0
- data-designv1.0.0
- databasev1.0.0
- design-patternsv1.0.0
- desktop-appsv1.0.0
- developer-toolsv1.0.0
- development-environmentv1.0.0
- devops-cicdv1.0.0
- documentationv1.0.0
- e-commercev1.0.0
- edge-iotv1.0.0
- flamev1.0.0
- flame-corev1.0.0
- flame-systemsv1.0.0
- flame-templatesv1.0.0
- frontendv1.0.0
- game-developmentv1.0.0
- git-workflowsv1.0.0
Similar to claude-code-plugin
More Skill & Plugin Building
claude-code-sdkmiles990/claude-software-skills26 starsClaude Code SDK integration for AI-powered applications
marketplace-opsopenshift-eng/ai-helpers123 starsMaintenance commands for Claude Code plugin marketplaces
plugin-devanthropics/claude-code156.1K starsComprehensive toolkit for developing Claude Code plugins. Includes 7 expert skills covering hooks, MCP integration, commands, agents, and best practices. AI-ass
unityanthropics/claude-plugins-official47.9K starsUnity's official plugin for Claude Code, with curated skills for game development, monetization, and performance optimization.
appwriteanthropics/claude-plugins-official47.9K starsAppwrite tools for Claude Code, including SDK skills, Appwrite MCP servers, and deployment commands.
ruflo-plugin-creatorruvnet/ruflo82.2K starsScaffold, validate, and publish new Claude Code plugins with proper structure