From 01d52f42e543c006faaf21bc3afb3b607ed90cd6 Mon Sep 17 00:00:00 2001 From: lyn Date: Fri, 17 Apr 2026 15:33:12 +0000 Subject: [PATCH] clarify workflows and scripts are both part of a skill --- claw-skills/docs/standard.md | 6 ++++-- claw-skills/workflows/create-skills.md | 14 ++++++++------ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/claw-skills/docs/standard.md b/claw-skills/docs/standard.md index bb15d00..4df2ae9 100644 --- a/claw-skills/docs/standard.md +++ b/claw-skills/docs/standard.md @@ -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 diff --git a/claw-skills/workflows/create-skills.md b/claw-skills/workflows/create-skills.md index e769865..888fd60 100644 --- a/claw-skills/workflows/create-skills.md +++ b/claw-skills/workflows/create-skills.md @@ -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