Initial commit
This commit is contained in:
17
.claude-plugin/plugin.json
Normal file
17
.claude-plugin/plugin.json
Normal file
@@ -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"
|
||||||
|
]
|
||||||
|
}
|
||||||
3
README.md
Normal file
3
README.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# example-plugin
|
||||||
|
|
||||||
|
A minimal example plugin demonstrating the basic structure
|
||||||
38
agents/hello-agent.md
Normal file
38
agents/hello-agent.md
Normal file
@@ -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.
|
||||||
|
|
||||||
|
<example>
|
||||||
|
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."
|
||||||
|
<commentary>
|
||||||
|
This is a minimal example showing how agents respond to queries.
|
||||||
|
</commentary>
|
||||||
|
</example>
|
||||||
|
|
||||||
|
## Implementation Guidelines
|
||||||
|
|
||||||
|
When working as this agent:
|
||||||
|
1. Be clear and concise
|
||||||
|
2. Focus on educational examples
|
||||||
|
3. Help users understand the plugin system
|
||||||
27
commands/hello.md
Normal file
27
commands/hello.md
Normal file
@@ -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`)."
|
||||||
53
plugin.lock.json
Normal file
53
plugin.lock.json
Normal file
@@ -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": []
|
||||||
|
}
|
||||||
|
}
|
||||||
48
skills/code_style.md
Normal file
48
skills/code_style.md
Normal file
@@ -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
|
||||||
|
```
|
||||||
Reference in New Issue
Block a user