Files
claude-code-rust/claude-code-main (2)/claude-code-main/plugins/plugin-dev/skills/plugin-structure/examples/minimal-plugin.md
T
Serendipity 1a1254f045
CI - 构建、测试和质量检查 / Rust 代码检查 (push) Has been cancelled
CI - 构建、测试和质量检查 / 单元测试 (push) Has been cancelled
CI - 构建、测试和质量检查 / 代码格式检查 (push) Has been cancelled
CI - 构建、测试和质量检查 / Clippy 代码质量检查 (push) Has been cancelled
CI - 构建、测试和质量检查 / 构建可执行文件 (claude_code_rs, macos-latest, x86_64-apple-darwin) (push) Has been cancelled
CI - 构建、测试和质量检查 / 构建可执行文件 (claude_code_rs, ubuntu-latest, x86_64-unknown-linux-gnu) (push) Has been cancelled
CI - 构建、测试和质量检查 / 构建可执行文件 (claude_code_rs.exe, windows-latest, x86_64-pc-windows-msvc) (push) Has been cancelled
feat: 添加初始项目结构和基础文件
- 添加 Rust GUI 桌面应用程序入口点
- 添加 TypeScript/JavaScript 项目基础结构文件
- 包含组件、工具、命令、服务和工具定义
- 添加配置文件如 .gitignore、.gitattributes 和 LICENSE
- 包含图片资源和演示文件
- 为各种功能模块添加占位符和类型定义
2026-04-20 16:58:22 +08:00

1.7 KiB

Minimal Plugin Example

A bare-bones plugin with a single command.

Directory Structure

hello-world/
├── .claude-plugin/
│   └── plugin.json
└── commands/
    └── hello.md

File Contents

.claude-plugin/plugin.json

{
  "name": "hello-world"
}

commands/hello.md

---
name: hello
description: Prints a friendly greeting message
---

# Hello Command

Print a friendly greeting to the user.

## Implementation

Output the following message to the user:

> Hello! This is a simple command from the hello-world plugin.
>
> Use this as a starting point for building more complex plugins.

Include the current timestamp in the greeting to show the command executed successfully.

Usage

After installing the plugin:

$ claude
> /hello
Hello! This is a simple command from the hello-world plugin.

Use this as a starting point for building more complex plugins.

Executed at: 2025-01-15 14:30:22 UTC

Key Points

  1. Minimal manifest: Only the required name field
  2. Single command: One markdown file in commands/ directory
  3. Auto-discovery: Claude Code finds the command automatically
  4. No dependencies: No scripts, hooks, or external resources

When to Use This Pattern

  • Quick prototypes
  • Single-purpose utilities
  • Learning plugin development
  • Internal team tools with one specific function

Extending This Plugin

To add more functionality:

  1. Add commands: Create more .md files in commands/
  2. Add metadata: Update plugin.json with version, description, author
  3. Add agents: Create agents/ directory with agent definitions
  4. Add hooks: Create hooks/hooks.json for event handling