clarify workflows and scripts are both part of a skill

This commit is contained in:
lyn
2026-04-17 15:33:12 +00:00
parent 240e52a76e
commit 01d52f42e5
2 changed files with 12 additions and 8 deletions

View File

@@ -28,8 +28,10 @@ description: {when-to-use}
## When to Use Scripts vs Workflows
- **Scripts** — handle logic/flow that is completely fixed. When the steps are predictable and always the same, encode them in a script.
- **Workflows** — handle flexible situations semantically. When context matters, decisions are needed, or the process is nuanced, describe it in a workflow document.
Both scripts and workflows are parts of a skill — scripts live in `{skill-name}/scripts/`, workflows in `{skill-name}/workflows/`.
- **Scripts** — handle logic that is completely fixed. When the steps are predictable and always the same, encode them in a script.
- **Workflows** — handle flexible situations. When context matters, decisions are needed, or the process is nuanced, describe it in a workflow document.
## Script Hint

View File

@@ -8,16 +8,18 @@ Not every repetitive task needs to become a skill. Ask first: is this pattern ge
> See `{baseDir}/docs/standard.md` for skill structure and writing requirements.
## When to Make a Skill vs a Workflow
## When to Add a Script vs a Workflow to a Skill
**Make a skill with scripts** when:
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.)
**Make a workflow** when:
- Steps vary depending on context — workflows describe the process semantically, handling flexible situations
- The situation is too nuanced for rigid logic
**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
@@ -33,7 +35,7 @@ Not every repetitive task needs to become a skill. Ask first: is this pattern ge
### 2. Decide the Approach
Based on the criteria above, determine whether this should be a skill (with scripts) or a standalone workflow within an existing skill.
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