@se-studio/skills 1.4.4 → 1.5.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 +48 -0
- package/README.md +1 -0
- package/package.json +1 -1
- package/references/contentful-cms-cms-guidelines/variant-proposal-prompt.md +2 -2
- package/references/deps-update/projects.registry.json +67 -0
- package/skills/contentful-cms-alt-text-audit/SKILL.md +1 -1
- package/skills/contentful-cms-core/SKILL.md +53 -119
- package/skills/contentful-cms-editor-tasks/SKILL.md +83 -0
- package/skills/contentful-cms-media-review/SKILL.md +48 -1
- package/skills/contentful-cms-schema-org/SKILL.md +1 -1
- package/skills/contentful-cms-seo-descriptions/SKILL.md +3 -3
- package/skills/contentful-cms-setup/SKILL.md +21 -87
- package/skills/site-workflows-deps-update/SKILL.md +185 -0
- package/skills/site-workflows-new-project/SKILL.md +10 -0
- package/skills/contentful-cms-image-guide/SKILL.md +0 -240
- package/skills/contentful-cms-screenshots/SKILL.md +0 -46
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,53 @@
|
|
|
1
1
|
# @se-studio/skills
|
|
2
2
|
|
|
3
|
+
## 1.5.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- aa6f11b: Breaking cms-edit CLI prune (2.6.0):
|
|
8
|
+
|
|
9
|
+
**Removed**
|
|
10
|
+
|
|
11
|
+
- `ensure` — use `create … --if-not-exists`
|
|
12
|
+
- `skill` command (including `skill install`) — use `npx skills add @se-studio/skills`
|
|
13
|
+
- `contentful-cms` bin alias — use `cms-edit` only
|
|
14
|
+
- top-level `audit` (`images`, `tree`) — use `asset review --include-usage` and `list`/`open`/`peek`
|
|
15
|
+
- `backup`, `restore`, `revert` — use `diff` + `discard` + Contentful UI
|
|
16
|
+
- top-level `run` — use `batch run --file`
|
|
17
|
+
- top-level `colours`, `types` — use `schema colours`, `schema types <content-type>`
|
|
18
|
+
- `contentful-cms-image-guide` skill — merged into `contentful-cms-media-review`
|
|
19
|
+
|
|
20
|
+
**Added**
|
|
21
|
+
|
|
22
|
+
- `create from-json --if-not-exists`
|
|
23
|
+
- `asset review --include-usage` (slug-bearing usage ancestry)
|
|
24
|
+
- `batch run` subcommand
|
|
25
|
+
|
|
26
|
+
**Migration**
|
|
27
|
+
|
|
28
|
+
| Old | New |
|
|
29
|
+
| ---------------------------------------- | ---------------------------------------------- |
|
|
30
|
+
| `cms-edit ensure tag-type …` | `cms-edit create tag-type … --if-not-exists` |
|
|
31
|
+
| `cms-edit run --file x.json` | `cms-edit batch run --file x.json` |
|
|
32
|
+
| `cms-edit colours` | `cms-edit schema colours` |
|
|
33
|
+
| `cms-edit types component` | `cms-edit schema types component` |
|
|
34
|
+
| `cms-edit audit images` | `cms-edit --json asset review --include-usage` |
|
|
35
|
+
| `cms-edit backup` / `restore` / `revert` | `diff` + `discard`; Contentful UI |
|
|
36
|
+
| `cms-edit skill install` | `npx skills add @se-studio/skills` |
|
|
37
|
+
|
|
38
|
+
- db737d9: Add `site-workflows-deps-update` skill for updating dependencies across se-core-product and consumer repos with Next 15 / Node 24 pins, unified no-pnpm-patches enforcement, and pnpm 11.x updates.
|
|
39
|
+
- 1262175: Remove `cms-edit sitemap` command. Use `list --type <type>` for content discovery. Update skills, MCP prompts, and editor task playbooks.
|
|
40
|
+
|
|
41
|
+
## 1.5.0
|
|
42
|
+
|
|
43
|
+
### Minor Changes
|
|
44
|
+
|
|
45
|
+
- bc538fd: Editor-pack capabilities router (`capabilities.json`, `tasks-index`, task playbooks), batch commands (`article-tags-from-json`, `bulk-rtf-replace`, `create person` / `person-from-json`, `ensure person`), and `cms-edit project doctor`.
|
|
46
|
+
|
|
47
|
+
Hosted-first MCP: setup wizard, `cms-edit setup`, `cms-edit-setup` and `cms-edit-mcp` bins, and local install scripts removed. Editors connect via `/cms-edit` OAuth; developers use `cms-edit` CLI (`npx @se-studio/contentful-cms` aliases the CLI).
|
|
48
|
+
|
|
49
|
+
**Breaking:** Do not use local `mcpServers.cms-edit` or `cms-edit setup` — those entry points are removed.
|
|
50
|
+
|
|
3
51
|
## 1.4.4
|
|
4
52
|
|
|
5
53
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -75,6 +75,7 @@ The CLI ships a **subset** of skills under `packages/contentful-cms/skills/` for
|
|
|
75
75
|
| Canonical source (`packages/skills/skills/`) | Bundled name (`packages/contentful-cms/skills/`) |
|
|
76
76
|
|---------------------------------------------|--------------------------------------------------|
|
|
77
77
|
| `contentful-cms-core` | `core` |
|
|
78
|
+
| `contentful-cms-editor-tasks` | `editor-tasks` |
|
|
78
79
|
| `contentful-cms-templates` | `templates` |
|
|
79
80
|
| `contentful-cms-setup` | `setup` |
|
|
80
81
|
|
package/package.json
CHANGED
|
@@ -76,7 +76,7 @@ Output JSON only, no explanation. Format:
|
|
|
76
76
|
]
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
showcaseParams keys must match the cms-edit
|
|
79
|
+
showcaseParams keys must match the cms-edit preview showcase --param format:
|
|
80
80
|
backgroundColour, textColour, showVisual, showLinks, showHeading, etc.
|
|
81
81
|
For a flipped variant, use a separate typeName entry for "Hero Flipped".
|
|
82
82
|
```
|
|
@@ -115,7 +115,7 @@ For a flipped variant, use a separate typeName entry for "Hero Flipped".
|
|
|
115
115
|
|
|
116
116
|
- `label` — used to name the screenshot file: `<typeName-kebab>-<label>.png`
|
|
117
117
|
- `description` — included in the screenshot log and used by the evaluation step
|
|
118
|
-
- `showcaseParams` — key-value pairs passed as `--param key=value` to `cms-edit
|
|
118
|
+
- `showcaseParams` — key-value pairs passed as `--param key=value` to `cms-edit preview showcase` (or `cms-capture-screenshots`)
|
|
119
119
|
|
|
120
120
|
---
|
|
121
121
|
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
{
|
|
2
|
+
"canonicalPatchesScript": "~/source/se/se-core-product/scripts/check-no-pnpm-patches.mjs",
|
|
3
|
+
"pinOverrides": {
|
|
4
|
+
"next": "^15.5.19",
|
|
5
|
+
"@types/node": "^24.13.2"
|
|
6
|
+
},
|
|
7
|
+
"pnpm": {
|
|
8
|
+
"major": 11,
|
|
9
|
+
"engines": "11.x"
|
|
10
|
+
},
|
|
11
|
+
"projects": [
|
|
12
|
+
{
|
|
13
|
+
"key": "se-core-product",
|
|
14
|
+
"displayName": "SE Core Product",
|
|
15
|
+
"path": "~/source/se/se-core-product",
|
|
16
|
+
"branch": "dev",
|
|
17
|
+
"validate": "bash scripts/check-circular-imports.sh && pnpm skills:validate && pnpm format; pnpm type-check",
|
|
18
|
+
"workspace": true,
|
|
19
|
+
"hasPinOverrides": true
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"key": "se2026",
|
|
23
|
+
"displayName": "SE Studio Site",
|
|
24
|
+
"path": "~/source/se/se-website-2026",
|
|
25
|
+
"branch": "develop",
|
|
26
|
+
"validate": "pnpm check && pnpm type-check",
|
|
27
|
+
"workspace": true,
|
|
28
|
+
"hasPinOverrides": false
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"key": "brightline",
|
|
32
|
+
"displayName": "Brightline Sites",
|
|
33
|
+
"path": "~/source/customers/brightline/brightline-sites",
|
|
34
|
+
"branch": "develop",
|
|
35
|
+
"validate": "pnpm -r validate",
|
|
36
|
+
"workspace": true,
|
|
37
|
+
"hasPinOverrides": false
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"key": "om1",
|
|
41
|
+
"displayName": "OM1 Website",
|
|
42
|
+
"path": "~/source/customers/om1/om1-website",
|
|
43
|
+
"branch": "develop",
|
|
44
|
+
"validate": "pnpm check && pnpm type-check && pnpm validate:routes",
|
|
45
|
+
"workspace": true,
|
|
46
|
+
"hasPinOverrides": false
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"key": "pointme",
|
|
50
|
+
"displayName": "PointMe Marketing Site",
|
|
51
|
+
"path": "~/source/customers/pointme/develop-marketing-site",
|
|
52
|
+
"branch": "develop",
|
|
53
|
+
"validate": "pnpm check && pnpm type-check",
|
|
54
|
+
"workspace": true,
|
|
55
|
+
"hasPinOverrides": false
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"key": "pedestal",
|
|
59
|
+
"displayName": "Pedestal Sites",
|
|
60
|
+
"path": "~/source/customers/pedestal/pedestal-sites",
|
|
61
|
+
"branch": "develop",
|
|
62
|
+
"validate": "pnpm -r validate",
|
|
63
|
+
"workspace": true,
|
|
64
|
+
"hasPinOverrides": false
|
|
65
|
+
}
|
|
66
|
+
]
|
|
67
|
+
}
|
|
@@ -15,7 +15,7 @@ If no brand context is available, ask the user about any brand-specific terms be
|
|
|
15
15
|
|
|
16
16
|
## Workflow
|
|
17
17
|
|
|
18
|
-
1. **Get all pages**: `cms-edit
|
|
18
|
+
1. **Get all pages**: `cms-edit list --type page`
|
|
19
19
|
2. **For each page** (or a specific page if the user specified one):
|
|
20
20
|
a. `cms-edit open --page-slug /<slug>` (or `--article-slug` for articles)
|
|
21
21
|
b. `cms-edit snapshot` — identify components with visual/image/media fields
|
|
@@ -7,6 +7,8 @@ description: "Use cms-edit CLI to read/edit Contentful content (open → snapsho
|
|
|
7
7
|
|
|
8
8
|
Use this skill when you need to read or edit content in Contentful CMS using the `cms-edit` CLI tool.
|
|
9
9
|
|
|
10
|
+
**Before editing:** use skill **`contentful-cms-editor-tasks`** to read `tasks-index` and the matching capability playbook for this site (hosted MCP or local `cms-edit/<site>/editor-pack/`).
|
|
11
|
+
|
|
10
12
|
## Overview
|
|
11
13
|
|
|
12
14
|
`cms-edit` lets you read and edit Contentful draft content without publishing. It uses a **snapshot → ref → edit → save** workflow:
|
|
@@ -24,10 +26,14 @@ Use this skill when you need to read or edit content in Contentful CMS using the
|
|
|
24
26
|
- Publish any entry
|
|
25
27
|
- Unpublish any entry
|
|
26
28
|
- Archive or delete published entries
|
|
27
|
-
- Upload new assets
|
|
28
29
|
|
|
29
30
|
All `save` operations create **draft** versions. A human must review and publish in Contentful.
|
|
30
31
|
|
|
32
|
+
**Assets:** Upload **is** supported (`asset upload`). Default workflow: **search and reuse** existing assets first (`index sync` → `asset search`). When uploading:
|
|
33
|
+
- Use a **sensible fileName** and **descriptive title** (and alt text where the site uses it)
|
|
34
|
+
- Avoid oversized images — width over **2000px** is usually wasteful for web (exact limits vary by project; check `asset audit` / media review guidance)
|
|
35
|
+
- Prefer `--if-exists-by-filename` to avoid duplicates
|
|
36
|
+
|
|
31
37
|
## Prerequisites
|
|
32
38
|
|
|
33
39
|
- `.contentful-cms.json` must exist in the project root (or ancestor directory)
|
|
@@ -273,8 +279,8 @@ cms-edit add CTA --content-type component --existing-id 4xKj2abcDef
|
|
|
273
279
|
|
|
274
280
|
Discover available types first:
|
|
275
281
|
```bash
|
|
276
|
-
cms-edit types component
|
|
277
|
-
cms-edit types collection
|
|
282
|
+
cms-edit schema types component
|
|
283
|
+
cms-edit schema types collection
|
|
278
284
|
```
|
|
279
285
|
|
|
280
286
|
### Remove a component
|
|
@@ -430,9 +436,9 @@ cms-edit create tag --json-file tag.json --tag-type presentation-type --if-not-e
|
|
|
430
436
|
cms-edit create taxonomy-from-json --file taxonomy.json --if-not-exists
|
|
431
437
|
|
|
432
438
|
# Idempotent single-entry creates
|
|
433
|
-
cms-edit
|
|
434
|
-
cms-edit
|
|
435
|
-
--description "Annual ASCO conference." --featured-image <logoAssetId>
|
|
439
|
+
cms-edit create tag-type --slug conference-venue --name "Conference Venue" --if-not-exists
|
|
440
|
+
cms-edit create tag --slug asco-2025 --name "ASCO 2025" --tag-type conference-venue \
|
|
441
|
+
--description "Annual ASCO conference." --featured-image <logoAssetId> --if-not-exists
|
|
436
442
|
```
|
|
437
443
|
|
|
438
444
|
See `cms-edit help fields-taxonomy` and `cms-edit help taxonomy-from-json` for field reference and batch schema.
|
|
@@ -457,7 +463,7 @@ cms-edit read @c0 bio
|
|
|
457
463
|
|
|
458
464
|
**Site/runtime:** Resolved **person links** (`IPersonLink` from the REST API — article authors, collection contents, `contentfulAllPersonLinks`, related-people helpers) include **`bio`** when set in CMS. Use for team cards, related-people collections, and markdown/search export — not only full person detail pages.
|
|
459
465
|
|
|
460
|
-
**Idempotent taxonomy:** `--if-not-exists`
|
|
466
|
+
**Idempotent taxonomy:** `--if-not-exists` is check-then-create — safe for sequential imports, not for parallel creates on the same slug.
|
|
461
467
|
|
|
462
468
|
```bash
|
|
463
469
|
# Resolve taxonomy IDs without a session
|
|
@@ -475,8 +481,8 @@ cms-edit search "pricing page"
|
|
|
475
481
|
cms-edit search "hero" --type component
|
|
476
482
|
|
|
477
483
|
# List valid type values
|
|
478
|
-
cms-edit types component
|
|
479
|
-
cms-edit types collection
|
|
484
|
+
cms-edit schema types component
|
|
485
|
+
cms-edit schema types collection
|
|
480
486
|
|
|
481
487
|
# List entries with filters
|
|
482
488
|
cms-edit list --type article --sort date -n 10 # recent articles by publication date
|
|
@@ -485,7 +491,7 @@ cms-edit list --type article --slug my-article # article with a specific slug
|
|
|
485
491
|
cms-edit list --type article --has-field tags # articles where tags field is non-empty
|
|
486
492
|
|
|
487
493
|
# Find draft articles, then peek/open (both support drafts via CMA)
|
|
488
|
-
cms-edit
|
|
494
|
+
cms-edit list --type article --sort date
|
|
489
495
|
cms-edit peek --article-slug resources/blog/my-post
|
|
490
496
|
# Only list --published / resolve --published are published-only
|
|
491
497
|
|
|
@@ -560,7 +566,7 @@ cms-edit save
|
|
|
560
566
|
### Add a new section to a page
|
|
561
567
|
```bash
|
|
562
568
|
cms-edit open --page-slug /products
|
|
563
|
-
cms-edit types component # discover what's available
|
|
569
|
+
cms-edit schema types component # discover what's available
|
|
564
570
|
cms-edit add CTA --after @c3
|
|
565
571
|
cms-edit set @c4 heading "Ready to get started?"
|
|
566
572
|
cms-edit rtf @c4 body --markdown "Join thousands of teams who trust us."
|
|
@@ -576,13 +582,12 @@ cms-edit move @c3 --after @c1 # move section 3 to position 2
|
|
|
576
582
|
cms-edit save
|
|
577
583
|
```
|
|
578
584
|
|
|
579
|
-
##
|
|
585
|
+
## Visual checks
|
|
580
586
|
|
|
581
|
-
|
|
587
|
+
cms-edit does not capture screenshots. Use preview URL commands, then open the URL with a browser MCP (e.g. Chrome DevTools) to verify layout after edits.
|
|
582
588
|
|
|
583
|
-
**
|
|
589
|
+
**Config:** Add `devBaseUrl` to the space in `.contentful-cms.json`:
|
|
584
590
|
|
|
585
|
-
**Config:** Add `devBaseUrl` to the space in `.contentful-cms.json` so the CLI knows where your dev server runs:
|
|
586
591
|
```json
|
|
587
592
|
{
|
|
588
593
|
"spaces": {
|
|
@@ -592,125 +597,57 @@ The `screenshot` command captures a PNG of a component, collection, external com
|
|
|
592
597
|
}
|
|
593
598
|
}
|
|
594
599
|
```
|
|
595
|
-
If omitted, defaults to `http://localhost:3000` with a warning.
|
|
596
|
-
|
|
597
|
-
### From session ref (full-fidelity)
|
|
598
|
-
|
|
599
|
-
`cms-edit screenshot @c0` uses the app's convert API and `/cms/preview/render-json` so **all** entry types render with real converted data: component, collection, externalComponent, person. No separate "mock vs live" for refs.
|
|
600
|
-
|
|
601
|
-
```bash
|
|
602
|
-
# Any entry type (component, collection, externalComponent, person)
|
|
603
|
-
cms-edit screenshot @c0
|
|
604
|
-
|
|
605
|
-
# Full-page capture (auto-applied for component/collection)
|
|
606
|
-
cms-edit screenshot @c0 --full
|
|
607
|
-
|
|
608
|
-
# Just print URL
|
|
609
|
-
cms-edit screenshot @c0 --url-only
|
|
610
|
-
```
|
|
611
|
-
|
|
612
|
-
### From JSON file (no Contentful)
|
|
613
|
-
|
|
614
|
-
Screenshot an IBase* JSON file (e.g. exported from `cms-edit read @c0 --json` or a fixture). App must be running.
|
|
615
600
|
|
|
616
601
|
```bash
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
Uses `/cms/showcase/render` with mock data. Fast, no preview token.
|
|
623
|
-
|
|
624
|
-
```bash
|
|
625
|
-
cms-edit screenshot --component HeroSimple
|
|
626
|
-
cms-edit screenshot --collection CardGrid
|
|
627
|
-
cms-edit screenshot @c0 --embedded --full # when using ref with showcase-style capture
|
|
628
|
-
```
|
|
629
|
-
|
|
630
|
-
### Page screenshots
|
|
631
|
-
|
|
632
|
-
```bash
|
|
633
|
-
# Current open page (uses session root slug)
|
|
634
|
-
cms-edit screenshot
|
|
635
|
-
|
|
636
|
-
# Explicit page slug
|
|
637
|
-
cms-edit screenshot /pricing
|
|
638
|
-
cms-edit screenshot /about-us --full
|
|
639
|
-
```
|
|
640
|
-
|
|
641
|
-
### Options
|
|
642
|
-
|
|
643
|
-
| Flag | Description |
|
|
644
|
-
|------|-------------|
|
|
645
|
-
| `--json-file <path>` | Read IBase* JSON from file and screenshot via render-json (no Contentful) |
|
|
646
|
-
| `--live` | Legacy: use `/cms/preview/render?id=...` for ref (optional; @ref is already full-fidelity) |
|
|
647
|
-
| `--out <path>` | Output file path (default: `./screenshot-<type>-<timestamp>.png`) |
|
|
648
|
-
| `--full` | Full-page capture (passed to `agent-browser screenshot --full`) |
|
|
649
|
-
| `--embedded` | Append `&embedded=true` to showcase URL (suppresses IframeHeightReporter) |
|
|
650
|
-
| `--wait <ms>` | Wait milliseconds after page load before capturing (default: 500) |
|
|
651
|
-
| `--url-only` | Print URL only, do not invoke agent-browser |
|
|
652
|
-
| `--json` | Output `{ ok, url, file }` as JSON |
|
|
653
|
-
|
|
654
|
-
### Visual diffing
|
|
655
|
-
|
|
656
|
-
Use `agent-browser diff screenshot` to compare before/after a content change:
|
|
657
|
-
|
|
658
|
-
```bash
|
|
659
|
-
# 1. Capture baseline before editing
|
|
660
|
-
cms-edit screenshot @c0 --out before.png
|
|
661
|
-
|
|
662
|
-
# 2. Edit content
|
|
663
|
-
cms-edit set @c0 heading "New heading"
|
|
664
|
-
cms-edit save
|
|
665
|
-
|
|
666
|
-
# 3. Capture after
|
|
667
|
-
cms-edit screenshot @c0 --out after.png
|
|
602
|
+
# Page (explicit slug or open session root)
|
|
603
|
+
cms-edit preview url /pricing
|
|
604
|
+
cms-edit open --page-slug /pricing
|
|
605
|
+
cms-edit preview url
|
|
668
606
|
|
|
669
|
-
#
|
|
670
|
-
|
|
607
|
+
# Component or collection showcase (mock data)
|
|
608
|
+
cms-edit preview showcase --component HeroSimple
|
|
609
|
+
cms-edit preview showcase --collection CardGrid --param backgroundColour=Navy
|
|
671
610
|
```
|
|
672
611
|
|
|
673
|
-
|
|
612
|
+
For CMS guidelines batch PNG capture, use `cms-capture-screenshots` from `@se-studio/project-build` (separate from cms-edit; requires agent-browser).
|
|
674
613
|
|
|
675
|
-
|
|
614
|
+
## Undo changes
|
|
676
615
|
|
|
677
|
-
|
|
678
|
-
cms-edit revert @c0 heading # Revert a single field to its original value
|
|
679
|
-
cms-edit revert @c0 # Revert all fields on an entry
|
|
680
|
-
cms-edit revert --all # Revert all modified entries (session stays open)
|
|
681
|
-
```
|
|
616
|
+
There is no field-level revert command. To abandon unsaved edits: `cms-edit diff` to review, then `cms-edit discard` (or `discard --all`). To roll back saved drafts, use the Contentful web app version history.
|
|
682
617
|
|
|
683
|
-
Note: Entries created via `add`
|
|
618
|
+
Note: Entries created via `add` that you have not saved can be removed with `cms-edit remove <ref>`.
|
|
684
619
|
|
|
685
620
|
## Health Check
|
|
686
621
|
|
|
687
622
|
Validate config and connectivity before running a workflow.
|
|
688
623
|
|
|
689
624
|
```bash
|
|
690
|
-
cms-edit health # Check config file, space config, Contentful connectivity
|
|
625
|
+
cms-edit health # Check config file, space config, Contentful connectivity
|
|
691
626
|
```
|
|
692
627
|
|
|
693
628
|
## Schema Inspection
|
|
694
629
|
|
|
695
|
-
Inspect field definitions for a content type.
|
|
630
|
+
Inspect field definitions for a content type. Use `cms-edit schema types <ct>` for type-discriminator values only.
|
|
696
631
|
|
|
697
632
|
```bash
|
|
698
633
|
cms-edit schema component # Show all fields, types, enum values, link targets
|
|
699
634
|
cms-edit schema component --json # Full JSON output
|
|
700
635
|
```
|
|
701
636
|
|
|
702
|
-
##
|
|
637
|
+
## Content catalog (`list`)
|
|
703
638
|
|
|
704
|
-
Browse
|
|
639
|
+
Browse entries by content type (index-backed for catalog types). Run `cms-edit index sync` once per space, or let commands auto-sync.
|
|
705
640
|
|
|
706
641
|
```bash
|
|
707
|
-
cms-edit
|
|
708
|
-
cms-edit
|
|
709
|
-
cms-edit
|
|
710
|
-
cms-edit
|
|
711
|
-
cms-edit
|
|
712
|
-
cms-edit
|
|
713
|
-
cms-edit
|
|
642
|
+
cms-edit list --type page # All pages (label sort)
|
|
643
|
+
cms-edit list --type page --sort updated # Most recently updated first
|
|
644
|
+
cms-edit list --type article --sort date # Articles by publication date
|
|
645
|
+
cms-edit list --type pageVariant # A/B or variant pages
|
|
646
|
+
cms-edit list --type tag --tag-type-name "Topic" # Tags under a tag type
|
|
647
|
+
cms-edit list --type tagType # Tag types
|
|
648
|
+
cms-edit list --type articleType # Article types
|
|
649
|
+
cms-edit list --type navigation # Navigations
|
|
650
|
+
cms-edit list --type person --force-cma # People (not in catalog index)
|
|
714
651
|
```
|
|
715
652
|
|
|
716
653
|
## Peek
|
|
@@ -722,14 +659,14 @@ cms-edit peek --page-slug /pricing # Show snapshot of /pricing; your active se
|
|
|
722
659
|
cms-edit peek --id <entryId> # Look up by entry ID
|
|
723
660
|
```
|
|
724
661
|
|
|
725
|
-
## Batch Operations (run)
|
|
662
|
+
## Batch Operations (batch run)
|
|
726
663
|
|
|
727
664
|
Run a sequence of operations from a JSON file or stdin.
|
|
728
665
|
|
|
729
666
|
```bash
|
|
730
|
-
cms-edit run --file ops.json # Run batch ops from file
|
|
731
|
-
echo '[...]' | cms-edit run # Pipe from stdin
|
|
732
|
-
cms-edit run --file ops.json --dry-run # Validate without saving
|
|
667
|
+
cms-edit batch run --file ops.json # Run batch ops from file
|
|
668
|
+
echo '[...]' | cms-edit batch run # Pipe from stdin
|
|
669
|
+
cms-edit batch run --file ops.json --dry-run # Validate without saving
|
|
733
670
|
```
|
|
734
671
|
|
|
735
672
|
Supported ops: `open`, `set`, `rtf`, `rtf-replace`, `save`, `add`, `links-add`.
|
|
@@ -882,15 +819,12 @@ cms-edit resolve 4xKj2abcDef
|
|
|
882
819
|
|
|
883
820
|
## Inventory & Status
|
|
884
821
|
|
|
885
|
-
Use `
|
|
822
|
+
Use `list --type <type>` for inventory. Catalog types (page, article, pageVariant, template, taxonomy, navigation) use the local index. Use `--force-cma` for other types (person, customType, pageTest) or published-only with `--published`.
|
|
886
823
|
|
|
887
824
|
```bash
|
|
888
|
-
cms-edit
|
|
889
|
-
cms-edit
|
|
890
|
-
cms-edit
|
|
891
|
-
cms-edit sitemap --sort updated # Most recently updated first
|
|
892
|
-
cms-edit sitemap --tree # Tree view
|
|
893
|
-
cms-edit sitemap --include page,article # Include articles
|
|
825
|
+
cms-edit list --type page
|
|
826
|
+
cms-edit list --type article --sort date -n 20
|
|
827
|
+
cms-edit index dump --reference-only # Full catalog snapshot in terminal
|
|
894
828
|
```
|
|
895
829
|
|
|
896
830
|
**Note on bulk publish:** The tool cannot publish entries — all saves create drafts only. This is intentional. Review and publish drafts from the Contentful web app.
|
|
@@ -906,4 +840,4 @@ cms-edit --session agent-2 open --article-slug /blog
|
|
|
906
840
|
|
|
907
841
|
## Related skills
|
|
908
842
|
|
|
909
|
-
For templates see the **templates** skill; for navigation see the **navigation** skill; for rich text and embeds see the **rich-text** skill
|
|
843
|
+
For templates see the **templates** skill; for navigation see the **navigation** skill; for rich text and embeds see the **rich-text** skill.
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: contentful-cms-editor-tasks
|
|
3
|
+
description: "Route CMS editing intents to site task playbooks via tasks-index (hosted MCP resources or local editor-pack files)."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Skill: cms-edit editor tasks
|
|
7
|
+
|
|
8
|
+
Use this skill **before any Contentful edit** to pick the right capability playbook for the user's goal. Do not improvise workflows — read the site brain first.
|
|
9
|
+
|
|
10
|
+
## Pit-of-success order
|
|
11
|
+
|
|
12
|
+
1. **tasks-index** — which tasks apply on this site
|
|
13
|
+
2. **capabilities** — what content types and bulk mechanisms exist
|
|
14
|
+
3. **checklist** — pre-flight checks
|
|
15
|
+
4. **overview** + **routing** — site rules and URL shapes
|
|
16
|
+
5. **task-*** playbook — steps, confirmation gates, out-of-scope
|
|
17
|
+
6. **components-index** — when creating or editing page content
|
|
18
|
+
|
|
19
|
+
## Hosted (Claude Integrations + OAuth)
|
|
20
|
+
|
|
21
|
+
Claude cannot read `cms-edit://customer/*` URIs directly — use the MCP tools:
|
|
22
|
+
|
|
23
|
+
```text
|
|
24
|
+
cms_edit ["customer", "tasks-index"]
|
|
25
|
+
cms_edit ["customer", "capabilities"]
|
|
26
|
+
cms_edit ["customer", "checklist"]
|
|
27
|
+
cms_edit ["customer", "task-create-article"] # example — pick from tasks-index
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Or `cms_edit_customer` with resource `tasks-index`, then the `task-*` name from the index.
|
|
31
|
+
|
|
32
|
+
**Never pass `--space`** on hosted MCP — the deployment is already bound to one site.
|
|
33
|
+
|
|
34
|
+
After connect, verify with: `Read the cms-edit guide and tasks-index`.
|
|
35
|
+
|
|
36
|
+
## Local (Cursor / Grok / Codex / CLI)
|
|
37
|
+
|
|
38
|
+
Read committed files in the customer repo (paths vary by layout):
|
|
39
|
+
|
|
40
|
+
| Layout | Editor pack |
|
|
41
|
+
|--------|-------------|
|
|
42
|
+
| Single-site | `cms-edit/editor-pack/` |
|
|
43
|
+
| Multi-site | `cms-edit/<site>/editor-pack/` |
|
|
44
|
+
|
|
45
|
+
Minimum reads:
|
|
46
|
+
|
|
47
|
+
- `capabilities.json`
|
|
48
|
+
- `tasks-index.md`
|
|
49
|
+
- `checklist.md`
|
|
50
|
+
- Matching `task-*.md` for the user's intent
|
|
51
|
+
|
|
52
|
+
Then use **`contentful-cms-core`** for `cms-edit` CLI commands.
|
|
53
|
+
|
|
54
|
+
## Confirmation gates (all tasks)
|
|
55
|
+
|
|
56
|
+
Capability playbooks require:
|
|
57
|
+
|
|
58
|
+
1. **Propose** scope to the user — wait for approval
|
|
59
|
+
2. **Dry-run** when available (`--dry-run`, `bulk-rtf-replace --dry-run`, etc.)
|
|
60
|
+
3. **`diff`** before every `save`
|
|
61
|
+
4. **Summarize** what changed; remind that publish is manual in Contentful
|
|
62
|
+
|
|
63
|
+
## Media default
|
|
64
|
+
|
|
65
|
+
**Search and reuse assets first** (`index sync` → `asset search`). Upload only when no match; use `--if-exists-by-filename` when uploading.
|
|
66
|
+
|
|
67
|
+
## When the pack is stale
|
|
68
|
+
|
|
69
|
+
Run `contentful-cms-regenerate-editor-pack` after:
|
|
70
|
+
|
|
71
|
+
- New component/collection registrations
|
|
72
|
+
- `docs/cms-guidelines/**` changes
|
|
73
|
+
- `constants.ts` routing changes
|
|
74
|
+
|
|
75
|
+
Then `cms-edit project doctor --project-config cms-edit/<site>/project.json`.
|
|
76
|
+
|
|
77
|
+
## Related skills
|
|
78
|
+
|
|
79
|
+
| Skill | When |
|
|
80
|
+
|-------|------|
|
|
81
|
+
| `contentful-cms-core` | CLI command reference |
|
|
82
|
+
| `contentful-cms-setup` | First-time hosted MCP connect |
|
|
83
|
+
| `contentful-cms-regenerate-editor-pack` | Refresh editor-pack in git |
|
|
@@ -115,9 +115,56 @@ Space key: `brightline` (space ID `96gdpqkm7elu`).
|
|
|
115
115
|
|
|
116
116
|
Production page URLs and definitive unused-asset detection need CMA `links_to_asset` or a production crawl. When available, add columns `prodUrls` and `cmsUsages` to the spreadsheet.
|
|
117
117
|
|
|
118
|
+
## Image guide (optional)
|
|
119
|
+
|
|
120
|
+
Use this extension when the client wants a **reference guide** for all CMS images (Markdown + HTML), not just a quality spreadsheet.
|
|
121
|
+
|
|
122
|
+
### Gather structural data
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
cms-edit index sync --space <space-key>
|
|
126
|
+
cms-edit --json asset review --include-usage --include-passing --space <space-key> > /tmp/image-inventory.json
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Each asset in JSON includes `usages[]`: slug-bearing ancestors (page, article, tag, person, etc.) that ultimately use the asset.
|
|
130
|
+
|
|
131
|
+
To inspect how images relate to a specific page, use `cms-edit open --page-slug /<slug>` + `snapshot`, or `cms-edit peek --page-slug /<slug>` without affecting your session.
|
|
132
|
+
|
|
133
|
+
### Description cache
|
|
134
|
+
|
|
135
|
+
Store AI-generated visual descriptions per asset (avoids re-inspecting on reruns):
|
|
136
|
+
|
|
137
|
+
```
|
|
138
|
+
docs/descriptions/{assetId}.json
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
Per-image format:
|
|
142
|
+
|
|
143
|
+
```json
|
|
144
|
+
{
|
|
145
|
+
"subjects": "...",
|
|
146
|
+
"setting": "...",
|
|
147
|
+
"composition": "...",
|
|
148
|
+
"colours": "...",
|
|
149
|
+
"mood": "...",
|
|
150
|
+
"style": "...",
|
|
151
|
+
"constraints": "...",
|
|
152
|
+
"whenToUse": "...",
|
|
153
|
+
"inspectedAt": "2026-04-15T10:00:00Z"
|
|
154
|
+
}
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
**Write-through caching:** After inspecting each new image, write `docs/descriptions/{assetId}.json` before moving to the next. Skip vision calls when the cache file exists.
|
|
158
|
+
|
|
159
|
+
### Output files
|
|
160
|
+
|
|
161
|
+
- `docs/image-guide.md` — AI-consumable Markdown (chunk writes: ~35 images per append)
|
|
162
|
+
- `docs/image-guide.html` — self-contained human reference (chunk writes: ~15–20 cards per append)
|
|
163
|
+
|
|
164
|
+
Use CDN URLs with `?w=800&q=85` for previews. Group entries by page using `usages[]` from the review JSON.
|
|
165
|
+
|
|
118
166
|
## Related
|
|
119
167
|
|
|
120
168
|
- `contentful-cms-alt-text-audit` — per-page alt text fixes
|
|
121
|
-
- `contentful-cms-image-guide` — full image inventory with AI descriptions
|
|
122
169
|
- `cms-edit asset audit` — missing alt only (narrower, faster)
|
|
123
170
|
- `cms-edit asset set-description <id> "alt"` — fix alt text on an asset
|
|
@@ -15,7 +15,7 @@ If no brand context is available, ask the user for these details.
|
|
|
15
15
|
|
|
16
16
|
## Phase 1: Analyse Site Structure
|
|
17
17
|
|
|
18
|
-
1. `cms-edit
|
|
18
|
+
1. `cms-edit list --type page` and `cms-edit list --type article` for inventory
|
|
19
19
|
2. For each page, use `fetch_page_markdown` (from site-workflows MCP server) to read content
|
|
20
20
|
3. Categorise each page by Schema.org type:
|
|
21
21
|
|
|
@@ -15,15 +15,15 @@ If no brand context is available, ask the user about their brand voice and targe
|
|
|
15
15
|
|
|
16
16
|
## Workflow
|
|
17
17
|
|
|
18
|
-
1. **Get all pages**: `cms-edit
|
|
18
|
+
1. **Get all pages**: `cms-edit list --type page`
|
|
19
19
|
2. **For each page** (or a specific page):
|
|
20
20
|
a. **Read page content** using `fetch_page_markdown` (from the site-workflows MCP server) to understand what the page covers
|
|
21
21
|
b. **Check current SEO**:
|
|
22
22
|
- `cms-edit open --page-slug /<slug>` (or `--article-slug` for articles)
|
|
23
|
-
- `cms-edit read @
|
|
23
|
+
- `cms-edit snapshot` then `cms-edit read @p0 description` (or `read @p0` for all fields)
|
|
24
24
|
c. **Analyse** the page — primary purpose, problem it solves, desired user action
|
|
25
25
|
d. **Generate** a meta description following the guidelines below
|
|
26
|
-
e. `cms-edit set @
|
|
26
|
+
e. `cms-edit set @p0 description "new description"`
|
|
27
27
|
f. `cms-edit diff` then `cms-edit save`
|
|
28
28
|
|
|
29
29
|
## Meta Description Guidelines
|
|
@@ -1,26 +1,19 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: contentful-cms-setup
|
|
3
|
-
description: "Guide a user through
|
|
3
|
+
description: "Guide a user through connecting hosted cms-edit MCP for Claude (Integrations + OAuth)."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Skill: cms-edit Setup
|
|
7
7
|
|
|
8
|
-
Use this skill when the user wants to
|
|
8
|
+
Use this skill when the user wants to connect Claude to their Contentful site via **hosted cms-edit MCP**.
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
| Path | When to use |
|
|
13
|
-
|------|-------------|
|
|
14
|
-
| **Hosted (Integrations)** | Content editor; SE sent an onboarding URL (e.g. `/cms-edit`); no Node.js |
|
|
15
|
-
| **Local (setup wizard)** | Developer; multi-space; or no hosted deployment |
|
|
16
|
-
|
|
17
|
-
Ask which applies if unclear.
|
|
10
|
+
Local stdio MCP and the setup wizard are **not supported**. Editors connect through the site's `/cms-edit` onboarding flow.
|
|
18
11
|
|
|
19
12
|
---
|
|
20
13
|
|
|
21
14
|
## Hosted setup (Claude Integrations + OAuth)
|
|
22
15
|
|
|
23
|
-
Use when SE sent an **onboarding link** (e.g. `https://your-site.content.se.studio/cms-edit`).
|
|
16
|
+
Use when SE sent an **onboarding link** (e.g. `https://your-site.content.se.studio/cms-edit`).
|
|
24
17
|
|
|
25
18
|
### Step 1: Connect to Claude
|
|
26
19
|
|
|
@@ -34,93 +27,34 @@ Full editor guide: `packages/contentful-cms/HOSTED.md`
|
|
|
34
27
|
|
|
35
28
|
### Step 2: Verify
|
|
36
29
|
|
|
37
|
-
In Claude, ask to read the cms-edit guide
|
|
30
|
+
In Claude, ask to read the cms-edit guide and **tasks-index**, then verify the connection. If `cms_edit` returns content, setup is complete.
|
|
31
|
+
|
|
32
|
+
Use skill **`contentful-cms-editor-tasks`** for the tasks-index → capability playbook workflow.
|
|
38
33
|
|
|
39
34
|
**Reconnect:** Settings → Integrations → Connect again if the connection stops working.
|
|
40
35
|
|
|
41
36
|
---
|
|
42
37
|
|
|
43
|
-
##
|
|
44
|
-
|
|
45
|
-
## Overview
|
|
46
|
-
|
|
47
|
-
The setup wizard handles everything automatically:
|
|
48
|
-
- Collects the Contentful Management Token
|
|
49
|
-
- Discovers spaces and environments via the Contentful API
|
|
50
|
-
- Writes `~/.contentful-cms.json`
|
|
51
|
-
- Updates the Claude Desktop config to register the `cms-edit` MCP server
|
|
52
|
-
|
|
53
|
-
## Prerequisites
|
|
54
|
-
|
|
55
|
-
The user needs:
|
|
56
|
-
1. **Node.js** installed (LTS version from [nodejs.org](https://nodejs.org))
|
|
57
|
-
2. **A Contentful Management Token** — see Step 1 below
|
|
58
|
-
|
|
59
|
-
## Step 1: Get a Management Token
|
|
60
|
-
|
|
61
|
-
Tell the user:
|
|
62
|
-
|
|
63
|
-
> To get your Contentful Management Token:
|
|
64
|
-
> 1. Log in to [contentful.com](https://app.contentful.com)
|
|
65
|
-
> 2. Go to **Settings → API keys**
|
|
66
|
-
> 3. Click the **Content management tokens** tab
|
|
67
|
-
> 4. Click **Generate personal token**, name it `Claude Desktop`, and click **Generate**
|
|
68
|
-
> 5. Copy the token — you won't see it again
|
|
69
|
-
|
|
70
|
-
Ask them to confirm they have the token before continuing.
|
|
38
|
+
## Developers (CLI + skills, not local MCP)
|
|
71
39
|
|
|
72
|
-
|
|
40
|
+
For engineering work in a site repo (Cursor, Grok, terminal):
|
|
73
41
|
|
|
74
|
-
|
|
42
|
+
1. Configure `.contentful-cms.json` in the project (or `~/.contentful-cms.json`) with space credentials
|
|
43
|
+
2. Run `npx skills add @se-studio/skills` or `pnpm skills:sync` in the monorepo
|
|
44
|
+
3. Bundled cms-edit skills (`core`, `setup`, etc.) are included when you run `npx skills add @se-studio/skills`
|
|
45
|
+
4. Read `cms-edit/<site>/editor-pack/tasks-index.md` before editing content
|
|
75
46
|
|
|
76
|
-
|
|
77
|
-
npx @se-studio/contentful-cms@latest setup
|
|
78
|
-
```
|
|
47
|
+
Do **not** register a local `mcpServers.cms-edit` entry in Claude Desktop — use the hosted connector URL instead.
|
|
79
48
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
| Prompt | What to enter |
|
|
83
|
-
|--------|--------------|
|
|
84
|
-
| **Contentful Management Token** | The token they just copied (input will be hidden) |
|
|
85
|
-
| **Which Contentful space?** | Only appears if the token has multiple spaces — pick the one they want to connect |
|
|
86
|
-
| **Which environment?** | Auto-selects `master`; only asks if no `master` environment exists |
|
|
87
|
-
| **Short name for this project** | A slug like `my-project` or `om1` — used as the key in the config file |
|
|
88
|
-
| **Staging site URL** | Optional — their Vercel preview URL (e.g. `https://my-project.vercel.app`) |
|
|
89
|
-
| **Vercel bypass token** | Optional — only if their staging site has deployment protection |
|
|
90
|
-
|
|
91
|
-
## Step 3: Restart Claude Desktop
|
|
92
|
-
|
|
93
|
-
After the wizard completes, tell the user:
|
|
94
|
-
|
|
95
|
-
> Fully quit Claude Desktop and reopen it.
|
|
96
|
-
> - **Mac:** Right-click the Dock icon → **Quit** (closing the window isn't enough)
|
|
97
|
-
> - **Windows/Linux:** Close and reopen from the Start menu
|
|
98
|
-
|
|
99
|
-
## Step 4: Verify
|
|
100
|
-
|
|
101
|
-
Once they've reopened Claude Desktop, verify the setup worked by using the `cms_edit` tool:
|
|
102
|
-
|
|
103
|
-
```
|
|
104
|
-
cms_edit ["open", "/"]
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
If it returns a page structure, setup is complete. If it errors, see Troubleshooting below.
|
|
49
|
+
---
|
|
108
50
|
|
|
109
51
|
## Troubleshooting
|
|
110
52
|
|
|
111
|
-
**
|
|
112
|
-
→
|
|
113
|
-
|
|
114
|
-
**"No spaces found"**
|
|
115
|
-
→ The token doesn't have access to any spaces. Check Contentful's token permissions — it needs at least read access to one space.
|
|
116
|
-
|
|
117
|
-
**`cms_edit` tool not available after restart**
|
|
118
|
-
→ Check the Claude Desktop config was written correctly:
|
|
119
|
-
- Mac: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
120
|
-
- Windows: `%APPDATA%\Claude\claude_desktop_config.json`
|
|
121
|
-
- Linux: `~/.config/Claude/claude_desktop_config.json`
|
|
53
|
+
**OAuth / sign-in fails**
|
|
54
|
+
→ Confirm the user was invited to the Contentful space and is signing in with the correct account.
|
|
122
55
|
|
|
123
|
-
|
|
56
|
+
**`cms_edit` tool not available**
|
|
57
|
+
→ Reconnect via `/cms-edit` or Claude Integrations. Remove any legacy local MCP or `.mcpb` extension entries.
|
|
124
58
|
|
|
125
|
-
**
|
|
126
|
-
→
|
|
59
|
+
**Connection works but wrong site**
|
|
60
|
+
→ Each connector URL is site-specific; use the URL from the project's `/cms-edit` page.
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: site-workflows-deps-update
|
|
3
|
+
description: "Update npm dependencies to latest across se-core-product and consumer SE Studio sites, one repo at a time. Pins Next.js 15 and Node 24, updates pnpm to latest 11.x, enforces no pnpm patches everywhere. Validates, commits, and pushes to dev/develop. Use when asked to update outdated packages or bump dependencies."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# SE dependency update (one project at a time)
|
|
7
|
+
|
|
8
|
+
Update npm dependencies to **latest** in se-core-product and consumer repos that use `@se-studio/*` packages.
|
|
9
|
+
|
|
10
|
+
**Registry:** [`packages/skills/references/deps-update/projects.registry.json`](../../references/deps-update/projects.registry.json) — paths, branches, validate commands.
|
|
11
|
+
|
|
12
|
+
**Default:** Process **one repo per invocation**. At the end, summarize changes and offer the next project.
|
|
13
|
+
|
|
14
|
+
**Never:** push to `main`/`master`; bump Next to 16; bump Node to 25+; use `pnpm patch` / `patchedDependencies` / `patches/`.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Projects
|
|
19
|
+
|
|
20
|
+
| key | displayName | branch |
|
|
21
|
+
|-----|-------------|--------|
|
|
22
|
+
| `se-core-product` | SE Core Product | `dev` |
|
|
23
|
+
| `se2026` | SE Studio Site | `develop` |
|
|
24
|
+
| `brightline` | Brightline Sites | `develop` |
|
|
25
|
+
| `om1` | OM1 Website | `develop` |
|
|
26
|
+
| `pointme` | PointMe Marketing Site | `develop` |
|
|
27
|
+
| `pedestal` | Pedestal Sites | `develop` |
|
|
28
|
+
|
|
29
|
+
User may name a key (`update deps in om1`) or ask to run through all projects sequentially.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Step 1 — Preflight
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
node -v # must be v24.x
|
|
37
|
+
pnpm -v # must be v11.x
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
In the target repo:
|
|
41
|
+
|
|
42
|
+
1. Confirm the path from the registry exists; abort if missing.
|
|
43
|
+
2. `git fetch origin && git checkout <branch> && git pull`
|
|
44
|
+
3. Working tree must be clean (or user explicitly approves stash).
|
|
45
|
+
4. Record `pnpm outdated -r` output for the commit summary.
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## Step 2 — Bootstrap no-pnpm-patches check (all repos)
|
|
50
|
+
|
|
51
|
+
Pedestal already ships `scripts/check-no-pnpm-patches.mjs`; other consumer repos may not. **Every project** must run this check — do not rely on only pedestal's custom validate script.
|
|
52
|
+
|
|
53
|
+
If `scripts/check-no-pnpm-patches.mjs` is missing, copy the canonical script:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
mkdir -p scripts
|
|
57
|
+
cp ~/source/se/se-core-product/scripts/check-no-pnpm-patches.mjs scripts/check-no-pnpm-patches.mjs
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Commit the bootstrap copy as part of the deps update commit when you add it.
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Step 3 — Pin overrides (before `--latest`)
|
|
65
|
+
|
|
66
|
+
`pnpm update -r --latest` would bump `next` → 16 and `@types/node` → 26. Add or verify this block in `pnpm-workspace.yaml` (values from registry `pinOverrides`):
|
|
67
|
+
|
|
68
|
+
```yaml
|
|
69
|
+
overrides:
|
|
70
|
+
next: ^15.5.19
|
|
71
|
+
'@types/node': ^24.13.2
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Skip if `hasPinOverrides` is already true and values match. Idempotent — merge into existing `pnpm-workspace.yaml` without removing other keys (`minimumReleaseAge`, `allowBuilds`, etc.).
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## Step 4 — Update pnpm (all repos)
|
|
79
|
+
|
|
80
|
+
Bump the package manager to the **latest pnpm 11.x** in root `package.json`:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
LATEST_PNPM=$(npm view pnpm@11 version)
|
|
84
|
+
# Set "packageManager": "pnpm@<LATEST_PNPM>" in package.json
|
|
85
|
+
corepack use pnpm@${LATEST_PNPM}
|
|
86
|
+
pnpm -v # confirm matches packageManager
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Keep `engines.pnpm` at `11.x` (do not jump to pnpm 12). If `engines.pnpm` is missing, add `"pnpm": "11.x"` alongside `"node": "24.x"`.
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## Step 5 — Update dependencies
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
pnpm update -r --latest
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
If brightline or pedestal repos block fresh packages (`minimumReleaseAge: 1440`), retry with:
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
pnpm update -r --latest --no-minimum-release-age
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Safety re-pin after update:
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
pnpm update -r next@^15 @types/node@^24
|
|
109
|
+
pnpm install
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Verify pins held:
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
pnpm outdated -r | rg '^(next|@types/node)' || true
|
|
116
|
+
rg '"node"' package.json apps/*/package.json packages/*/package.json 2>/dev/null | rg -v '24' || true
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
`engines.node` must stay `24.x` or `>=24.0.0 <25` — revert any accidental bump to 25+.
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## Step 6 — Validate (unified for all repos)
|
|
124
|
+
|
|
125
|
+
Always run the patches check **once**, then the project validate from the registry:
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
node scripts/check-no-pnpm-patches.mjs && <validate from registry>
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
Registry `validate` commands intentionally **exclude** the patches check so every project uses the same enforcement. Do not skip this step for repos that lack it in their `package.json` scripts today.
|
|
132
|
+
|
|
133
|
+
On failure: fix if trivial; otherwise `git checkout -- .` and stop **without** pushing.
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## Step 7 — Commit and push
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
git add -A
|
|
141
|
+
git commit -m "chore(deps): update dependencies (<displayName>)"
|
|
142
|
+
git push origin <branch>
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
- se-core-product → `dev`
|
|
146
|
+
- All consumer repos → `develop`
|
|
147
|
+
- **Never** push to `main`/`master`
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## Step 8 — Report
|
|
152
|
+
|
|
153
|
+
Include in the summary:
|
|
154
|
+
|
|
155
|
+
- Major dependency bumps (from the Step 1 audit diff)
|
|
156
|
+
- pnpm version: before → after
|
|
157
|
+
- Confirmed pins: Next 15.x, Node 24, `@types/node` ^24
|
|
158
|
+
- Patches check bootstrapped (yes/no)
|
|
159
|
+
- Remaining projects not yet updated
|
|
160
|
+
|
|
161
|
+
Offer to continue with the next project.
|
|
162
|
+
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
## Optional: align `package.json` validate scripts
|
|
166
|
+
|
|
167
|
+
After a successful update, you may add the patches check to the root `validate` script in consumer repos that lack it:
|
|
168
|
+
|
|
169
|
+
```json
|
|
170
|
+
"validate": "node scripts/check-no-pnpm-patches.mjs && pnpm check && pnpm type-check"
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
This is optional follow-up — the skill workflow always runs the check regardless.
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
## Troubleshooting
|
|
178
|
+
|
|
179
|
+
| Issue | Action |
|
|
180
|
+
|-------|--------|
|
|
181
|
+
| `next` or `@types/node` still outdated to wrong major | Re-run overrides + safety re-pin; check `pnpm-workspace.yaml` overrides |
|
|
182
|
+
| `corepack use` fails | Run `corepack enable` once, retry |
|
|
183
|
+
| Validate fails after major bump | Check breaking-change release notes; fix or revert |
|
|
184
|
+
| Repo path missing | Skip; note in report — see `docs/RELATED_PROJECTS.md` |
|
|
185
|
+
| Patches check fails | Remove `patchedDependencies` / `patches/` — patches are forbidden in all SE repos |
|
|
@@ -83,6 +83,16 @@ The user's email address is [USER_EMAIL].
|
|
|
83
83
|
|
|
84
84
|
# currentDate
|
|
85
85
|
Today's date is [CURRENT_DATE].
|
|
86
|
+
|
|
87
|
+
## CMS editing (cms-edit)
|
|
88
|
+
|
|
89
|
+
Before any Contentful content edit:
|
|
90
|
+
|
|
91
|
+
1. Read `cms-edit/<site>/editor-pack/capabilities.json` and `tasks-index.md` (skill: `contentful-cms-editor-tasks`)
|
|
92
|
+
2. **Hosted (Claude Integrations):** connect to the site's MCP URL; read `tasks-index` via `cms_edit ["customer", "tasks-index"]` — never pass `--space`
|
|
93
|
+
3. **Local / Cursor / Grok:** `npx skills add @se-studio/skills` — use `contentful-cms-editor-tasks` then `contentful-cms-core`
|
|
94
|
+
4. Regenerate editor pack after registration or guideline changes (`contentful-cms-regenerate-editor-pack`)
|
|
95
|
+
5. Run `cms-edit project doctor --project-config cms-edit/<site>/project.json` after pack changes
|
|
86
96
|
```
|
|
87
97
|
|
|
88
98
|
---
|
|
@@ -1,240 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: contentful-cms-image-guide
|
|
3
|
-
description: "Generate a comprehensive image guide (both Markdown and HTML) for a site's CMS image assets, with rich AI-generated visual descriptions and content relationship trees."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Skill: contentful-cms — Image Guide
|
|
7
|
-
|
|
8
|
-
Use this skill to generate a **fully enriched image guide** for a site. The guide documents every image in the CMS with:
|
|
9
|
-
- Rich visual descriptions generated by inspecting each image
|
|
10
|
-
- Content relationship tree showing which pages/components use each image
|
|
11
|
-
- Two output formats: Markdown (AI-consumable) and HTML (human reference)
|
|
12
|
-
|
|
13
|
-
The output files are written to the app's `docs/` directory (or a path you specify).
|
|
14
|
-
|
|
15
|
-
## When to use
|
|
16
|
-
|
|
17
|
-
- Client or team wants a reference guide for all images in the CMS
|
|
18
|
-
- Need to know where a specific image is used across the site
|
|
19
|
-
- Preparing image guidance for AI agents that will be choosing images
|
|
20
|
-
- Auditing image coverage or identifying unused assets
|
|
21
|
-
|
|
22
|
-
## Prerequisites
|
|
23
|
-
|
|
24
|
-
- `cms-edit` is configured for the target space (run `cms-edit health` to verify)
|
|
25
|
-
- You have read access to the image URLs (standard Contentful CDN URLs work)
|
|
26
|
-
- The app directory is known (e.g. `apps/example-brightlifekids/`)
|
|
27
|
-
|
|
28
|
-
## Brand Context
|
|
29
|
-
|
|
30
|
-
Before starting, check if a brand context skill is available (e.g., "BrightLife Kids Brand Context"). If so, incorporate brand terminology in the descriptions and "When to use" guidance.
|
|
31
|
-
|
|
32
|
-
---
|
|
33
|
-
|
|
34
|
-
## Workflow
|
|
35
|
-
|
|
36
|
-
### Step 0 — Load description cache
|
|
37
|
-
|
|
38
|
-
Each image's description is stored as its own small file to avoid token-limit issues when reading or writing:
|
|
39
|
-
|
|
40
|
-
```
|
|
41
|
-
docs/descriptions/{assetId}.json
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
**To check if an image is already cached:**
|
|
45
|
-
```bash
|
|
46
|
-
ls docs/descriptions/{assetId}.json 2>/dev/null && echo "cached" || echo "not cached"
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
**Per-image file format:**
|
|
50
|
-
```json
|
|
51
|
-
{
|
|
52
|
-
"subjects": "...",
|
|
53
|
-
"setting": "...",
|
|
54
|
-
"composition": "...",
|
|
55
|
-
"colours": "...",
|
|
56
|
-
"mood": "...",
|
|
57
|
-
"style": "...",
|
|
58
|
-
"constraints": "...",
|
|
59
|
-
"whenToUse": "...",
|
|
60
|
-
"inspectedAt": "2026-04-15T10:00:00Z"
|
|
61
|
-
}
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
**Write-through caching — CRITICAL:** After visually inspecting each NEW image, immediately write its description to `docs/descriptions/{assetId}.json` using the Write tool BEFORE inspecting the next image. One image → one Write call → next image. Each file is tiny (~1KB), so no token limits apply.
|
|
65
|
-
|
|
66
|
-
If `docs/descriptions/{assetId}.json` already exists, read it and use the cached data — **skip the vision call entirely**.
|
|
67
|
-
|
|
68
|
-
At the end of the run, report: `N from cache, M newly inspected`.
|
|
69
|
-
|
|
70
|
-
**Phase discipline — cache first, guides second:** Complete ALL image inspections and per-image cache writes before starting any guide file. Do not interleave inspection with guide writing.
|
|
71
|
-
|
|
72
|
-
> **Note:** If a legacy `docs/image-descriptions-cache.json` file exists, ignore it. The per-file cache supersedes it.
|
|
73
|
-
|
|
74
|
-
### Step 1 — Gather structural data
|
|
75
|
-
|
|
76
|
-
Run the audit command to get all images and their page/component usages:
|
|
77
|
-
|
|
78
|
-
```bash
|
|
79
|
-
cms-edit --json audit images
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
This outputs JSON with every image asset including:
|
|
83
|
-
- Asset ID, title, filename, dimensions, MIME type, CDN URL
|
|
84
|
-
- `usages[]`: the slug-bearing ancestors (page, article, articleType, pageVariant, tag, person) that ultimately use this asset. Intermediate wrapper entries (media, visual, component, etc.) are walked through transparently and not included. Each usage has `{ id, contentType, label, slug }`.
|
|
85
|
-
|
|
86
|
-
Save the output to a temporary file or keep it in context.
|
|
87
|
-
|
|
88
|
-
If the output is large, focus on images grouped by page. Use `cms-edit audit tree --page /<slug>` to see the relationship tree for a specific page:
|
|
89
|
-
|
|
90
|
-
```bash
|
|
91
|
-
cms-edit audit tree --page /
|
|
92
|
-
cms-edit audit tree --page /families
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
### Step 2 — Inspect each image visually
|
|
96
|
-
|
|
97
|
-
For each image in the JSON output, fetch the image URL and inspect it carefully. The CDN URL supports resize parameters — use `?w=800&q=85` for a good preview:
|
|
98
|
-
|
|
99
|
-
```
|
|
100
|
-
https://images.ctfassets.net/{spaceId}/{assetId}/{hash}/{filename}?w=800&q=85
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
For each image generate a **visual description** covering ALL of these fields:
|
|
104
|
-
|
|
105
|
-
| Field | What to capture |
|
|
106
|
-
|-------|----------------|
|
|
107
|
-
| **Subjects** | Count of people, apparent ages, genders (if relevant), expressions, what they are doing |
|
|
108
|
-
| **Setting** | Indoor/outdoor, room type or environment, background detail level, time of day |
|
|
109
|
-
| **Composition** | Landscape or portrait, crop tightness (headshot / mid-shot / wide / full-bleed), focal point position, negative space |
|
|
110
|
-
| **Colours** | 3–5 dominant colours with approximate descriptions (e.g. "warm cream, sage green, muted terracotta"), warm vs cool tone, contrast level |
|
|
111
|
-
| **Mood** | One or two words: playful, warm, clinical, energetic, calm, aspirational, inclusive, serious |
|
|
112
|
-
| **Style** | Photography (stock / custom-produced), illustration, icon, UI mockup, logo |
|
|
113
|
-
| **Constraints** | What the image does NOT have — e.g. "no text overlay space", "subject fills frame", "no negative space for overlay", "transparent background" |
|
|
114
|
-
|
|
115
|
-
For icons, logos, and UI mockups, the description can be shorter and focus on what the graphic represents and its visual style.
|
|
116
|
-
|
|
117
|
-
### Step 3 — Determine "When to use" guidance
|
|
118
|
-
|
|
119
|
-
Based on the image's current usages and its visual content, write a concise "When to use" paragraph covering:
|
|
120
|
-
- Component types it suits (Hero, CtaCard, wide-format, etc.)
|
|
121
|
-
- Content topics or page contexts where it fits
|
|
122
|
-
- What NOT to use it for (age group constraints, format constraints, etc.)
|
|
123
|
-
- Any reuse notes (e.g. "also used as /partners hero — suitable for both card and full-width formats")
|
|
124
|
-
|
|
125
|
-
### Step 4 — Write the Markdown guide
|
|
126
|
-
|
|
127
|
-
Output path: `docs/image-guide.md` inside the app directory (e.g. `apps/example-brightlifekids/docs/image-guide.md`).
|
|
128
|
-
|
|
129
|
-
**IMPORTANT — chunked writing to avoid output token limits:** The guide file will be large (many KB). Never try to write the entire file in a single Write tool call. Instead, use bash heredoc append operations in batches:
|
|
130
|
-
|
|
131
|
-
```bash
|
|
132
|
-
# First call — write file header + first ~35 images (use actual app path)
|
|
133
|
-
cat > apps/example-brightlifekids/docs/image-guide.md << 'MDEOF'
|
|
134
|
-
# BrightLife Kids — Image Guide
|
|
135
|
-
|
|
136
|
-
> Generated 2026-04-15. Space: blk. 202 images documented.
|
|
137
|
-
...
|
|
138
|
-
## Image 1 · filename.jpg
|
|
139
|
-
...
|
|
140
|
-
MDEOF
|
|
141
|
-
|
|
142
|
-
# Subsequent calls — APPEND next batch (note >>)
|
|
143
|
-
cat >> apps/example-brightlifekids/docs/image-guide.md << 'MDEOF'
|
|
144
|
-
## Image 36 · filename.jpg
|
|
145
|
-
...
|
|
146
|
-
MDEOF
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
Keep each bash call to **35 images maximum** (~18,000 tokens of content per call). Use as many `cat >>` append calls as needed. For descriptions, read from the cached `docs/descriptions/{assetId}.json` files rather than re-inspecting.
|
|
150
|
-
|
|
151
|
-
Use this structure:
|
|
152
|
-
|
|
153
|
-
```markdown
|
|
154
|
-
# {Brand} — Image Guide
|
|
155
|
-
|
|
156
|
-
> Generated {date}. Space: {spaceKey}. {N} images documented.
|
|
157
|
-
>
|
|
158
|
-
> **AI usage note**: Each entry below has consistent fields for programmatic selection.
|
|
159
|
-
> Match `Subjects`, `Setting`, and `Mood` to the content context. Use `Constraints` to
|
|
160
|
-
> rule out images that won't work for a given layout. `Used on` shows exact page/component context.
|
|
161
|
-
|
|
162
|
-
---
|
|
163
|
-
|
|
164
|
-
## {image title} · {filename}
|
|
165
|
-
|
|
166
|
-
**Asset ID**: `{id}`
|
|
167
|
-
**Dimensions**: {width}×{height} · {contentType}
|
|
168
|
-
**CDN URL**: `{url}?w=800&q=85`
|
|
169
|
-
|
|
170
|
-
**Used on**:
|
|
171
|
-
- {slug} — {contentType} "{label}"
|
|
172
|
-
- _(repeat for each usage; omit if usages array is empty — mark as "Unused / unattached")_
|
|
173
|
-
|
|
174
|
-
**Subjects**: {description}
|
|
175
|
-
**Setting**: {description}
|
|
176
|
-
**Composition**: {description}
|
|
177
|
-
**Colours**: {description}
|
|
178
|
-
**Mood**: {description}
|
|
179
|
-
**Style**: {description}
|
|
180
|
-
**Constraints**: {description}
|
|
181
|
-
|
|
182
|
-
**When to use**: {paragraph}
|
|
183
|
-
|
|
184
|
-
---
|
|
185
|
-
```
|
|
186
|
-
|
|
187
|
-
Repeat for every image. Group images by page/section using `## Section: {page title}` headings before each page's images, matching the structure the `audit images` output provides.
|
|
188
|
-
|
|
189
|
-
### Step 5 — Write the HTML guide
|
|
190
|
-
|
|
191
|
-
Output path: `docs/image-guide.html` inside the app directory.
|
|
192
|
-
|
|
193
|
-
**IMPORTANT — chunked writing:** HTML files are much larger than Markdown. Use the same bash heredoc append strategy, but with **smaller batches of 15–20 image cards** per operation. Start with the full `<html>`, `<head>`, CSS, and opening body tags, then append cards in batches, then append the closing tags last.
|
|
194
|
-
|
|
195
|
-
The HTML guide is a self-contained human reference (no server needed). Model it on the existing `tmp/blk-image-guide.html` style but with the following enhancements:
|
|
196
|
-
|
|
197
|
-
1. **Visual detail block**: Add a new `<div class="visual-detail-box">` section in each card containing the structured visual fields (Subjects, Setting, Composition, Colours, Mood, Style, Constraints) as a compact `<table>`.
|
|
198
|
-
|
|
199
|
-
2. **Usage tree**: In the metadata table, expand the `Pages` row to show the full chain: `{pageSlug} → {componentType} "{label}" (field: {fieldName})`.
|
|
200
|
-
|
|
201
|
-
3. **Site tree section**: Add a collapsible `<details>` section at the top of the page titled "Full Site Content Tree" that shows the inverse view — for each page, what images appear on it.
|
|
202
|
-
|
|
203
|
-
4. **LLM note**: Update the LLM usage note at the top to reference the structured visual fields.
|
|
204
|
-
|
|
205
|
-
The HTML must:
|
|
206
|
-
- Be fully self-contained (inline CSS, no external dependencies)
|
|
207
|
-
- Work without a web server (file:// protocol)
|
|
208
|
-
- Match the brand colours of the target site
|
|
209
|
-
- Show thumbnail images with lazy loading
|
|
210
|
-
|
|
211
|
-
### Step 6 — Verify and report
|
|
212
|
-
|
|
213
|
-
After writing both files, confirm:
|
|
214
|
-
1. Every image from the `audit images` output has an entry in both files
|
|
215
|
-
2. The "Used on" relationships match what `audit tree` shows
|
|
216
|
-
3. The Markdown file is clean and can be read without a browser
|
|
217
|
-
|
|
218
|
-
Present a summary:
|
|
219
|
-
|
|
220
|
-
| Image | Pages used on | Visual description added | Notes |
|
|
221
|
-
|-------|--------------|--------------------------|-------|
|
|
222
|
-
| ... | ... | ✓ | ... |
|
|
223
|
-
|
|
224
|
-
Report the output paths and any images that had no usages (potential orphans).
|
|
225
|
-
|
|
226
|
-
---
|
|
227
|
-
|
|
228
|
-
## Tips
|
|
229
|
-
|
|
230
|
-
- **Efficient image inspection**: Fetch images in batches. Process all images for a page together before moving to the next page.
|
|
231
|
-
- **Orphaned assets**: Images with no usages (`usages: []` in the JSON) are likely unused. Flag them but still document them — they may be intentionally held in reserve.
|
|
232
|
-
- **SVG icons**: For SVG assets, use the direct URL (no resize params needed). Describe the graphic shape and colour precisely.
|
|
233
|
-
- **Stock vs custom**: Check the filename for patterns like `AdobeStock_`, `pexels-`, `unsplash-` to identify stock images. Custom-produced images typically have branded filenames.
|
|
234
|
-
- **Mobile variants**: Some components have both `visual` and `mobileVisual` fields. If the same image appears in both, note the dual-use in the description.
|
|
235
|
-
|
|
236
|
-
## Related skills
|
|
237
|
-
|
|
238
|
-
- **core**: Full cms-edit workflow reference
|
|
239
|
-
- **alt-text-audit**: Audit and improve alt text on existing images
|
|
240
|
-
- **contentful-cms-screenshots**: Take live screenshots of pages for reference
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: contentful-cms-screenshots
|
|
3
|
-
description: "Capture screenshots of components, collections, pages or persons via cms-edit."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Skill: contentful-cms — Screenshots
|
|
7
|
-
|
|
8
|
-
Use this skill when capturing **screenshots** of components, collections, pages, or persons with `cms-edit`. **Requires agent-browser** to be installed.
|
|
9
|
-
|
|
10
|
-
## Prerequisites
|
|
11
|
-
|
|
12
|
-
- `npm install -g agent-browser && agent-browser install`
|
|
13
|
-
- Without agent-browser, the command exits with install instructions (use `--url-only` to only print the URL).
|
|
14
|
-
- For `@ref` and `--json-file`: the app must be running at `devBaseUrl` (see `.contentful-cms.json`).
|
|
15
|
-
|
|
16
|
-
## Commands
|
|
17
|
-
|
|
18
|
-
- **From session ref** (full-fidelity): `cms-edit screenshot @c0` — uses the convert API and `/cms/preview/render-json` so **all** entry types render with real data: component, collection, externalComponent, person. Add `--full` for full-page capture (auto-applied for component/collection).
|
|
19
|
-
- **From JSON file** (no Contentful): `cms-edit screenshot --json-file path/to/entry.json` — reads an IBase* JSON (e.g. from `read @c0 --json` or an export), base64-encodes it, and opens `/cms/preview/render-json?data=...`. Use to validate or screenshot without a session or preview token.
|
|
20
|
-
- **By type** (no session, mock): `cms-edit screenshot --component HeroSimple`, `cms-edit screenshot --collection CardGrid` — uses `/cms/showcase/render` with mock data.
|
|
21
|
-
- **Page**: `cms-edit screenshot` (current open page) or `cms-edit screenshot /resources/publications/other/my-slug`
|
|
22
|
-
- **URL only** (no agent-browser needed): `cms-edit screenshot @c0 --url-only`
|
|
23
|
-
|
|
24
|
-
## Target path: use the full site path
|
|
25
|
-
|
|
26
|
-
When passing a path target (e.g. `cms-edit screenshot /path`), the target must be the **full path** on the site — not just the final slug segment. cms-edit prepends `devBaseUrl` from your config to build the URL.
|
|
27
|
-
|
|
28
|
-
> **Correct:** `cms-edit screenshot /resources/publications/other/my-article`
|
|
29
|
-
> **Incorrect:** `cms-edit screenshot /my-article` ← will 404 if the site expects a longer path
|
|
30
|
-
|
|
31
|
-
Check the site's URL structure (e.g. `/resources/publications/<type>/<slug>`) and use the complete path. The `devBaseUrl` is set in `.contentful-cms.json` (defaults to `http://localhost:3000` if not configured).
|
|
32
|
-
|
|
33
|
-
## Mock vs live (type-only mode only)
|
|
34
|
-
|
|
35
|
-
When using `--component <type>` or `--collection <type>` (no session), the default is **mock** (showcase). Use `--live` with a ref to prefer the legacy direct preview URL; for `@ref`, full-fidelity is already the default via convert → render-json.
|
|
36
|
-
|
|
37
|
-
- **Mock:** `/cms/showcase/render` with mock data; fast, no preview token.
|
|
38
|
-
- **Live** (with ref): `cms-edit screenshot @c0 --live` — uses `/cms/preview/render?id=...`; equivalent for component/collection/externalComponent to the default @ref path.
|
|
39
|
-
|
|
40
|
-
## Checking your work
|
|
41
|
-
|
|
42
|
-
After editing content, run `cms-edit screenshot @ref` or `cms-edit screenshot /slug` to capture and verify. Use `--out before.png` / `--out after.png` and `agent-browser diff screenshot` for visual diffing. To validate a component from exported JSON, use `cms-edit screenshot --json-file <path>`.
|
|
43
|
-
|
|
44
|
-
## Related skills
|
|
45
|
-
|
|
46
|
-
See the **core** skill for session, open, and snapshot.
|