65 lines
2.1 KiB
Markdown
65 lines
2.1 KiB
Markdown
# create-skills
|
|
|
|
Used when you notice patterns or workflows that could improve efficiency but have no skill covering them.
|
|
|
|
## Principle
|
|
|
|
Not every repetitive task needs to become a skill. Ask first: is this pattern general enough to warrant abstraction?
|
|
|
|
> See `{baseDir}/docs/standard.md` for skill structure and writing requirements.
|
|
|
|
## When to Add a Script vs a Workflow to a Skill
|
|
|
|
A skill can contain scripts, workflows, or both. When extending a skill, decide which type to add:
|
|
|
|
**Add a script when:**
|
|
- The steps are fixed, results are predictable
|
|
- The operation recurs across different agents/workspaces
|
|
- Involves external system calls (git, keycloak, file ops, etc.)
|
|
|
|
**Add a workflow when:**
|
|
- Steps vary depending on context — the process needs human judgment or situational decisions
|
|
- The scenario is too nuanced for rigid logic
|
|
|
|
**Not worth abstracting:**
|
|
- One-off task
|
|
|
|
> Conversational/analytical work *can* be worth a workflow — e.g., an interview flow (`recruitment/intviewer`) that guides through questions contextually is a valid workflow.
|
|
|
|
## Process
|
|
|
|
### 1. Identify the Pattern
|
|
|
|
- Record the repeating sequence of operations
|
|
- Analyze: what are you doing repeatedly across tasks?
|
|
- Evaluate: is this operation general-purpose or a one-off special case?
|
|
|
|
### 2. Decide the Approach
|
|
|
|
Based on the criteria above, determine whether this should be a new skill, or a script/workflow added to an existing skill.
|
|
|
|
### 3. Design the Skill
|
|
|
|
- **Name:** `{action}-{target}` (e.g., `git-clone-repo`, `keycloak-create-user`)
|
|
- **SKILL.md contents:**
|
|
- Description: what this skill does
|
|
- Use cases: when to use it
|
|
- Scripts: all related scripts and how to call them
|
|
- **Scripts:**
|
|
- Place under `scripts/`
|
|
- Each script has a single responsibility
|
|
- Provide `--help` or `-h` support
|
|
|
|
### 4. Implement
|
|
|
|
- Write the scripts, verify they work
|
|
- Write the SKILL.md
|
|
- Test locally
|
|
|
|
### 5. Submit
|
|
|
|
Call `{baseDir}/scripts/promote-improvements` to push to your branch.
|
|
|
|
Commit message includes: skill name, what it does, usage example.
|
|
Notify hang with the new skill's purpose.
|