$npx -y skills add transilienceai/communitytools --skill skill-updateSkill creation, update and management — generates skill directory structure, validates against best practices, enforces line count limits. Use when creating, updating, or improving skills.
| 1 | # Skill Update |
| 2 | |
| 3 | Generate or refine Claude Code skills following Anthropic best practices. |
| 4 | |
| 5 | ## Hard caps (enforced by `scripts/skill_linter.py`) |
| 6 | |
| 7 | - `SKILL.md` ≤ 150 lines |
| 8 | - `reference/*.md` ≤ 200 lines (`reference/scenarios/*.md` ≤ 400 lines) |
| 9 | - `README.md` ≤ 100 lines |
| 10 | - Every `SKILL.md` has YAML frontmatter with `name` + `description` |
| 11 | - No `DO NOT` / `MUST NOT` / `NEVER` outside an `## Anti-Patterns` section |
| 12 | - No challenge-specific identifiers (machine names, lab IDs, lab IPs, preserved flags) |
| 13 | - Every Markdown link resolves to an existing file |
| 14 | - Every reference file is linked from at least one other file (no orphans) |
| 15 | |
| 16 | ## Principles |
| 17 | |
| 18 | - **Brevity first.** Every file short, simple, human-readable. Challenge every token. |
| 19 | - **Progressive disclosure.** SKILL.md navigates; `reference/` holds detail; `reference/scenarios/` holds concrete exploit flows. |
| 20 | - **Separation of concern.** SKILL.md = WHAT + when. `reference/role-*.md` = HOW agents behave when spawned. |
| 21 | - **Single canonical home** for any cross-cutting rule (output discipline, credential loading, brute-force, etc.). Other files reference, never restate. |
| 22 | |
| 23 | ## File structure |
| 24 | |
| 25 | ``` |
| 26 | skills/<skill-name>/ |
| 27 | ├── SKILL.md # ≤150 lines, YAML + navigation |
| 28 | ├── reference/ |
| 29 | │ ├── *-principles.md # ≤150 lines (decision tree) |
| 30 | │ ├── INDEX.md |
| 31 | │ ├── *.md # patterns, ≤200 lines |
| 32 | │ └── scenarios/ |
| 33 | │ └── <category>/ |
| 34 | │ └── *.md # ≤400 lines, self-contained |
| 35 | └── README.md # optional, ≤100 lines |
| 36 | ``` |
| 37 | |
| 38 | ## SKILL.md template |
| 39 | |
| 40 | ```yaml |
| 41 | --- |
| 42 | name: <skill-name> |
| 43 | description: What it does AND when to use. Include trigger phrases. |
| 44 | --- |
| 45 | |
| 46 | # <Skill Name> |
| 47 | |
| 48 | <one-paragraph scope> |
| 49 | |
| 50 | ## When to use |
| 51 | |
| 52 | - <bullet> |
| 53 | |
| 54 | ## Workflow / Quick start |
| 55 | |
| 56 | <≤30 lines> |
| 57 | |
| 58 | ## References |
| 59 | |
| 60 | - [reference/...](reference/...) |
| 61 | |
| 62 | ## Anti-Patterns |
| 63 | |
| 64 | - <when negative framing is genuinely needed, put it here> |
| 65 | ``` |
| 66 | |
| 67 | ## When to update an existing skill |
| 68 | |
| 69 | Process the techniques and failure modes from completed engagements. Promote a learning to the skill base only if **all four** hold: |
| 70 | |
| 71 | 1. **Generalizable.** Reusable pattern, not target-specific lore. No machine names, lab IDs, target IPs, preserved flags, writeup attributions. |
| 72 | 2. **Material improvement.** Adds coverage, efficiency, or decision-quality for future engagements. |
| 73 | 3. **Not already captured** elsewhere in the skill base. (`scripts/skill_linter.py` flags duplicates.) |
| 74 | 4. **Minimal footprint.** Prefer extending an existing entry over adding a new file. Keep the base lean and high-signal. |
| 75 | |
| 76 | ## Reframing recipe |
| 77 | |
| 78 | Always frame as a reusable pattern: *"when encountering X condition, try Y approach"* — never *"on box-N, Y worked"*. Use `<TARGET_IP>`, `<DC_FQDN>`, `<DOMAIN>` placeholders in tool examples. |
| 79 | |
| 80 | ## Pre-write check |
| 81 | |
| 82 | Before writing, run `python3 scripts/skill_linter.py`. Reject any change that: |
| 83 | - Re-introduces challenge-specific lore. |
| 84 | - Pushes a `SKILL.md` past 150 or a reference past its cap. |
| 85 | - Duplicates a single-owner rule (brute-force, output discipline, env-reader). |
| 86 | - Adds `DO NOT` / `MUST NOT` / `NEVER` outside an Anti-Patterns block. |
| 87 | |
| 88 | ## Output |
| 89 | |
| 90 | Concise change report: |
| 91 | - **Updated.** File + one-line summary of edit. |
| 92 | - **Skipped.** Notable findings intentionally not added, with brief reasoning. |
| 93 | - **No changes.** State explicitly when nothing warranted an update. |
| 94 | |
| 95 | ## Reference |
| 96 | |
| 97 | - [STRUCTURE.md](reference/STRUCTURE.md) — directory layout requirements. |
| 98 | - [FRONTMATTER.md](reference/FRONTMATTER.md) — YAML rules. |
| 99 | - [CONTENT.md](reference/CONTENT.md) — writing guidelines. |
| 100 | |
| 101 | ## Anti-Patterns |
| 102 | |
| 103 | - Creating CHANGELOG.md / SUMMARY.md / VERIFICATION.md auxiliary files. |
| 104 | - Meta-documentation about the creation process inside the skill itself. |
| 105 | - Verbose inline templates and examples (link to `reference/` instead). |
| 106 | - Re-introducing duplicate rule prose (brute-force, output-dir, env-reader). |
| 107 | - Files past their cap — split into `reference/` immediately. |