Initial commit
This commit is contained in:
12
.claude-plugin/plugin.json
Normal file
12
.claude-plugin/plugin.json
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"name": "claude-code-skill-creator",
|
||||||
|
"description": "Create custom Claude skills with a single command. Analyze your project and create tailored skills that understand your code patterns.",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"author": {
|
||||||
|
"name": "Alon Cohen",
|
||||||
|
"email": "acohenstore@gmail.com"
|
||||||
|
},
|
||||||
|
"commands": [
|
||||||
|
"./commands/create-skill.md"
|
||||||
|
]
|
||||||
|
}
|
||||||
3
README.md
Normal file
3
README.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# claude-code-skill-creator
|
||||||
|
|
||||||
|
Create custom Claude skills with a single command. Analyze your project and create tailored skills that understand your code patterns.
|
||||||
217
commands/create-skill.md
Normal file
217
commands/create-skill.md
Normal file
@@ -0,0 +1,217 @@
|
|||||||
|
---
|
||||||
|
description: Create custom Claude skills with guided workflow
|
||||||
|
---
|
||||||
|
|
||||||
|
# Create Skill Command
|
||||||
|
|
||||||
|
Automates the creation of custom Claude skills with guided workflows.
|
||||||
|
|
||||||
|
## Workflow
|
||||||
|
|
||||||
|
Follow these steps to create a custom skill:
|
||||||
|
|
||||||
|
### Step 1: Gather Requirements
|
||||||
|
|
||||||
|
Ask the user what skill they want to create:
|
||||||
|
- "What should this skill help you accomplish?"
|
||||||
|
- "What types of tasks or files will this skill handle?"
|
||||||
|
- "Will you need any scripts, reference documentation, or template assets?"
|
||||||
|
|
||||||
|
Get a clear understanding of:
|
||||||
|
- **Purpose**: What should the skill do?
|
||||||
|
- **Use cases**: When should Claude use this skill?
|
||||||
|
- **Required capabilities**: Scripts, references, or assets needed?
|
||||||
|
|
||||||
|
### Step 2: Determine Location
|
||||||
|
|
||||||
|
Check the current working directory and ask user where to create the skill.
|
||||||
|
|
||||||
|
Present two options:
|
||||||
|
|
||||||
|
**Option 1: Current Project (.claude/skills/)**
|
||||||
|
- Best for project-specific skills
|
||||||
|
- Claude will have full context of the user's codebase
|
||||||
|
- Skill will be tailored to their specific project
|
||||||
|
|
||||||
|
**Option 2: For Sharing (skills/custom/ or custom path)**
|
||||||
|
- Best for general-purpose skills to share
|
||||||
|
- Creates a packaged .zip file
|
||||||
|
- Can be distributed to others
|
||||||
|
|
||||||
|
Ask: "Where would you like to create this skill?"
|
||||||
|
|
||||||
|
Store the chosen path as `$SKILL_BASE_PATH`.
|
||||||
|
|
||||||
|
### Step 3: Generate Skill Name
|
||||||
|
|
||||||
|
If the user hasn't provided a skill name, generate one following these rules:
|
||||||
|
- Use hyphen-case (e.g., "api-test-helper", "json-validator")
|
||||||
|
- Lowercase letters, digits, and hyphens only
|
||||||
|
- Max 40 characters
|
||||||
|
- Descriptive and clear
|
||||||
|
- No starting/ending hyphens or consecutive hyphens
|
||||||
|
|
||||||
|
Confirm the generated name with the user.
|
||||||
|
|
||||||
|
### Step 4: Locate Helper Scripts
|
||||||
|
|
||||||
|
The helper scripts are located at:
|
||||||
|
```
|
||||||
|
skills/skill-creator/scripts/init_skill.py
|
||||||
|
skills/skill-creator/scripts/package_skill.py
|
||||||
|
skills/skill-creator/scripts/quick_validate.py
|
||||||
|
```
|
||||||
|
|
||||||
|
These come from Anthropic's official skills repository (included as a git submodule).
|
||||||
|
|
||||||
|
### Step 5: Initialize Skill Scaffold
|
||||||
|
|
||||||
|
Run the init script to create the basic structure:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python skills/skill-creator/scripts/init_skill.py <skill-name> --path $SKILL_BASE_PATH
|
||||||
|
```
|
||||||
|
|
||||||
|
This creates:
|
||||||
|
- `$SKILL_BASE_PATH/<skill-name>/` directory
|
||||||
|
- `SKILL.md` with template
|
||||||
|
- `scripts/example.py` (example script)
|
||||||
|
- `references/api_reference.md` (example reference)
|
||||||
|
- `assets/example_asset.txt` (example asset)
|
||||||
|
|
||||||
|
### Step 6: Customize SKILL.md
|
||||||
|
|
||||||
|
Read the generated SKILL.md file and customize it based on user requirements:
|
||||||
|
|
||||||
|
**Update frontmatter:**
|
||||||
|
- Keep the `name` field as-is (matches directory name)
|
||||||
|
- Replace the description with a clear, specific description
|
||||||
|
- Add optional fields if needed (license, allowed-tools, metadata)
|
||||||
|
|
||||||
|
**Update Overview section:**
|
||||||
|
- Replace TODO with 1-2 sentences explaining what the skill enables
|
||||||
|
|
||||||
|
**Choose structure pattern:**
|
||||||
|
- Workflow-Based: For sequential processes
|
||||||
|
- Task-Based: For tool collections
|
||||||
|
- Reference/Guidelines: For standards or specifications
|
||||||
|
- Capabilities-Based: For integrated systems
|
||||||
|
|
||||||
|
Delete the "Structuring This Skill" guidance section after choosing.
|
||||||
|
|
||||||
|
**Add main content:**
|
||||||
|
- Replace TODO sections with actual instructions and examples
|
||||||
|
- Include code samples, decision trees, or workflows as appropriate
|
||||||
|
- Reference any scripts, assets, or references being included
|
||||||
|
|
||||||
|
**Update Resources section:**
|
||||||
|
- Keep explanations for directories that are being used
|
||||||
|
- Remove explanations for directories that aren't needed
|
||||||
|
|
||||||
|
### Step 7: Customize Supporting Files
|
||||||
|
|
||||||
|
Based on user requirements:
|
||||||
|
|
||||||
|
**For scripts/ directory:**
|
||||||
|
- If custom scripts are needed, replace `example.py` with actual implementation
|
||||||
|
- If no scripts needed, delete the scripts/ directory entirely
|
||||||
|
- Make scripts executable: `chmod +x scripts/*.py`
|
||||||
|
|
||||||
|
**For references/ directory:**
|
||||||
|
- If reference documentation is needed, replace `api_reference.md` with actual content
|
||||||
|
- If no references needed, delete the references/ directory entirely
|
||||||
|
|
||||||
|
**For assets/ directory:**
|
||||||
|
- If template files/assets are needed, add them and delete `example_asset.txt`
|
||||||
|
- If no assets needed, delete the assets/ directory entirely
|
||||||
|
|
||||||
|
### Step 8: Ask Clarifying Questions
|
||||||
|
|
||||||
|
During customization, ask the user for clarification on:
|
||||||
|
- Specific implementation details for scripts
|
||||||
|
- Content for reference documentation
|
||||||
|
- Whether certain features should be included
|
||||||
|
- Examples they'd like to see in the documentation
|
||||||
|
|
||||||
|
Use the AskUserQuestion tool when needed.
|
||||||
|
|
||||||
|
### Step 9: Clean Up
|
||||||
|
|
||||||
|
Remove all TODO markers and template placeholder text from files.
|
||||||
|
|
||||||
|
### Step 10: Validate and Package
|
||||||
|
|
||||||
|
Run the package script which automatically validates before packaging:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python skills/skill-creator/scripts/package_skill.py $SKILL_BASE_PATH/<skill-name>
|
||||||
|
```
|
||||||
|
|
||||||
|
This will:
|
||||||
|
- Validate the skill structure
|
||||||
|
- Check frontmatter format
|
||||||
|
- Create a distributable .zip file in the current directory
|
||||||
|
|
||||||
|
If validation fails, fix the issues and retry.
|
||||||
|
|
||||||
|
### Step 11: Show Summary
|
||||||
|
|
||||||
|
Display a summary of what was created:
|
||||||
|
|
||||||
|
```
|
||||||
|
✅ Skill created successfully!
|
||||||
|
|
||||||
|
📁 Location: $SKILL_BASE_PATH/<skill-name>/
|
||||||
|
📦 Package: <skill-name>.zip
|
||||||
|
```
|
||||||
|
|
||||||
|
**If created in current project (.claude/skills/):**
|
||||||
|
```
|
||||||
|
Files created:
|
||||||
|
- SKILL.md
|
||||||
|
- [List any scripts, references, or assets]
|
||||||
|
|
||||||
|
Next steps:
|
||||||
|
1. Test the skill by asking Claude to use it
|
||||||
|
2. Example: "Use the <skill-name> skill to [task]"
|
||||||
|
3. Edit .claude/skills/<skill-name>/SKILL.md to refine as needed
|
||||||
|
|
||||||
|
💡 Tip: This skill was created in your project, so Claude has full
|
||||||
|
context of your codebase. The skill can reference your specific
|
||||||
|
APIs, patterns, and conventions.
|
||||||
|
```
|
||||||
|
|
||||||
|
**If created for sharing:**
|
||||||
|
```
|
||||||
|
Files created:
|
||||||
|
- SKILL.md
|
||||||
|
- [List any scripts, references, or assets]
|
||||||
|
- <skill-name>.zip (packaged for distribution)
|
||||||
|
|
||||||
|
Next steps:
|
||||||
|
1. Test the skill locally
|
||||||
|
2. Share <skill-name>.zip with your team
|
||||||
|
3. Upload to Claude.ai or distribute via GitHub
|
||||||
|
|
||||||
|
💡 Tip: To share this skill, others can:
|
||||||
|
- Upload the .zip to Claude.ai
|
||||||
|
- Extract and copy to their .claude/skills/ directory
|
||||||
|
```
|
||||||
|
|
||||||
|
## Important Notes
|
||||||
|
|
||||||
|
- Always use existing scripts from skills/skill-creator/scripts/
|
||||||
|
- Follow the skill structure patterns from Anthropic's skills
|
||||||
|
- Keep SKILL.md concise (<5k words); move detailed content to references/
|
||||||
|
- Use imperative/infinitive form in instructions, not second person
|
||||||
|
- Ensure all paths are relative
|
||||||
|
- Scripts should be executable and include --help information
|
||||||
|
- Validate before packaging to catch errors early
|
||||||
|
|
||||||
|
## Error Handling
|
||||||
|
|
||||||
|
If any step fails:
|
||||||
|
1. Display the error message clearly
|
||||||
|
2. Suggest fixes based on the error
|
||||||
|
3. Ask if the user wants to retry or make changes
|
||||||
|
4. Don't proceed to next steps until current step succeeds
|
||||||
45
plugin.lock.json
Normal file
45
plugin.lock.json
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
{
|
||||||
|
"$schema": "internal://schemas/plugin.lock.v1.json",
|
||||||
|
"pluginId": "gh:Alon2904/claude-code-skill-creator:",
|
||||||
|
"normalized": {
|
||||||
|
"repo": null,
|
||||||
|
"ref": "refs/tags/v20251128.0",
|
||||||
|
"commit": "1d0415b0ab587b356e5ba21f9a96c5b98d1a6877",
|
||||||
|
"treeHash": "8b907f0f96644f57083e3c16e2527242a44f450245f00d5df877e0e71cb4901c",
|
||||||
|
"generatedAt": "2025-11-28T10:24:51.037505Z",
|
||||||
|
"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": "claude-code-skill-creator",
|
||||||
|
"description": "Create custom Claude skills with a single command. Analyze your project and create tailored skills that understand your code patterns.",
|
||||||
|
"version": "1.0.0"
|
||||||
|
},
|
||||||
|
"content": {
|
||||||
|
"files": [
|
||||||
|
{
|
||||||
|
"path": "README.md",
|
||||||
|
"sha256": "7b221e20c01a47cc1372ac01f5359147370c198654dbc072f57565cd126bb55e"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": ".claude-plugin/plugin.json",
|
||||||
|
"sha256": "fc22902ae54481b729129fca4cf8486d21d03f053b41df8dbb37401f3f0d3c2c"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "commands/create-skill.md",
|
||||||
|
"sha256": "0c37ccdbee56656a2c588fb5aa33dd35205f7e2ad56a52a4129c2e9d28340b32"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"dirSha256": "8b907f0f96644f57083e3c16e2527242a44f450245f00d5df877e0e71cb4901c"
|
||||||
|
},
|
||||||
|
"security": {
|
||||||
|
"scannedAt": null,
|
||||||
|
"scannerVersion": null,
|
||||||
|
"flags": []
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user