| name | skill-jit |
| description | Researches any capability and crystallizes it into a reusable skill with the right structural pattern (tool wrapper, generator, reviewer, pipeline, or inversion). Trigger when the user asks to "create a skill", "make a skill for", "turn this into a skill", or "learn how to use X". Also trigger proactively when: (1) the task involves unfamiliar CLI tools, APIs, libraries, or workflows that need research; (2) the task would benefit from a structured, repeatable workflow — such as code review with checklists, consistent document generation, multi-step deployment with approval gates, or project scaffolding with configuration interviews; (3) a previously generated skill fails, produces poor results, or a referenced skill is missing. Do NOT trigger for tasks you can already handle reliably without a structured workflow. |
Create Skill
Research, verify, and crystallize any capability into a reusable skill. Also fix existing skills that have failed.
Process
1. Parse Input
Extract the task description from $ARGUMENTS. If empty, ask what the user wants the skill to do.
Flags:
--dry-run: Preview what would be created without writing files
2. Detect Mode
Fix mode — if the input mentions:
- An existing skill name AND a failure/error/problem
- Keywords like "failed", "broken", "error", "doesn't work", "fix", "update"
Create mode — otherwise (default).
3. Capture Intent
Quickly establish what the skill needs to do. Check if the current conversation already contains a workflow to capture — if so, extract answers from context first.
Key questions (ask only what's not already clear):
- What should this skill enable you to do?
- When should it trigger? (what user phrases/contexts)
- What's the expected output?
- Are there edge cases or constraints to consider?
Pattern hint (infer from context, don't ask unless ambiguous):
- Wraps a tool/API → Tool Wrapper
- Produces consistent artifacts → Generator
- Checks/audits/validates → Reviewer
- Needs user decisions before acting → Inversion
- Strict sequential steps with irreversible actions → Pipeline
If the pattern is obvious from the description, note it. If ambiguous, briefly ask.
Proceed directly if the description or conversation context already answers these. Don't over-interview.
4. Determine Output Directory
For Claude Code, skills are saved to .claude/skills/ relative to the current working directory (the project root). If you are not working in a Claude agent, please determine an appropriate directory to save the generated skill files, and ensure the writer agent is informed of this location in step 5.
5. Execute
Create Mode
-
Generate: Spawn the skill-writer agent. The writer handles everything — it decomposes the task, spawns researchers as needed, and generates skill files. Pass the resolved output directory so it knows where to write.
Task(
subagent_type: "skill-jit:skill-writer",
prompt: "Create skill(s) for: [original description]\n\nOutput directory: [resolved output directory from step 4]\nPattern hint: [detected pattern from step 3, or 'auto' if not determined]",
description: "Create skill"
)
-
Report: Output the writer's completion report verbatim. This is critical because skill-jit runs in a forked context — the main context only sees this output. The writer's report includes skill paths, missing references, the original task, and instructions to load the skill.
Fix Mode
-
Locate skill: Search ./.claude/skills/ or other skill directories for the mentioned skill
-
Read current skill: Load the existing SKILL.md
-
Fix: Spawn skill-writer in fix mode with current skill content + error context:
Task(
subagent_type: "skill-jit:skill-writer",
prompt: "Fix this skill. Error: [error]. Current skill: [content]. User request: [description]\n\nOutput directory: [same directory as the existing skill]",
description: "Fix skill"
)
-
Report: Display what was changed
6. Dry-Run Mode
When --dry-run is provided:
- Complete research phase normally
- Have writer generate content but NOT write files
- Display preview of what would be created
- Allow user to review before actual creation
Tips
- Be specific about what you want — the more detail, the better the skill
- Mention specific tools if you have a preference
- For failures, include the actual error message
- Use
--dry-run to preview before committing to file creation