Initial commit

This commit is contained in:
Zhongwei Li
2025-11-29 18:20:12 +08:00
commit 03984de92b
5 changed files with 202 additions and 0 deletions

View File

@@ -0,0 +1,61 @@
---
allowed-tools: Bash(mkdir:*), Bash(cat:*), Bash(git config --list)
argument-hint: [marketplace-name] [marketplace-description]
description: Create skeleton for marketplace
---
## Rules
- The #$1 (marketplace name) is mandatary, if is not provided you should ask for it
## Your task
You will create a claude code marketplace following the next subtasks:
### 1. Create setup folders and files
Create file marketplace.json in folder .claude-plugin
Write marketplace.json add the marketplace name (should be kebab notation), if #$2 marketplace description is not provided, don't include the field.
This is the template
```json
{
"name": "",
"metadata": {
"description": "",
"version": "0.0.1"
},
}
```
### 2. Add owner information
Get git config information to add owner information, the only required information is the name.
If name is missing ask for it.
If url is found, show the example of how will be added to owner field (this should be an HTTPS URL) and ask to procced (user can give you the value of field too)
```json
{
"owner": {
"name": "",
"email": "",
"url": ""
}
}
```
Ask to user if he wants to add additional information to file.
### 3. Add documentation
Create a README.md with market place information
Add "Installation" information section, about how to install it and use the repository information to modify template information about owner and repo of the next template
```
/plugin marketplace add owner/repo
```
Before to finish ask to user verify result and make modifications if he wants.

View File

@@ -0,0 +1,77 @@
---
allowed-tools: Bash(mkdir:*), Bash(cat:*), Bash(git config --list)
argument-hint: [plugin-name] [plugin-description]
description: Create skeleton for plugin
---
## Context
- Main folder is where is execute this session
- Plugin folder is inside of #$1 (kebab-notation) folder.
## Rules
- The #$1 (plugin name) is mandatary, if is not provided you should ask for it
## Your task
You will create a claude code plugin following the next subtasks:
### 1. Create setup folders and files
Create folder plugins and create folder with the name of plugin-name (should be kebab notation). This should be the plugin folder.
In plugin folder create the plugin.json inside .claude-plugin.
Get information about author using `git config --list`
Use the next template to write information
```json
{
"name": "",
"description": "",
"version": "0.0.1",
"author": {
"name": ""
}
}
```
Show to the user the information before to write. Ask to user if he wants to add additional information to file.
### 2. Add plugin to marketplace
Modify plugins property in .claude-plugin/marketplace.json of main folder using the plugin.json information and the change the source property with using the relative path to plugin folder:
```json
{
"plugins":[
{
// Plugin information
"source": "./plugins/:plugin-name",
}
]
}
```
### 3. Create agents, commands and or skills
Ask to user if he wants to create agents, commands and/or skills, he only needs to say the names and descriptions.
You should create files with extension.md using the names in kebab notation in folders: agents, commands or skills inside plugin folder.
```
---
name:
description:
---
```
### 3. Add README.md in plugin folder
Create a README.md with plugin information like name and description
Add section installation using marketplace.json and plugin.json information, marketplace name and plugin name:
```
/plugin install plugin-name@market-place-name
```