@se-studio/skills 1.4.3 → 1.5.0
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 +16 -0
- package/README.md +1 -0
- package/package.json +1 -1
- package/references/contentful-cms-cms-guidelines/variant-proposal-prompt.md +2 -2
- package/skills/contentful-cms-core/SKILL.md +20 -79
- package/skills/contentful-cms-editor-tasks/SKILL.md +83 -0
- package/skills/contentful-cms-image-guide/SKILL.md +1 -2
- package/skills/contentful-cms-media-review/SKILL.md +123 -0
- package/skills/contentful-cms-seo-descriptions/SKILL.md +2 -2
- package/skills/contentful-cms-setup/SKILL.md +21 -87
- package/skills/se-marketing-sites-smoke-test-setup/SKILL.md +16 -4
- package/skills/site-workflows-new-project/SKILL.md +10 -0
- package/skills/contentful-cms-screenshots/SKILL.md +0 -46
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @se-studio/skills
|
|
2
2
|
|
|
3
|
+
## 1.5.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 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`.
|
|
8
|
+
|
|
9
|
+
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).
|
|
10
|
+
|
|
11
|
+
**Breaking:** Do not use local `mcpServers.cms-edit` or `cms-edit setup` — those entry points are removed.
|
|
12
|
+
|
|
13
|
+
## 1.4.4
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Add `cms-edit asset review` to audit visual assets (filename, alt text, dimensions, file size, GIF) from the Preview API index, plus the `contentful-cms-media-review` skill for spreadsheet workflows.
|
|
18
|
+
|
|
3
19
|
## 1.4.3
|
|
4
20
|
|
|
5
21
|
### 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
|
|
|
@@ -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)
|
|
@@ -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,83 +597,19 @@ 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
|
-
|
|
616
|
-
```bash
|
|
617
|
-
cms-edit screenshot --json-file path/to/component.json
|
|
618
|
-
```
|
|
619
|
-
|
|
620
|
-
### By type (showcase mock, no session)
|
|
621
|
-
|
|
622
|
-
Uses `/cms/showcase/render` with mock data. Fast, no preview token.
|
|
623
600
|
|
|
624
601
|
```bash
|
|
625
|
-
|
|
626
|
-
cms-edit
|
|
627
|
-
cms-edit
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
### Page screenshots
|
|
631
|
-
|
|
632
|
-
```bash
|
|
633
|
-
# Current open page (uses session root slug)
|
|
634
|
-
cms-edit screenshot
|
|
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
|
|
635
606
|
|
|
636
|
-
#
|
|
637
|
-
cms-edit
|
|
638
|
-
cms-edit
|
|
607
|
+
# Component or collection showcase (mock data)
|
|
608
|
+
cms-edit preview showcase --component HeroSimple
|
|
609
|
+
cms-edit preview showcase --collection CardGrid --param backgroundColour=Navy
|
|
639
610
|
```
|
|
640
611
|
|
|
641
|
-
|
|
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
|
|
668
|
-
|
|
669
|
-
# 4. Diff
|
|
670
|
-
agent-browser diff screenshot --baseline before.png after.png
|
|
671
|
-
```
|
|
612
|
+
For CMS guidelines batch PNG capture, use `cms-capture-screenshots` from `@se-studio/project-build` (separate from cms-edit; requires agent-browser).
|
|
672
613
|
|
|
673
614
|
## Revert
|
|
674
615
|
|
|
@@ -687,7 +628,7 @@ Note: Entries created via `add` cannot be reverted — use `remove` instead.
|
|
|
687
628
|
Validate config and connectivity before running a workflow.
|
|
688
629
|
|
|
689
630
|
```bash
|
|
690
|
-
cms-edit health # Check config file, space config, Contentful connectivity
|
|
631
|
+
cms-edit health # Check config file, space config, Contentful connectivity
|
|
691
632
|
```
|
|
692
633
|
|
|
693
634
|
## Schema Inspection
|
|
@@ -906,4 +847,4 @@ cms-edit --session agent-2 open --article-slug /blog
|
|
|
906
847
|
|
|
907
848
|
## Related skills
|
|
908
849
|
|
|
909
|
-
For templates see the **templates** skill; for navigation see the **navigation** skill; for rich text and embeds see the **rich-text** skill
|
|
850
|
+
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 |
|
|
@@ -235,6 +235,5 @@ Report the output paths and any images that had no usages (potential orphans).
|
|
|
235
235
|
|
|
236
236
|
## Related skills
|
|
237
237
|
|
|
238
|
-
- **core**: Full cms-edit workflow
|
|
238
|
+
- **core**: Full cms-edit workflow; use `preview url` / `preview showcase` for visual checks via browser MCP
|
|
239
239
|
- **alt-text-audit**: Audit and improve alt text on existing images
|
|
240
|
-
- **contentful-cms-screenshots**: Take live screenshots of pages for reference
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: contentful-cms-media-review
|
|
3
|
+
description: "Audit CMS images, videos, and Lottie animations for filename, alt text, dimensions, size, and GIF issues using cms-edit, then produce an Excel report of failures."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Skill: contentful-cms — Media Review
|
|
7
|
+
|
|
8
|
+
Use this skill to audit **visual assets** in a Contentful space and produce a spreadsheet of assets that fail quality checks.
|
|
9
|
+
|
|
10
|
+
## When to use
|
|
11
|
+
|
|
12
|
+
- Cleaning up CMS media before or after a migration
|
|
13
|
+
- Finding oversized images, missing alt text, or animated GIFs
|
|
14
|
+
- Brightline, SE Studio, or any site with `cms-edit` configured
|
|
15
|
+
|
|
16
|
+
## Prerequisites
|
|
17
|
+
|
|
18
|
+
- `cms-edit` configured for the target space (`cms-edit health`)
|
|
19
|
+
- `CONTENTFUL_PREVIEW_ACCESS_TOKEN` set (default index uses Preview API / drafts)
|
|
20
|
+
- Run `cms-edit index sync` before the review if the index is stale
|
|
21
|
+
|
|
22
|
+
## Workflow
|
|
23
|
+
|
|
24
|
+
### Step 1 — Sync the index
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
cms-edit index sync --space <space-key>
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Use `--published` only when you want published/delivery content only.
|
|
31
|
+
|
|
32
|
+
### Step 2 — Run the review
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
cms-edit --json asset review --space <space-key> > /tmp/media-review.json
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Optional flags:
|
|
39
|
+
|
|
40
|
+
| Flag | Purpose |
|
|
41
|
+
|------|---------|
|
|
42
|
+
| `--include-passing` | Include assets with no failures |
|
|
43
|
+
| `--max-width 2000` | Max raster/video width (default 2000) |
|
|
44
|
+
| `--max-image-kb 800` | Max image file size |
|
|
45
|
+
| `--max-video-mb 8` | Max video file size |
|
|
46
|
+
| `--max-lottie-kb 400` | Max Lottie JSON size |
|
|
47
|
+
| `--published` | Use Delivery API index |
|
|
48
|
+
|
|
49
|
+
Exit code **1** when any asset has failing issues (useful for CI).
|
|
50
|
+
|
|
51
|
+
### Step 3 — Build the Excel report
|
|
52
|
+
|
|
53
|
+
Create a workbook with **failures only** (default JSON output). Use the **xlsx** skill.
|
|
54
|
+
|
|
55
|
+
**Sheet: Issues** — one row per failing asset
|
|
56
|
+
|
|
57
|
+
| Column | Source field |
|
|
58
|
+
|--------|----------------|
|
|
59
|
+
| Asset ID | `assets[].id` |
|
|
60
|
+
| Contentful URL | `assets[].contentfulUrl` |
|
|
61
|
+
| CDN URL | `assets[].url` |
|
|
62
|
+
| Title | `assets[].title` |
|
|
63
|
+
| Filename | `assets[].fileName` |
|
|
64
|
+
| Alt text | `assets[].description` |
|
|
65
|
+
| Content type | `assets[].contentType` |
|
|
66
|
+
| Width | `assets[].width` |
|
|
67
|
+
| Height | `assets[].height` |
|
|
68
|
+
| Size (KB) | `assets[].sizeKb` |
|
|
69
|
+
| Media wrappers | `assets[].mediaEntryCount` |
|
|
70
|
+
| Issue codes | `assets[].issues[].code` (comma-separated fails) |
|
|
71
|
+
| Issue details | `assets[].issues[].message` (semicolon-separated) |
|
|
72
|
+
| Updated | `assets[].updatedAt` |
|
|
73
|
+
|
|
74
|
+
**Sheet: Summary**
|
|
75
|
+
|
|
76
|
+
- `space`, `spaceId`, `environment`, `generated`, `preview`
|
|
77
|
+
- `total`, `failingCount`, `warningCount`
|
|
78
|
+
- `issueCounts` breakdown
|
|
79
|
+
- Thresholds from `thresholds` object
|
|
80
|
+
|
|
81
|
+
Default output path: `docs/media-review-<space>-<date>.xlsx` in the app directory.
|
|
82
|
+
|
|
83
|
+
### Step 4 — Present findings
|
|
84
|
+
|
|
85
|
+
Summarize for the user:
|
|
86
|
+
|
|
87
|
+
- Total assets scanned vs failures
|
|
88
|
+
- Top issue types (from `issueCounts`)
|
|
89
|
+
- Quick wins (missing alt, animated GIFs, obvious stock filenames)
|
|
90
|
+
- Note: `no_media_wrapper` is a **warning** — asset may still be used via rich text or be genuinely unused
|
|
91
|
+
|
|
92
|
+
## What is checked
|
|
93
|
+
|
|
94
|
+
| Check | Issue code | Severity |
|
|
95
|
+
|-------|------------|----------|
|
|
96
|
+
| Descriptive filename | `bad_filename` | fail |
|
|
97
|
+
| Alt text present | `missing_alt` | fail |
|
|
98
|
+
| Alt text quality | `weak_alt` | fail |
|
|
99
|
+
| Width ≤ max (not SVG/Lottie) | `oversized_width` | fail |
|
|
100
|
+
| File size limits | `oversized_file` | fail / warn |
|
|
101
|
+
| Animated GIF | `animated_gif` | fail |
|
|
102
|
+
| No media wrapper in index | `no_media_wrapper` | warn |
|
|
103
|
+
|
|
104
|
+
## Brightline example
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
cd apps/brightline-website
|
|
108
|
+
cms-edit index sync --space brightline
|
|
109
|
+
cms-edit --json asset review --space brightline > /tmp/brightline-media-review.json
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Space key: `brightline` (space ID `96gdpqkm7elu`).
|
|
113
|
+
|
|
114
|
+
## Phase 2 (not yet in cms-edit)
|
|
115
|
+
|
|
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
|
+
|
|
118
|
+
## Related
|
|
119
|
+
|
|
120
|
+
- `contentful-cms-alt-text-audit` — per-page alt text fixes
|
|
121
|
+
- `contentful-cms-image-guide` — full image inventory with AI descriptions
|
|
122
|
+
- `cms-edit asset audit` — missing alt only (narrower, faster)
|
|
123
|
+
- `cms-edit asset set-description <id> "alt"` — fix alt text on an asset
|
|
@@ -20,10 +20,10 @@ If no brand context is available, ask the user about their brand voice and targe
|
|
|
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. Optionally `cms-edit skill install` for bundled cms-edit 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.
|
|
@@ -29,6 +29,7 @@ Preview / `DRAFT_ONLY` Contentful access in local dev is expected and not a smok
|
|
|
29
29
|
| `pnpm smoke-test:cache` | `build` + `start` + double-pass `x-nextjs-cache` verify |
|
|
30
30
|
| `pnpm smoke-test:deploy-check` | Post-build gate: `start` (no rebuild) + functional smoke — use in Vercel `buildCommand` |
|
|
31
31
|
| `pnpm smoke-test:live` | Live deployment URL smoke — GitHub Action + Vercel Deployment Checks |
|
|
32
|
+
| `pnpm revalidation-test` | `build` + `start` + revalidation matrix (warm → invalidate → cold → warm); see `revalidation.cases.json` and [CONTENTFUL_WEBHOOK_REVALIDATION.md](../../../../docs/CONTENTFUL_WEBHOOK_REVALIDATION.md) |
|
|
32
33
|
|
|
33
34
|
Example `package.json` entries:
|
|
34
35
|
|
|
@@ -39,7 +40,8 @@ Example `package.json` entries:
|
|
|
39
40
|
"smoke-test:audit": "SMOKE_TEST_AUDIT_CACHE_LOGS=true smoke-test-one 3012",
|
|
40
41
|
"smoke-test:cache": "SMOKE_TEST_SERVER_SCRIPT=start SMOKE_TEST_VERIFY_CACHE=true smoke-test-one 3012",
|
|
41
42
|
"smoke-test:deploy-check": "smoke-test-deploy-check",
|
|
42
|
-
"smoke-test:live": "smoke-test-live"
|
|
43
|
+
"smoke-test:live": "smoke-test-live",
|
|
44
|
+
"revalidation-test": "node ../../scripts/revalidation-matrix-test.mjs 3012"
|
|
43
45
|
```
|
|
44
46
|
|
|
45
47
|
**Vercel build gate** — append to root `vercel.json` so failed smoke fails the build before deploy:
|
|
@@ -161,8 +163,9 @@ Read (do not guess from constants alone):
|
|
|
161
163
|
| `page` | Top-level CMS pages (not home, not article trees) | 2 |
|
|
162
164
|
| `article-type-index` | e.g. `/work/`, `/blog/` | 1 |
|
|
163
165
|
| `article` | Nested article/case-study URLs | 2 |
|
|
164
|
-
| `tag` / `tags-index` | If
|
|
165
|
-
| `person` / `people-listing` | If
|
|
166
|
+
| `tag` / `tags-index` | If routes exist (sitemap optional) | 1–2 each |
|
|
167
|
+
| `person` / `people-listing` | If routes exist (sitemap optional) | 1–2 each |
|
|
168
|
+
| `not-found` | Non-existent path | 1 (`expectHtmlStatus: 404`) |
|
|
166
169
|
|
|
167
170
|
**Exclude** obvious non-prod slugs: `tmp-*`, draft pages, unless intentionally tested.
|
|
168
171
|
|
|
@@ -187,11 +190,20 @@ curl -sI "http://localhost:<port>/some-path.md"
|
|
|
187
190
|
"port": 3012,
|
|
188
191
|
"cases": [
|
|
189
192
|
{ "category": "home", "label": "Home", "path": "/", "expectMarkdown": true },
|
|
190
|
-
{ "category": "page", "label": "About", "path": "/about/", "expectMarkdown": true }
|
|
193
|
+
{ "category": "page", "label": "About", "path": "/about/", "expectMarkdown": true },
|
|
194
|
+
{
|
|
195
|
+
"category": "not-found",
|
|
196
|
+
"label": "404 — unknown path",
|
|
197
|
+
"path": "/smoke-test-does-not-exist/",
|
|
198
|
+
"expectMarkdown": false,
|
|
199
|
+
"expectHtmlStatus": 404
|
|
200
|
+
}
|
|
191
201
|
]
|
|
192
202
|
}
|
|
193
203
|
```
|
|
194
204
|
|
|
205
|
+
`expectHtmlStatus` requires `@se-studio/site-check@^2.7.2`. Omit for normal 2xx HTML checks.
|
|
206
|
+
|
|
195
207
|
Optional `cmsIntegrity` (local only — see section below):
|
|
196
208
|
|
|
197
209
|
```json
|
|
@@ -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,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.
|