@ssheleg/make-skill 0.2.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,35 @@
1
1
  # Changelog
2
2
 
3
+ ## v0.3.1 — 2026-07-25
4
+
5
+ - Gotcha: **npm reports auth failures as `404` on publish.** A `PUT … 404` for a
6
+ package that `npm view` resolves means an expired token, not a missing package —
7
+ check `npm whoami` (E401 → `npm login`) before debugging the name. Cost two
8
+ debugging rounds.
9
+
10
+ ## v0.3.0 — 2026-07-25
11
+
12
+ Review pass — a live shipping defect plus canon corrections that the repo itself
13
+ was violating.
14
+
15
+ - **FIX (shipping defect): `templates/SKILL.md` was distributed as a real skill.**
16
+ The skills CLI discovers EVERY `SKILL.md` in a repo, so the skeleton was listed
17
+ and installed on every agent as a placeholder skill literally named
18
+ `<skill-name>` (`npx skills add ssheleg/make-skill --list` → "Found 2 skills").
19
+ Renamed to `templates/SKILL.template.md`; the validator now **rejects any
20
+ `SKILL.md` outside `plugins/*/skills/*/`** so it cannot recur.
21
+ - **Canon: shared contracts must live INSIDE the skill dir.** The skills CLI
22
+ ships only the skill's own directory, so a sibling `skills/references/`
23
+ (linked `../references/…`) reaches Claude Code plugins but arrives broken on
24
+ every other agent. Layout, authoring rules and the retrofit checklist updated;
25
+ new gotcha documents both this and the stray-SKILL.md trap.
26
+ - **Validator hardened** (it now enforces what the canon preaches): description
27
+ must start "Use when …", must carry Russian triggers, frontmatter < 1024 chars,
28
+ no relative links inside `.mdc`, no stray `SKILL.md`. Each rule has a negative
29
+ test.
30
+ - **Docs:** README no longer suggests the skills CLI for Claude Code (it shadows
31
+ the plugin); release checklist quotes the validator's real output.
32
+
3
33
  ## v0.2.0 — 2026-07-24
4
34
 
5
35
  Correct multi-agent + cross-platform distribution guidance (learned shipping the
package/README.md CHANGED
@@ -37,7 +37,7 @@ this canon.
37
37
  /plugin install make-skill@make-skill
38
38
  ```
39
39
 
40
- **Any agent via the skills CLI (Claude Code, Cursor, Codex, 70+):**
40
+ **Any agent via the skills CLI (Cursor, Codex, OpenCode, 70+ — not Claude Code, use the plugin above):**
41
41
  ```
42
42
  npx skills add ssheleg/make-skill
43
43
  ```
@@ -68,7 +68,7 @@ Claude Code install shadow each other).
68
68
  | Channel | Update |
69
69
  |---|---|
70
70
  | Claude Code (plugin) | `claude plugin marketplace update make-skill` → `claude plugin update make-skill@make-skill` → restart |
71
- | Any agent (skills CLI) | `npx skills update make-skill --global --yes` |
71
+ | Any agent (skills CLI) | `npx skills update make-skill --global --yes` (repeated `--agent`; never `claude-code`) |
72
72
  | npm | `npx @ssheleg/make-skill@latest` / `npx github:ssheleg/make-skill` |
73
73
  | Plain skill | `git pull && ./install.sh --force` |
74
74
 
@@ -83,7 +83,7 @@ Say *"make a skill"* / *"сделай скилл"* / *"приведи скилл
83
83
  .claude-plugin/marketplace.json
84
84
  plugins/make-skill/{.claude-plugin/plugin.json, commands/make-skill.md, skills/make-skill/SKILL.md}
85
85
  cursor/rules/make-skill.mdc # self-contained Cursor rule
86
- templates/SKILL.md # skeleton seeded into new skills
86
+ templates/SKILL.template.md # skeleton seeded into new skills
87
87
  bin/make-skill.js + package.json # npx installer
88
88
  test/validate.py # structural validator (+ negative self-test in CI)
89
89
  .github/workflows/{validate,release}.yml
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ssheleg/make-skill",
3
- "version": "0.2.0",
3
+ "version": "0.3.1",
4
4
  "description": "Create, retrofit, and ship agent skills & Claude Code plugins the proven ssheleg way — marketplace repo layout, four-way version sync, validator + CI, multi-channel distribution (plugin, vercel skills CLI, npx, Cursor), npm gotchas, end-to-end first publish. This package is the installer CLI.",
5
5
  "bin": {
6
6
  "make-skill": "bin/make-skill.js"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "make-skill",
3
3
  "description": "Create, retrofit, and ship agent skills & Claude Code plugins the proven ssheleg way: marketplace repo layout, four-way version sync, validator + CI, multi-channel distribution (plugin, vercel skills CLI, npx, Cursor), npm gotchas, end-to-end first publish. Reference impls: super-ux (structure) + task-pipeline (config-contract + release automation).",
4
- "version": "0.2.0",
4
+ "version": "0.3.1",
5
5
  "author": { "name": "ssheleg" },
6
6
  "homepage": "https://github.com/ssheleg/make-skill",
7
7
  "repository": "https://github.com/ssheleg/make-skill",
@@ -37,8 +37,14 @@ skills and rules are written against that contract, never ad hoc.
37
37
  - Front-matter: `name` MUST equal the directory name; `description` starts
38
38
  "Use when …" and lists concrete trigger phrases — English AND Russian
39
39
  (user works in both). A skill nobody triggers is dead weight.
40
- - One skill = one job. Multiple concerns → multiple skills + shared contract
41
- in `skills/references/<contract>.md`, linked relatively (`../references/…`).
40
+ - One skill = one job. Multiple concerns → multiple skills + a shared contract
41
+ file. **Put contracts INSIDE the skill dir** (`skills/<skill>/references/…`,
42
+ linked `references/…`) — the skills CLI ships only the skill's OWN directory,
43
+ so a SIBLING `skills/references/` (linked `../references/…`) reaches Claude
44
+ Code plugins but arrives **broken on every other agent** (dangling links, the
45
+ agent can't read the contract). If several skills must share one contract,
46
+ either duplicate it into each skill dir (validator-checked identical) or state
47
+ a raw-URL fallback in the body.
42
48
  - Body: imperative, procedural, checklists over prose. Non-negotiables
43
49
  stated as such (model: super-ux "Evidence discipline").
44
50
  - Commands (`commands/*.md`) are thin wrappers: front-matter `description`
@@ -65,9 +71,9 @@ path if it proves useful.
65
71
  ├── plugins/<name>/
66
72
  │ ├── .claude-plugin/plugin.json
67
73
  │ ├── commands/*.md
68
- │ └── skills/<skill>/SKILL.md + skills/references/*.md
74
+ │ └── skills/<skill>/SKILL.md + skills/<skill>/references/*.md
69
75
  ├── cursor/rules/*.mdc # if agent-rules make sense for Cursor
70
- ├── templates/*.md # skeletons the skills seed into projects
76
+ ├── templates/*.md # skeletons (NEVER name one SKILL.md — see Gotchas)
71
77
  ├── bin/<name>.js + package.json # npx installer (zero-dep Node)
72
78
  ├── test/validate.py # consistency validator (stdlib only)
73
79
  ├── .github/workflows/validate.yml # validator on push+PR
@@ -80,8 +86,11 @@ path if it proves useful.
80
86
  top CHANGELOG entry — SAME semver, bumped together, validator enforces.
81
87
 
82
88
  **Validator** (adapt super-ux `test/validate.py`): manifests parse+fields;
83
- SKILL.md front-matter (name==dir, description); command front-matter; `.mdc`
84
- front-matter; templates exist; relative md links resolve; version sync.
89
+ SKILL.md front-matter (name==dir, description starts "Use when", EN+RU
90
+ triggers, <1024 chars); command front-matter; `.mdc` front-matter AND no
91
+ relative links inside `.mdc`; **no stray `SKILL.md` outside
92
+ `plugins/*/skills/*/`**; templates exist; relative md links resolve; version
93
+ sync.
85
94
  Plus a negative self-test (corrupt a copy → expect FAIL) — a validator that
86
95
  can't fail is decoration.
87
96
 
@@ -122,8 +131,9 @@ with evidence (`file:line` or command output) — never "looks fine".
122
131
  **Audit checklist:**
123
132
 
124
133
  1. Front-matter: name==dir; description "Use when…" + EN and RU triggers.
125
- 2. One-job check; shared contracts extracted to `references/`, linked
126
- relatively; no format duplication drift between skills.
134
+ 2. One-job check; shared contracts INSIDE the skill dir
135
+ (`skills/<skill>/references/…`), not a sibling — verify by installing via
136
+ the skills CLI and checking the contract files actually arrived.
127
137
  3. Entry-point command exists, idempotent (inspect → repair → status → one
128
138
  next action).
129
139
  4. Layout matches the standard tree; manifests complete; version sync ×4.
@@ -204,6 +214,12 @@ the plugin, or the skills CLI, never `install.sh`. Keep bin paths built with
204
214
  names are exempt) + `"publishConfig": {"access": "public"}` so `npm publish`
205
215
  needs no flag; or pick a clearly dissimilar unscoped name. The `bin` command
206
216
  name is independent of the package name — keep it short even when scoped.
217
+ - **npm masks auth failures as 404 on publish.** A `PUT … 404 Not Found` for a
218
+ package that demonstrably exists (`npm view <name> version` returns a version)
219
+ is an EXPIRED TOKEN, not a missing/renamed package — npm hides 401/403 on write
220
+ so it can't be used to probe ownership. Always check `npm whoami` first: E401 →
221
+ `npm login`, then re-publish. npm sessions expire faster than you expect; before
222
+ a batch publish, run `npm whoami` once rather than debugging four 404s.
207
223
  - **First scoped publish lags the read path:** right after a successful publish,
208
224
  `npm view @scope/pkg` can still E404 for ~1–2 min (write-master has it, read
209
225
  replica hasn't). A publish that 403s "cannot publish over previously published
@@ -211,6 +227,13 @@ the plugin, or the skills CLI, never `install.sh`. Keep bin paths built with
211
227
  failure.
212
228
  - **npx inside the package's own repo** resolves to the local package →
213
229
  false `command not found`. Always e2e-test from another cwd.
230
+ - **A stray `SKILL.md` anywhere in the repo ships as a REAL skill.** The skills
231
+ CLI discovers every `SKILL.md` in the tree, so a skeleton at
232
+ `templates/SKILL.md` gets installed into every agent as a placeholder skill
233
+ (seen live: a skill literally named `<skill-name>`). Name skeletons
234
+ `SKILL.template.md` and make the validator reject any `SKILL.md` outside
235
+ `plugins/*/skills/*/`. Verify with `npx skills add <repo> --list` — it must
236
+ list ONLY your real skills.
214
237
  - **Piped stdin + readline:** sequential `rl.question()` drops buffered
215
238
  lines; use ONE persistent-listener prompter for the whole flow (super-ux
216
239
  `makePrompter`). Non-TTY fallback for every prompt (`1,3`/`all`/`q`).
@@ -236,7 +259,7 @@ the plugin, or the skills CLI, never `install.sh`. Keep bin paths built with
236
259
 
237
260
  1. Bump the four versions together (`package.json` only if npm-distributed —
238
261
  else it's a 3-way sync); CHANGELOG entry.
239
- 2. `python3 test/validate.py` → `OK (<n> checks)`.
262
+ 2. `python3 test/validate.py` → exit 0 (`PASS: …`).
240
263
  3. Functional tests: installer against scratch dir (fresh / rerun-skip /
241
264
  `--force`), `node --check` on CLI, pipe-driven menu tests.
242
265
  4. Conventional commit; push; confirm CI `success`; tag `v<ver>` + push tag;
@@ -5,7 +5,7 @@ is absent; never overwrite existing files.
5
5
 
6
6
  | Template | Seeds | Used by |
7
7
  |---|---|---|
8
- | `SKILL.md` | a new `skills/<name>/SKILL.md` with canon frontmatter + section stubs | Create / Promote |
8
+ | `SKILL.template.md` | a new `skills/<name>/SKILL.md` with canon frontmatter + section stubs | Create / Promote |
9
9
 
10
10
  Distributable repos also get the full tree (manifests, `bin/`, `test/validate.py`,
11
11
  workflows, `install.sh`, README/CHANGELOG/LICENSE) — copy those from a reference
File without changes