Initial commit

This commit is contained in:
Zhongwei Li
2025-11-30 08:20:15 +08:00
commit 0b1f4556bc
36 changed files with 2888 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
# Assets
Bundled resources for skills-powerkit skill
- [ ] plugin_template/: Template files for creating new plugins.
- [ ] validation_rules.json: JSON file containing validation rules for plugins.
- [ ] example_plugin/: Example plugin with all the required files and directory structure.
- [ ] marketplace_schema.json: JSON schema for the marketplace catalog.

View File

@@ -0,0 +1,32 @@
{
"skill": {
"name": "skill-name",
"version": "1.0.0",
"enabled": true,
"settings": {
"verbose": false,
"autoActivate": true,
"toolRestrictions": true
}
},
"triggers": {
"keywords": [
"example-trigger-1",
"example-trigger-2"
],
"patterns": []
},
"tools": {
"allowed": [
"Read",
"Grep",
"Bash"
],
"restricted": []
},
"metadata": {
"author": "Plugin Author",
"category": "general",
"tags": []
}
}

View File

@@ -0,0 +1,153 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Marketplace Plugin Schema",
"description": "JSON schema for plugins in the claude-code-plugins marketplace.",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Unique identifier for the plugin (e.g., UUID).",
"example": "skills-powerkit-12345",
"_comment": "Consider using a UUID generator for this."
},
"name": {
"type": "string",
"description": "Human-readable name of the plugin.",
"example": "Skills Powerkit"
},
"version": {
"type": "string",
"description": "Semantic version of the plugin.",
"example": "1.0.0"
},
"description": {
"type": "string",
"description": "A brief description of the plugin's functionality.",
"example": "The ultimate plugin management toolkit for the claude-code-plugins marketplace."
},
"author": {
"type": "string",
"description": "Name of the plugin author or organization.",
"example": "Awesome Plugin Devs Inc."
},
"author_url": {
"type": "string",
"format": "url",
"description": "URL to the author's website or profile.",
"example": "https://awesomeplugindevs.com"
},
"repository_url": {
"type": "string",
"format": "url",
"description": "URL to the plugin's source code repository.",
"example": "https://github.com/awesomeplugindevs/skills-powerkit"
},
"license": {
"type": "string",
"description": "License under which the plugin is distributed.",
"example": "MIT"
},
"tags": {
"type": "array",
"description": "Keywords or tags to help users find the plugin.",
"items": {
"type": "string"
},
"example": ["plugin management", "development", "validation", "marketplace", "meta-plugin"]
},
"category": {
"type": "string",
"description": "Category the plugin belongs to.",
"example": "Development Tools"
},
"skills": {
"type": "array",
"description": "List of skills provided by the plugin.",
"items": {
"type": "string"
},
"example": [
"create_plugin",
"validate_plugin",
"audit_plugin",
"manage_plugin",
"update_plugin"
]
},
"icon_url": {
"type": "string",
"format": "url",
"description": "URL to the plugin's icon.",
"example": "https://example.com/icons/skills-powerkit.png"
},
"readme_url": {
"type": "string",
"format": "url",
"description": "URL to the plugin's README file.",
"example": "https://raw.githubusercontent.com/awesomeplugindevs/skills-powerkit/main/README.md"
},
"plugin_url": {
"type": "string",
"format": "url",
"description": "URL to the main plugin manifest or entry point.",
"example": "https://raw.githubusercontent.com/awesomeplugindevs/skills-powerkit/main/plugin.yaml"
},
"dependencies": {
"type": "array",
"description": "List of other plugins or libraries this plugin depends on.",
"items": {
"type": "string"
},
"example": []
},
"type": {
"type": "string",
"description": "Type of plugin.",
"example": "meta-plugin"
},
"pricing": {
"type": "object",
"description": "Pricing information for the plugin (if applicable).",
"properties": {
"type": {
"type": "string",
"enum": ["free", "paid", "subscription"],
"description": "Type of pricing model."
},
"price": {
"type": "number",
"description": "Price of the plugin (if applicable).",
"example": 9.99
},
"currency": {
"type": "string",
"description": "Currency of the price (if applicable).",
"example": "USD"
},
"interval": {
"type": "string",
"description": "Billing interval (if applicable).",
"enum": ["monthly", "yearly"],
"example": "monthly"
}
},
"required": ["type"]
}
},
"required": [
"id",
"name",
"version",
"description",
"author",
"author_url",
"repository_url",
"license",
"tags",
"category",
"skills",
"icon_url",
"readme_url",
"plugin_url"
]
}

View File

@@ -0,0 +1,28 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Claude Skill Configuration",
"type": "object",
"required": ["name", "description"],
"properties": {
"name": {
"type": "string",
"pattern": "^[a-z0-9-]+$",
"maxLength": 64,
"description": "Skill identifier (lowercase, hyphens only)"
},
"description": {
"type": "string",
"maxLength": 1024,
"description": "What the skill does and when to use it"
},
"allowed-tools": {
"type": "string",
"description": "Comma-separated list of allowed tools"
},
"version": {
"type": "string",
"pattern": "^\\d+\\.\\d+\\.\\d+$",
"description": "Semantic version (x.y.z)"
}
}
}

View File

@@ -0,0 +1,27 @@
{
"testCases": [
{
"name": "Basic activation test",
"input": "trigger phrase example",
"expected": {
"activated": true,
"toolsUsed": ["Read", "Grep"],
"success": true
}
},
{
"name": "Complex workflow test",
"input": "multi-step trigger example",
"expected": {
"activated": true,
"steps": 3,
"toolsUsed": ["Read", "Write", "Bash"],
"success": true
}
}
],
"fixtures": {
"sampleInput": "example data",
"expectedOutput": "processed result"
}
}

View File

@@ -0,0 +1,113 @@
{
"_comment": "Validation rules for plugins in the claude-code-plugins marketplace. These rules are used by the 'validate_plugin' skill.",
"plugin_name": {
"type": "string",
"required": true,
"min_length": 3,
"max_length": 64,
"pattern": "^[a-z0-9-]+$",
"_comment": "Plugin name must be lowercase, alphanumeric, and can contain hyphens. No spaces allowed.",
"error_message": "Plugin name must be lowercase, alphanumeric, and contain only hyphens. Minimum 3 characters, maximum 64."
},
"description": {
"type": "string",
"required": true,
"min_length": 20,
"max_length": 500,
"_comment": "A concise description of the plugin's functionality.",
"error_message": "Description must be between 20 and 500 characters."
},
"version": {
"type": "string",
"required": true,
"pattern": "^\\d+\\.\\d+\\.\\d+$",
"_comment": "Semantic versioning (e.g., 1.0.0).",
"error_message": "Version must follow semantic versioning (e.g., 1.0.0)."
},
"author": {
"type": "string",
"required": true,
"min_length": 3,
"max_length": 64,
"_comment": "Author's name or organization.",
"error_message": "Author must be between 3 and 64 characters."
},
"skills": {
"type": "array",
"min_items": 1,
"_comment": "List of skills provided by the plugin.",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"required": true,
"min_length": 3,
"max_length": 64,
"pattern": "^[a-zA-Z0-9_]+$",
"_comment": "Skill name must be alphanumeric and can contain underscores.",
"error_message": "Skill name must be alphanumeric and contain only underscores. Minimum 3 characters, maximum 64."
},
"description": {
"type": "string",
"required": true,
"min_length": 20,
"max_length": 500,
"_comment": "A concise description of the skill's functionality.",
"error_message": "Skill description must be between 20 and 500 characters."
},
"parameters": {
"type": "object",
"_comment": "Parameters accepted by the skill. Should correspond to the function signature.",
"additionalProperties": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["string", "number", "boolean", "array", "object"],
"required": true,
"_comment": "Data type of the parameter."
},
"description": {
"type": "string",
"required": true,
"min_length": 10,
"max_length": 200,
"_comment": "Description of the parameter's purpose.",
"error_message": "Parameter description must be between 10 and 200 characters."
},
"required": {
"type": "boolean",
"default": false,
"_comment": "Whether the parameter is required."
}
},
"required": ["type", "description"]
}
}
},
"required": ["name", "description"]
}
},
"api_url": {
"type": "string",
"required": true,
"format": "uri",
"_comment": "Base URL for the plugin's API.",
"error_message": "API URL must be a valid URL."
},
"license": {
"type": "string",
"required": true,
"enum": ["MIT", "Apache-2.0", "GPL-3.0", "BSD-3-Clause", "Other"],
"_comment": "License under which the plugin is distributed.",
"error_message": "Invalid license type."
},
"privacy_policy_url": {
"type": "string",
"required": false,
"format": "uri",
"_comment": "URL for the plugin's privacy policy. Required if the plugin collects user data.",
"error_message": "Privacy policy URL must be a valid URL."
}
}

View File

@@ -0,0 +1,9 @@
# References
Bundled resources for skills-powerkit skill
- [ ] plugin_creation_guide.md: Detailed guide on creating plugins, including directory structure, file formats, and best practices.
- [ ] plugin_validation_rules.md: Comprehensive list of validation rules and checks for plugins.
- [ ] marketplace_api_docs.md: API documentation for interacting with the marketplace.
- [ ] security_best_practices.md: Security best practices for plugin development.
- [ ] plugin_update_guide.md: Guide on updating plugins and ensuring compatibility.

View File

@@ -0,0 +1,69 @@
# Skill Best Practices
Guidelines for optimal skill usage and development.
## For Users
### Activation Best Practices
1. **Use Clear Trigger Phrases**
- Match phrases from skill description
- Be specific about intent
- Provide necessary context
2. **Provide Sufficient Context**
- Include relevant file paths
- Specify scope of analysis
- Mention any constraints
3. **Understand Tool Permissions**
- Check allowed-tools in frontmatter
- Know what the skill can/cannot do
- Request appropriate actions
### Workflow Optimization
- Start with simple requests
- Build up to complex workflows
- Verify each step before proceeding
- Use skill consistently for related tasks
## For Developers
### Skill Development Guidelines
1. **Clear Descriptions**
- Include explicit trigger phrases
- Document all capabilities
- Specify limitations
2. **Proper Tool Permissions**
- Use minimal necessary tools
- Document security implications
- Test with restricted tools
3. **Comprehensive Documentation**
- Provide usage examples
- Document common pitfalls
- Include troubleshooting guide
### Maintenance
- Keep version updated
- Test after tool updates
- Monitor user feedback
- Iterate on descriptions
## Performance Tips
- Scope skills to specific domains
- Avoid overlapping trigger phrases
- Keep descriptions under 1024 chars
- Test activation reliability
## Security Considerations
- Never include secrets in skill files
- Validate all inputs
- Use read-only tools when possible
- Document security requirements

View File

@@ -0,0 +1,70 @@
# Skill Usage Examples
This document provides practical examples of how to use this skill effectively.
## Basic Usage
### Example 1: Simple Activation
**User Request:**
```
[Describe trigger phrase here]
```
**Skill Response:**
1. Analyzes the request
2. Performs the required action
3. Returns results
### Example 2: Complex Workflow
**User Request:**
```
[Describe complex scenario]
```
**Workflow:**
1. Step 1: Initial analysis
2. Step 2: Data processing
3. Step 3: Result generation
4. Step 4: Validation
## Advanced Patterns
### Pattern 1: Chaining Operations
Combine this skill with other tools:
```
Step 1: Use this skill for [purpose]
Step 2: Chain with [other tool]
Step 3: Finalize with [action]
```
### Pattern 2: Error Handling
If issues occur:
- Check trigger phrase matches
- Verify context is available
- Review allowed-tools permissions
## Tips & Best Practices
- ✅ Be specific with trigger phrases
- ✅ Provide necessary context
- ✅ Check tool permissions match needs
- ❌ Avoid vague requests
- ❌ Don't mix unrelated tasks
## Common Issues
**Issue:** Skill doesn't activate
**Solution:** Use exact trigger phrases from description
**Issue:** Unexpected results
**Solution:** Check input format and context
## See Also
- Main SKILL.md for full documentation
- scripts/ for automation helpers
- assets/ for configuration examples

View File

@@ -0,0 +1,9 @@
# Scripts
Bundled resources for skills-powerkit skill
- [ ] plugin_creator.py: Automates the creation of plugin files and directory structure.
- [ ] plugin_validator.py: Validates the plugin.json schema, required files, and markdown frontmatter.
- [ ] marketplace_manager.py: Manages the marketplace catalog and syncing process.
- [ ] plugin_auditor.py: Audits the plugin for security vulnerabilities and best practices.
- [ ] plugin_updater.py: Updates the plugin to the latest version and checks for compatibility.

View File

@@ -0,0 +1,42 @@
#!/bin/bash
# Helper script template for skill automation
# Customize this for your skill's specific needs
set -e
function show_usage() {
echo "Usage: $0 [options]"
echo ""
echo "Options:"
echo " -h, --help Show this help message"
echo " -v, --verbose Enable verbose output"
echo ""
}
# Parse arguments
VERBOSE=false
while [[ $# -gt 0 ]]; do
case $1 in
-h|--help)
show_usage
exit 0
;;
-v|--verbose)
VERBOSE=true
shift
;;
*)
echo "Unknown option: $1"
show_usage
exit 1
;;
esac
done
# Your skill logic here
if [ "$VERBOSE" = true ]; then
echo "Running skill automation..."
fi
echo "✅ Complete"

View File

@@ -0,0 +1,32 @@
#!/bin/bash
# Skill validation helper
# Validates skill activation and functionality
set -e
echo "🔍 Validating skill..."
# Check if SKILL.md exists
if [ ! -f "../SKILL.md" ]; then
echo "❌ Error: SKILL.md not found"
exit 1
fi
# Validate frontmatter
if ! grep -q "^---$" "../SKILL.md"; then
echo "❌ Error: No frontmatter found"
exit 1
fi
# Check required fields
if ! grep -q "^name:" "../SKILL.md"; then
echo "❌ Error: Missing 'name' field"
exit 1
fi
if ! grep -q "^description:" "../SKILL.md"; then
echo "❌ Error: Missing 'description' field"
exit 1
fi
echo "✅ Skill validation passed"