From 3cb302191f1b715844348523932b929aee873d81 Mon Sep 17 00:00:00 2001 From: Zhongwei Li Date: Sat, 29 Nov 2025 18:01:50 +0800 Subject: [PATCH] Initial commit --- .claude-plugin/plugin.json | 17 ++++++++++++ README.md | 3 +++ agents/hello-agent.md | 38 +++++++++++++++++++++++++++ commands/hello.md | 27 +++++++++++++++++++ plugin.lock.json | 53 ++++++++++++++++++++++++++++++++++++++ skills/code_style.md | 48 ++++++++++++++++++++++++++++++++++ 6 files changed, 186 insertions(+) create mode 100644 .claude-plugin/plugin.json create mode 100644 README.md create mode 100644 agents/hello-agent.md create mode 100644 commands/hello.md create mode 100644 plugin.lock.json create mode 100644 skills/code_style.md diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json new file mode 100644 index 0000000..8bb4eff --- /dev/null +++ b/.claude-plugin/plugin.json @@ -0,0 +1,17 @@ +{ + "name": "example-plugin", + "description": "A minimal example plugin demonstrating the basic structure", + "version": "1.0.0", + "author": { + "name": "Your Name" + }, + "skills": [ + "./skills" + ], + "agents": [ + "./agents" + ], + "commands": [ + "./commands" + ] +} \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..9e32651 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# example-plugin + +A minimal example plugin demonstrating the basic structure diff --git a/agents/hello-agent.md b/agents/hello-agent.md new file mode 100644 index 0000000..a5e8d76 --- /dev/null +++ b/agents/hello-agent.md @@ -0,0 +1,38 @@ +--- +name: hello-agent +description: | + A minimal example agent that demonstrates basic agent structure. + Use this as a template for creating new agents. +model: sonnet +color: blue +--- + +# Hello Agent + +You are a friendly agent that helps users understand how agents work in Claude Code plugins. + +## Core Competencies + +- Explaining agent architecture +- Demonstrating agent capabilities +- Providing examples of agent usage + +## How to Use This Agent + +This agent can be invoked when users need help understanding the plugin system. + + +Context: User wants to understand how agents work +user: "What can this agent do?" +assistant: "I'm a simple example agent that demonstrates the basic structure of agents in Claude Code plugins. I can help you understand how to create and use agents." + +This is a minimal example showing how agents respond to queries. + + + +## Implementation Guidelines + +When working as this agent: +1. Be clear and concise +2. Focus on educational examples +3. Help users understand the plugin system diff --git a/commands/hello.md b/commands/hello.md new file mode 100644 index 0000000..5bb3b66 --- /dev/null +++ b/commands/hello.md @@ -0,0 +1,27 @@ +--- +description: A simple hello world command demonstrating basic command structure +--- + +# Hello World Command + +This is a minimal example command that demonstrates the basic structure of commands in Claude Code plugins. + +## Usage + +When a user invokes `/hello`, respond with a friendly greeting and explain that this is an example command. + +## What to Do + +1. Greet the user warmly +2. Explain that this is a template command +3. Suggest they can customize it for their own needs + +## Example Response + +"Hello! This is a simple example command that demonstrates how commands work in Claude Code plugins. You can use this as a template to create your own commands by: + +1. Creating a new `.md` file in the `commands/` directory +2. Adding YAML frontmatter with a description +3. Writing instructions for Claude on how to respond + +The filename becomes the command name (e.g., `hello.md` → `/hello`)." diff --git a/plugin.lock.json b/plugin.lock.json new file mode 100644 index 0000000..c2fccfc --- /dev/null +++ b/plugin.lock.json @@ -0,0 +1,53 @@ +{ + "$schema": "internal://schemas/plugin.lock.v1.json", + "pluginId": "gh:Bparsons0904/claude-marketplace:example", + "normalized": { + "repo": null, + "ref": "refs/tags/v20251128.0", + "commit": "04a0bd2d19ae9eaf24730a2687af104068c92311", + "treeHash": "d097130c4da2de25f497ab6b238d4393d10f22d2964bb514fd90eeddbb5f451d", + "generatedAt": "2025-11-28T10:09:58.285768Z", + "toolVersion": "publish_plugins.py@0.2.0" + }, + "origin": { + "remote": "git@github.com:zhongweili/42plugin-data.git", + "branch": "master", + "commit": "aa1497ed0949fd50e99e70d6324a29c5b34f9390", + "repoRoot": "/Users/zhongweili/projects/openmind/42plugin-data" + }, + "manifest": { + "name": "example-plugin", + "description": "A minimal example plugin demonstrating the basic structure", + "version": "1.0.0" + }, + "content": { + "files": [ + { + "path": "README.md", + "sha256": "1d211baa792c07c7e58fc4b7d02029d0f92355a22a19d70be8c71969050edf73" + }, + { + "path": "agents/hello-agent.md", + "sha256": "16f3fd68a208abb48dab6c4899e6d5bcd53ee524ec4948e115ab2bb25d0d99f8" + }, + { + "path": ".claude-plugin/plugin.json", + "sha256": "90cbfd758c756b19062b82e87b54b635f06a62fcefd0172bb1462c89228150d8" + }, + { + "path": "commands/hello.md", + "sha256": "0d4d68c2854719cfc92889ebf3d709d16aef280e3d604794abf6c9444e8d4216" + }, + { + "path": "skills/code_style.md", + "sha256": "76d80e1aa514a97c1ad70639010b0688ca9e65e00ad192307611e5512fb4fbba" + } + ], + "dirSha256": "d097130c4da2de25f497ab6b238d4393d10f22d2964bb514fd90eeddbb5f451d" + }, + "security": { + "scannedAt": null, + "scannerVersion": null, + "flags": [] + } +} \ No newline at end of file diff --git a/skills/code_style.md b/skills/code_style.md new file mode 100644 index 0000000..e59cb3d --- /dev/null +++ b/skills/code_style.md @@ -0,0 +1,48 @@ +--- +name: Code Style +description: | + Basic code style guidelines. Use this as a reference when writing or reviewing code. +--- + +# Code Style Guidelines + +## Core Principles + +1. **Clarity over cleverness** - Write code that's easy to understand +2. **Consistency** - Follow established patterns in the codebase +3. **Simplicity** - Prefer simple solutions over complex ones + +## Naming Conventions + +- **Variables**: Use descriptive names (`user_count` not `uc`) +- **Functions**: Use verb phrases (`calculate_total`, `get_user`) +- **Classes**: Use noun phrases (`UserManager`, `OrderProcessor`) +- **Constants**: Use UPPER_CASE (`MAX_RETRIES`, `DEFAULT_TIMEOUT`) + +## Code Organization + +- Keep functions small and focused (one responsibility) +- Group related code together +- Use meaningful file and directory names + +## Comments + +- Prefer self-documenting code over comments +- Only add comments for non-obvious "why" explanations +- Keep comments up-to-date with code changes + +## Example + +```python +# Good - clear naming and structure +def calculate_order_total(items: list[Item]) -> float: + subtotal = sum(item.price * item.quantity for item in items) + tax = subtotal * TAX_RATE + return subtotal + tax + +# Bad - unclear names and structure +def calc(x): + s = sum(i.p * i.q for i in x) + t = s * 0.08 + return s + t +```