From example-skills
Interactive workflow recorder that generates reusable skills. Start with 'start recording: skill-name' and Claude will ask about each action. Captures WebFetch, Read, Bash, Edit, Write, Grep, and Glob operations into self-documenting, production-ready skills.
How this skill is triggered — by the user, by Claude, or both
Slash command
/example-skills:workflow-weaverThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Records your workflow with Claude into reusable skills through interactive questioning and real-time state management. Turn any workflow into a shareable skill that other Claude instances can immediately execute.
Records your workflow with Claude into reusable skills through interactive questioning and real-time state management. Turn any workflow into a shareable skill that other Claude instances can immediately execute.
The skill monitors your workflow in real-time, maintains recording state in building.json, saves reference materials, and generates a fully-documented skill that's immediately executable.
Start recording:
During recording:
When you say "start recording: [skill-name]":
Step 1: Validate skill name
Step 2: Create directory structure
mkdir -p .claude/skills-in-progress/[skill-name]/references
Step 3: Initialize building.json
{
"skill_name": "[skill-name]",
"started_at": "[ISO-8601 timestamp]",
"status": "recording",
"steps": [],
"references": [],
"metadata": {
"total_actions": 0,
"included_steps": 0,
"references_count": 0
}
}
Step 4: Confirm to user
📝 Recording started for skill: **[skill-name]**
I'll ask about each action I take. Work normally!
CRITICAL RULE: After EVERY significant action YOU (Claude) perform, immediately pause and use AskUserQuestion to ask how to handle it.
| Action Type | When to Ask | Example |
|---|---|---|
| WebFetch | After fetching any URL | "I just fetched https://docs.example.com" |
| WebSearch | After web search | "I just searched for 'authentication patterns'" |
| Read | After reading any file | "I just read file /path/to/config.json" |
| Bash | After executing command | "I just executed: npm install" |
| Edit | After modifying file | "I just edited /path/file.js" |
| Write | After creating file | "I just created file /path/new-file.ts" |
| Grep | After search | "I just searched for pattern: 'export function'" |
| Glob | After pattern match | "I just found files matching: **/*.test.js" |
Use AskUserQuestion with this exact structure:
Question: "I just [describe action]. How should I handle this?"
Header: "Action"
Options:
1. Label: "Add as step"
Description: "Include this action as a numbered step in the skill"
2. Label: "Save as reference"
Description: "Save the content to references/ folder"
3. Label: "Both"
Description: "Add as step AND save content as reference"
4. Label: "Skip"
Description: "Don't include in the skill"
MultiSelect: false
Add to steps array in building.json:
{
"step_id": [next_number],
"type": "[webfetch|websearch|read|bash|edit|write|grep|glob]",
"action": "[Imperative description: 'Fetch docs', 'Read config']",
"details": {
"url": "[if webfetch/websearch]",
"query": "[if websearch]",
"file": "[if read/edit/write]",
"command": "[if bash]",
"pattern": "[if grep/glob]",
"glob_pattern": "[if glob]"
},
"description": "[Why this step matters]",
"timestamp": "[ISO-8601]"
}
Update metadata:
metadata.total_actions++metadata.included_steps++Respond to user:
✓ Added as step [X]
Determine file type and save appropriately:
Use descriptive names:
aws-deployment-guide.md, package-config.jsondoc1.md, file.txtAdd to references array in building.json:
{
"name": "[descriptive-name].[ext]",
"source": "[original URL or file path]",
"type": "[web|local|generated]",
"description": "[What this contains and why]",
"saved_at": "[ISO-8601]"
}
Update metadata:
metadata.references_count++Respond to user:
✓ Saved to references/[filename]
Perform BOTH actions above:
Respond to user:
✓ Saved to references/[filename]
✓ Added as step [X]
Only update metadata:
metadata.total_actions++Respond to user:
✓ Skipped
After updating: Always write updated building.json to disk immediately.
Monitor for these commands during recording:
"pause recording":
status: "paused" in building.json"resume recording":
status: "recording" in building.json"show current skill": Display summary from building.json:
📊 Current Skill: [skill-name]
Steps: [X]
References: [Y]
Status: [recording|paused]
Recent steps:
1. [action 1]
2. [action 2]
...
"stop recording" or "finish recording": Proceed to generation phase.
When you say "stop recording" or "finish recording":
Step 1: Read state
cat .claude/skills-in-progress/[skill-name]/building.json
Step 2: Validate state
Step 3: Generate SKILL.md
Create file with this structure:
---
name: [skill-name]
description: "[One-sentence summary derived from steps]"
allowed-tools:
- [list unique tool types from steps]
---
# [Skill Name in Title Case]
[2-3 sentence summary of what this skill accomplishes]
## Prerequisites
[Infer from steps any required tools, files, environment setup, permissions, or dependencies]
## Steps
[For each step in building.json, create numbered section:]
### 1. [Step Action as Imperative]
[Step description explaining what this accomplishes and why it matters]
**Action:** [type]
**Details:**
- [key]: [value]
- [key]: [value]
[If reference was saved:]
**Reference:** [references/filename](references/filename)
[Repeat for all steps]
## References
[Only include this section if references array is not empty:]
This skill uses these reference materials:
- **[name]** ([references/name](references/name)) - [description]
- [Repeat for all references]
## Usage
To use this skill:
1. [Describe first step from workflow]
2. [Describe second step]
3. [Continue...]
[Optionally add example usage, variations, or common patterns]
## Notes
- [Any important prerequisites not covered above]
- [Tips for adapting this skill to different scenarios]
- [Known limitations or edge cases]
- [Dependencies on external services or tools]
---
*Generated by workflow-weaver on [current date]*
*Original recording: [skill-name], started [started_at]*
Step 4: Write SKILL.md
cat > .claude/skills-in-progress/[skill-name]/SKILL.md << 'EOF'
[generated content]
EOF
Step 5: Move to skills folder
mv .claude/skills-in-progress/[skill-name] .claude/skills/[skill-name]
Step 6: Confirm success
✅ Skill generated successfully!
📁 Location: .claude/skills/[skill-name]/
📄 Skill file: SKILL.md
📚 References: [X] files
🔢 Steps: [Y]
Your skill is ready to use!
Naming conventions:
lowercase-with-hyphens (alphanumeric, hyphens, underscores only)descriptive-source.extension (e.g., aws-deploy-guide.md, local-config.json)doc1.md, file.txt, data.jsonWriting step descriptions:
Reference organization:
github-api-docs.md, local-env-config.jsonGrouping actions:
Corrupted building.json:
⚠️ building.json appears corrupted.
Options:
1. Restart recording (lose progress)
2. Attempt recovery (read last valid state)
3. Cancel recording
Skill name already exists:
⚠️ Skill '[name]' already exists.
Options:
1. Overwrite existing (will be backed up)
2. Use different name
3. Cancel
Recording has 50+ steps:
💡 This skill has 50+ steps. Consider:
1. Continue (may be hard to use)
2. Break into multiple smaller skills
3. Finish and refine later
Missing or unreadable reference:
Permission denied when writing:
Only one recording at a time:
Empty recording:
Paused too long:
Massive recordings:
File system issues:
User: start recording: deploy-to-production
Claude: 📝 Recording started for skill: **deploy-to-production**
I'll ask about each action I take. Work normally!
[Claude performs WebFetch to deployment docs]
Claude: I just fetched https://docs.aws.amazon.com/deploy.
How should I handle this?
User: Both
Claude: ✓ Saved to references/aws-deploy-docs.md
✓ Added as step 1
[Claude reads local config file]
Claude: I just read file config/production.yml.
How should I handle this?
User: Save as reference
Claude: ✓ Saved to references/production-config.yml
[Claude executes deployment bash commands]
Claude: I just executed: `aws deploy create-deployment`
How should I handle this?
User: Add as step
Claude: ✓ Added as step 2
[... workflow continues ...]
User: stop recording
Claude: ✅ Skill generated successfully!
📁 Location: .claude/skills/deploy-to-production/
📄 Skill file: SKILL.md
📚 References: 3 files
🔢 Steps: 7
Your skill is ready to use!
State persistence: Write building.json after EVERY update
Action detection: Monitor all significant operations
Clear questions: Make AskUserQuestion options self-explanatory
Graceful degradation: Handle missing tools/permissions
Consistent formatting: Follow specified JSON and SKILL.md formats exactly
This skill enables self-documenting workflow capture. Use it to create reusable skills from any workflow you build with Claude.
npx claudepluginhub p/rafaelcalleja-example-skills-skillsCreates bite-sized, testable implementation plans from specs or requirements, with file structure and task decomposition. Activates before coding multi-step tasks.