@se-studio/skills 1.0.37 → 1.0.38

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,21 @@
1
1
  # @se-studio/skills
2
2
 
3
+ ## 1.0.38
4
+
5
+ ### Patch Changes
6
+
7
+ - Extend the local content index with a reference catalog, automatic sync, and bundled skills for cms-edit.
8
+
9
+ - **Content index (schema v2)** — index `template`, `articleType`, `tagType`, and `tag` in SQLite alongside assets and media
10
+ - **Automatic index sync** — index-backed commands call `ensureContentIndex`; full rebuild when missing or schema-outdated, incremental upsert when stale (>24h). Manual `index sync` always full rebuilds
11
+ - **`list --type template|articleType|tagType|tag`** — index-preferred listing with `--force-cma` escape hatch; template `--slug` filters by cmsLabel
12
+ - **`resolve --type template --label`** — resolve templates by cmsLabel; reference types use index with CMA fallback
13
+ - **`index dump --reference-only` / `--reference-type`** — browse the reference catalog
14
+ - **Duplicate detection** — ambiguous slug/label matches throw `ReferenceCatalogAmbiguityError`
15
+ - **File lock** — single writer per index database during sync
16
+ - **`requireMediaIndex` removed** — replaced by async `ensureContentIndex`
17
+ - **Bundled skills** — `sync:skills` copies cms-edit skills from `@se-studio/skills`; setup wizard can install into `.agents/skills`
18
+
3
19
  ## 1.0.37
4
20
 
5
21
  ### Patch Changes
package/README.md CHANGED
@@ -57,6 +57,26 @@ Claude Code uses a naive frontmatter parser; violations cause descriptions to si
57
57
  3. Sync: `pnpm skills:sync`
58
58
  4. Add a changeset if publishing `@se-studio/skills`
59
59
 
60
+ ### cms-edit bundled skills (`@se-studio/contentful-cms`)
61
+
62
+ The CLI ships a **subset** of skills under `packages/contentful-cms/skills/` for `cms-edit skill install`. Those files are **generated** from this package:
63
+
64
+ | Canonical source (`packages/skills/skills/`) | Bundled name (`packages/contentful-cms/skills/`) |
65
+ |---------------------------------------------|--------------------------------------------------|
66
+ | `contentful-cms-core` | `core` |
67
+ | `contentful-cms-templates` | `templates` |
68
+ | `contentful-cms-setup` | `setup` |
69
+
70
+ After editing any `contentful-cms-*` skill here, run:
71
+
72
+ ```bash
73
+ pnpm --filter @se-studio/contentful-cms sync:skills
74
+ ```
75
+
76
+ Do not edit `packages/contentful-cms/skills/` directly. See `packages/contentful-cms/docs/SKILLS.md`.
77
+
78
+ **Do not use `.claude/skills/` in the repo** as a skill source — it is untracked and local. Use `.agents/skills/` (via `pnpm skills:sync`) or `cms-edit skill install`.
79
+
60
80
  ## References
61
81
 
62
82
  - [Anthropic skill authoring best practices](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/best-practices)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@se-studio/skills",
3
- "version": "1.0.37",
3
+ "version": "1.0.38",
4
4
  "description": "SE Studio agent skills for marketing site development with Contentful CMS",
5
5
  "repository": {
6
6
  "type": "git",
@@ -341,10 +341,32 @@ cms-edit set @c5 links linkId4 --links --append
341
341
 
342
342
  ## Assets
343
343
 
344
+ **Content index:** Run `cms-edit index sync` once per space before asset search, media-by-filename list, asset audit, or `--if-exists-by-filename`. The same sync also indexes **templates**, **articleType**, **tagType**, and **tag** for fast `list --type` and taxonomy `--if-not-exists`. Default sync uses the **Preview API** (draft content). See `cms-edit help index-sync`.
345
+
344
346
  ```bash
345
- # Search for an asset
347
+ cms-edit index sync
348
+ cms-edit index status
349
+ cms-edit list --type template
350
+ cms-edit resolve --type tagType --slug topic
351
+
352
+ # Published-only index (optional)
353
+ cms-edit index sync --published
354
+
355
+ # Search for an asset by title (requires index)
346
356
  cms-edit asset search "hero background"
347
357
 
358
+ # Search by fileName
359
+ cms-edit asset search --filename istockphoto-123.jpg
360
+ cms-edit asset search --filename-match 'istockphoto-.*'
361
+
362
+ # Upload from local file, URL, or base64
363
+ cms-edit asset upload ./poster.jpg --title "Poster"
364
+ cms-edit asset upload --url https://example.com/image.jpg --if-exists-by-filename
365
+ cms-edit asset upload --base64 "$B64" --mime image/png --file-name poster.png
366
+
367
+ # Upload and create a Media wrapper in one step
368
+ cms-edit asset upload ./figure.png --with-media --media-name "Figure 1" --media-position Middle
369
+
348
370
  # Get asset details
349
371
  cms-edit asset info 5xKj2abcDef
350
372
 
@@ -352,6 +374,10 @@ cms-edit asset info 5xKj2abcDef
352
374
  cms-edit asset set @c0 visual 5xKj2abcDef
353
375
  ```
354
376
 
377
+ JSON output for upload (`CMS_EDIT_JSON=1`): `{ ok, id, fileName, url, mediaId?, mediaIds? }`. Max upload size is **10MB** per file.
378
+
379
+ **Idempotent upload:** `--if-exists-by-filename` is check-then-create. Do not upload the same `fileName` in parallel — serialize per fileName or re-run to converge.
380
+
355
381
  ## Navigation
356
382
 
357
383
  ```bash
@@ -384,8 +410,34 @@ cms-edit create page --slug /about-us --title "About Us" \
384
410
 
385
411
  # Create a new article (requires articleType entry ID)
386
412
  cms-edit create article --slug /blog/my-post --title "My Post" --article-type-id 3abcDef456
413
+
414
+ # Create taxonomy entries (draft only)
415
+ cms-edit create tag-type --slug conference-venue --name "Conference Venue"
416
+ cms-edit create article-type --slug resources/publications --name "Publications"
417
+ cms-edit create tag --slug poster-presentation --name "Poster Presentation" --tag-type presentation-type
418
+
419
+ # Full fields via JSON
420
+ cms-edit create tag --json-file tag.json --tag-type presentation-type --if-not-exists
421
+
422
+ # Batch bootstrap
423
+ cms-edit create taxonomy-from-json --file taxonomy.json --if-not-exists
424
+
425
+ # Idempotent single-entry creates
426
+ cms-edit ensure tag-type --slug conference-venue --name "Conference Venue"
427
+ cms-edit ensure tag --slug asco-2025 --name "ASCO 2025" --tag-type conference-venue
387
428
  ```
388
429
 
430
+ See `cms-edit help fields-taxonomy` and `cms-edit help taxonomy-from-json` for field reference and batch schema.
431
+
432
+ **Idempotent taxonomy:** `--if-not-exists` / `ensure` are check-then-create — safe for sequential imports, not for parallel creates on the same slug.
433
+
434
+ ```bash
435
+ # Resolve taxonomy IDs without a session
436
+ cms-edit resolve --type tag-type --slug presentation-type
437
+ ```
438
+
439
+ `resolve --type` accepts `page`, `article`, `articleType`, `tagType`, `tag` (kebab aliases such as `tag-type`).
440
+
389
441
  ## Search and Discovery
390
442
 
391
443
  ```bash
@@ -405,7 +457,14 @@ cms-edit list --type article --has-field tags # articles where tags field i
405
457
  # Resolve any entry or asset by ID (no open session required)
406
458
  cms-edit resolve 4xKj2abcDefGhijK # entry: shows type, title, slug, status
407
459
  cms-edit resolve 7pQrStuvWxyzAbc # asset: shows title, fileName, URL
460
+ cms-edit resolve --type tagType --slug presentation-type
461
+ cms-edit resolve --type tag --slug asco-2025
408
462
  cms-edit resolve <id> --json # full Contentful object
463
+
464
+ # Find Media entries by asset
465
+ cms-edit list --type media --asset-id 7pQrStuvWxyzAbc
466
+ cms-edit list --type media --asset-filename istockphoto-123.jpg
467
+ cms-edit list --type media --asset-filename-match 'istockphoto-.*'
409
468
  ```
410
469
 
411
470
  To resolve a **tag entry ID** to its slug or label (e.g. for constructing article URLs such as `/resources/publications/<tag>/<slug>`):