Plugin tối giản
Bộ khung nhỏ nhất của một plugin Claude Code, gồm file manifest và một skill. Dùng để đóng gói các skill, subagent hay hook của team rồi chia sẻ qua marketplace.
Đã thử với Claude Code 2.1.329
Chỗ cần điền
{{plugin_name}}Tên plugin, viết thường nối bằng gạch ngangví dụteam-toolkit{{author}}Tên tác giả hoặc teamví dụAcme Platform Team
{{plugin_name}}/.claude-plugin/plugin.json
{
"name": "{{plugin_name}}",
"version": "0.1.0",
"description": "Shared skills for our team",
"author": { "name": "{{author}}" }
}
team-toolkit/.claude-plugin/plugin.json
{
"name": "team-toolkit",
"version": "0.1.0",
"description": "Shared skills for our team",
"author": { "name": "Acme Platform Team" }
}
{{plugin_name}}/skills/hello/SKILL.md
---
name: hello
description: Checks that the {{plugin_name}} plugin is installed. Use when the user asks whether the team plugin works.
---
Reply with one line: "{{plugin_name}} is installed", followed by the list of skills this
plugin provides.
team-toolkit/skills/hello/SKILL.md
---
name: hello
description: Checks that the team-toolkit plugin is installed. Use when the user asks whether the team plugin works.
---
Reply with one line: "team-toolkit is installed", followed by the list of skills this
plugin provides.
Lưu ý
- Thử plugin cục bộ bằng `claude --plugin-dir ./{{plugin_name}}`, rồi gọi skill bằng /{{plugin_name}}:hello.
- Thêm subagent vào thư mục `agents/`, hook vào `hooks/hooks.json`; Claude Code tự tìm theo bố cục chuẩn.