refactor: enforce layer responsibilities across all skills

Rewrote docs/standard.md as the single source of truth for skill
structure (menu/tools/recipes/manual analogy). Trimmed all SKILL.md
files to pure routers, moved recruitment workflow out of SKILL.md
into workflows/recruitment.md, removed duplicated standards from
workflow files.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
zhi
2026-04-17 20:40:16 +00:00
parent fd0f84d6b8
commit 795a710376
9 changed files with 238 additions and 301 deletions

View File

@@ -1,30 +1,12 @@
# create-skills
# Create Skills
Used when you notice patterns or workflows that could improve efficiency but have no skill covering them.
When you notice a reusable pattern with no existing skill covering it.
> See `{baseDir}/docs/standard.md` for skill structure and layer responsibilities.
## 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.
Not every repetitive task needs a skill. Ask first: is this pattern general enough to warrant abstraction?
## Process
@@ -32,23 +14,29 @@ A skill can contain scripts, workflows, or both. When extending a skill, decide
- 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?
- Evaluate: is this general-purpose or a one-off?
### 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.
Should this be a new skill, or a script/workflow added to an existing skill?
### 3. Design the Skill
**Add a script when:**
- The steps are fixed and results are predictable
- The operation recurs across different agents/workspaces
- Involves external system calls (git, keycloak, file ops, etc.)
- **Name:** kebab-case (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
**Add a workflow when:**
- Steps vary depending on context or require judgment
- The scenario is too nuanced for rigid logic
**Not worth abstracting:**
- One-off tasks
### 3. Design
- **Name:** kebab-case (e.g., `git-clone-repo`)
- **SKILL.md:** Router only — list scripts with invocation syntax, workflows with trigger conditions
- **Scripts:** Single responsibility each, placed under `scripts/`
### 4. Implement

View File

@@ -1,13 +1,13 @@
# fix-skills
# Fix Skills
Used when a skill or its scripts fail to produce expected results, or throw errors.
When a skill or its scripts fail to produce expected results, or throw errors.
> See `{baseDir}/docs/standard.md` for skill structure and layer responsibilities.
## Principle
**Do not resort to workarounds lightly.** Identify the root cause first, then fix properly.
> See `{baseDir}/docs/standard.md` for skill structure and writing requirements.
## Process
### 1. Gather Information
@@ -20,24 +20,23 @@ Used when a skill or its scripts fail to produce expected results, or throw erro
Investigate in this order:
1. **Are inputs/parameters correct?** — Do they match what the script or tool expects?
2. **Are dependencies satisfied?**Are required secrets, tokens, config files present?
1. **Are inputs/parameters correct?** — Do they match what the script expects?
2. **Are dependencies satisfied?**Required secrets, tokens, config files present?
3. **Is there a bug in the script logic?** — Read the source, add `set -x` if needed
4. **Is there a design flaw in the skill?** — Does the logic actually cover this scenario?
4. **Is there a design flaw?** — Does the logic actually cover this scenario?
### 3. Pinpoint the File
- Identify which file and which line the problem is in
- If it's a skill issue → follow the [improve-skills](./improve-skills.md) workflow
- If it's an execution environment issue → document in memory/
- If it's a skill issue → follow the improve-skills workflow
- If it's an environment issue → document in memory/
### 4. Fix
- Test the fix locally
- If skill files need to be modified → follow improve-skills process to PR or push to a branch
- If skill files need modification → follow improve-skills process
- Avoid introducing new side effects
### 5. Verify
- Reproduce the original scenario; confirm the issue is resolved
- Log the fix in memory/YYYY-MM-DD.md

View File

@@ -1,24 +1,13 @@
# improve-skills
# Improve Skills
Used when a skill or workflow has one of these problems:
When a skill has misleading descriptions, missing coverage, or suboptimal behavior.
- Misleading or ambiguous
- Missing coverage for your use case
- Suboptimal or confusing behavior
> See `{baseDir}/docs/standard.md` for skill structure and layer responsibilities.
## Principle
Improvement is better than workaround. Fix problems when you find them, so others don't hit the same pitfall.
## Requirement
**All skill-related documentation must be written in English.** This applies to:
- Creating new skills or workflows
- Improving or correcting existing skills
- Any other documentation within skills
> See `{baseDir}/docs/standard.md` for skill structure and writing requirements.
## Process
### 1. Identify the Problem
@@ -29,24 +18,25 @@ Improvement is better than workaround. Fix problems when you find them, so other
### 2. Assess Impact
- How many people will this affect?
- How many agents will this affect?
- Is it a design issue or a documentation issue?
- What's the complexity of the fix?
### 3. Design the Fix
- **Documentation issue** → update SKILL.md or related descriptions
- **Logic flaw** → modify the script or skill logic
- **Documentation issue** → update SKILL.md or docs/
- **Logic flaw** → modify the script
- **Missing coverage** → add a new workflow or script
- **Process issue** → redesign the workflow
### 4. Implement
- Make changes locally or on a branch
- Make changes locally
- Update SKILL.md if behavior changed
- Test if the change is significant
### 5. Submit
- Call `{baseDir}/scripts/promote-improvements` to push to your branch.
- Commit message should describe what was changed and why
Call `{baseDir}/scripts/promote-improvements` to push to your branch.
Commit message should describe what was changed and why.