$npx -y skills add tranhieutt/software_development_department --skill learnerTurns real agent failures, repeated prompts, team-specific workflows, and durable project lessons into better SDD skills or memory entries. Use when the user asks to create/update/refine skills, extract reusable lessons, improve skill routing, encode team process, or save pattern
| 1 | # Learner |
| 2 | |
| 3 | Convert real SDD usage into durable operating knowledge. |
| 4 | |
| 5 | Use this workflow to decide whether a lesson belongs in: |
| 6 | |
| 7 | - an existing skill, |
| 8 | - a new skill, |
| 9 | - `.claude/memory/annotations.md`, |
| 10 | - another Tier 2 memory file, |
| 11 | - or no durable artifact. |
| 12 | |
| 13 | ## Source Principles |
| 14 | |
| 15 | This workflow adopts the Agent Skills guidance that durable skills come from |
| 16 | real expertise, project artifacts, execution traces, and repeated refinement. |
| 17 | Skills should capture team-specific process and failure modes, not generic |
| 18 | best practices or deterministic glue better handled by scripts, hooks, or MCP. |
| 19 | |
| 20 | ## Extraction Gate |
| 21 | |
| 22 | Create or modify a skill only when at least one signal is present: |
| 23 | |
| 24 | - Agent made a wrong choice despite a correct prompt. |
| 25 | - Existing skill fired but failed its mission. |
| 26 | - Needed skill did not fire because `description` was weak or absent. |
| 27 | - A teammate/user wrote the same long prompt, plan, or checklist a second time. |
| 28 | - Session repeated a costly investigation, setup, verification, or handoff loop. |
| 29 | - User corrected a project convention, team preference, or non-obvious edge case. |
| 30 | - Internal process, internal system, or proprietary data pattern must be reused. |
| 31 | |
| 32 | Do not create a skill for: |
| 33 | |
| 34 | - General advice the model already knows. |
| 35 | - One-off code snippets. |
| 36 | - Secrets, credentials, or environment-specific auth hacks. |
| 37 | - Simple deterministic checks better implemented as hooks, scripts, tests, or MCP. |
| 38 | - Large copied docs without a clear load condition. |
| 39 | |
| 40 | ## Decision |
| 41 | |
| 42 | Classify the lesson before editing: |
| 43 | |
| 44 | | Lesson type | Target | |
| 45 | | --- | --- | |
| 46 | | Existing workflow missed a rule, edge case, or output shape | Update that skill body | |
| 47 | | Existing skill should have fired but did not | Tighten that skill `description` | |
| 48 | | Repeated team-specific process forms a coherent unit | Create or update a skill | |
| 49 | | Non-obvious caveat tied to a service/library/repo area | Use `annotate` memory | |
| 50 | | Broad preference or project operating rule | Update the right Tier 2 memory/doc | |
| 51 | | Deterministic repeated operation | Prefer tested script/hook/MCP; skill only orchestrates when needed | |
| 52 | |
| 53 | Prefer updating an existing skill over adding a new one when the lesson fits an |
| 54 | existing coherent workflow. |
| 55 | |
| 56 | ## Workflow |
| 57 | |
| 58 | 1. Gather evidence: |
| 59 | - original prompt or task, |
| 60 | - correction or failure mode, |
| 61 | - first point where the agent went wrong, |
| 62 | - skills that fired or failed to fire, |
| 63 | - files, commands, traces, review comments, or user preferences involved. |
| 64 | 2. Choose the smallest durable target using the Decision table. |
| 65 | 3. Edit with progressive disclosure: |
| 66 | - keep `SKILL.md` under 500 lines when practical, |
| 67 | - keep only always-needed instructions in `SKILL.md`, |
| 68 | - move long examples, schemas, or domain references into `references/`, |
| 69 | - state exactly when to read each reference file. |
| 70 | 4. Tune invocation: |
| 71 | - put trigger phrases and scope in `description`, |
| 72 | - add exclusions when false positives are likely, |
| 73 | - avoid relying on body-only "when to use" text for activation. |
| 74 | 5. Preserve SDD gates: |
| 75 | - do not weaken `using-sdd`, permissions, hooks, or source-of-truth rules, |
| 76 | - route spec, plan, code, review, and release changes through their owning skills. |
| 77 | 6. Validate: |
| 78 | - run `powershell -ExecutionPolicy Bypass -File scripts\validate-skills.ps1`, |
| 79 | - run `node scripts\validate-readme-sync.js` if counts or README inventory changed, |
| 80 | - run `node scripts\harness-audit.js --compact` for routing, hook, or harness changes. |
| 81 | |
| 82 | ## Skill Edit Rules |
| 83 | |
| 84 | - Add what the agent lacks; cut what generic model knowledge already covers. |
| 85 | - Prefer procedures over declarations. |
| 86 | - Use defaults, not broad menus of equal options. |
| 87 | - Make fragile operations prescriptive; leave flexible judgment where multiple approaches are valid. |
| 88 | - Add concrete gotchas where the agent is likely to make the wrong assumption. |
| 89 | - Keep bundled scripts deterministic and tested. |
| 90 | - Treat each skill like a function: one coherent responsibility, composable with other skills. |
| 91 | |
| 92 | ## New Skill Template |
| 93 | |
| 94 | Use this shape when a new SDD skill is justified: |
| 95 | |
| 96 | ````markdown |
| 97 | --- |
| 98 | name: short-action-name |
| 99 | type: workflow |
| 100 | description: "What this skill does. Use when <specific trigger phrases, task contexts, and boundaries>." |
| 101 | argument-hint: "[expected input]" |
| 102 | user-invocable |