@se-studio/skills 1.3.0 → 1.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @se-studio/skills
2
2
 
3
+ ## 1.3.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Upstream CMS SEO tooling from pedestal-sites: JSON-LD `@context` fix, new `@se-studio/cms-seo` package, production HTML audit in site-check, and `cms-seo-audit` agent skill.
8
+
9
+ ## 1.3.2
10
+
11
+ ### Patch Changes
12
+
13
+ - Add `cms-seo-audit` skill documenting the full CMS SEO workflow (audit CSV, apply, bulk publish, production HTML audit). Cross-link from `screaming-frog-audit` and `contentful-cms-schema-org`.
14
+
15
+ ## 1.3.1
16
+
17
+ ### Patch Changes
18
+
19
+ - Move CMS guidelines prompt pack from `skills/` to `references/` so skills-npm no longer reports `file_error` for `contentful-cms-cms-guidelines`. Update pipeline doc links in CMS guideline skills.
20
+
3
21
  ## 1.3.0
4
22
 
5
23
  ### Minor Changes
package/README.md CHANGED
@@ -21,6 +21,15 @@ npx skills add @se-studio/skills
21
21
 
22
22
  Auto-sync on `pnpm install` (see [`packages/project-build/README.md`](../project-build/README.md) for the full `package.json` snippet). Use `pnpm skills:sync` manually to add or refresh third-party skill packs.
23
23
 
24
+ ## Package layout
25
+
26
+ | Path | Purpose |
27
+ |------|---------|
28
+ | `skills/<name>/SKILL.md` | Agent skills — the only directories scanned by `skills-npm` and the skills CLI |
29
+ | `references/<name>/` | Support docs, prompt packs, and pipeline references (no `SKILL.md`) |
30
+
31
+ Do **not** place non-skill material under `skills/` — directories there without `SKILL.md` cause `file_error` warnings in consumer repos on `pnpm install`.
32
+
24
33
  ## Authoring skills
25
34
 
26
35
  Canonical sources live in `packages/skills/skills/<skill-dir>/SKILL.md`. Do **not** edit `.agents/skills/` by hand.
@@ -56,7 +65,7 @@ Claude Code uses a naive frontmatter parser; violations cause descriptions to si
56
65
 
57
66
  1. Edit `packages/skills/skills/<skill-dir>/SKILL.md`
58
67
  2. Validate: `pnpm skills:validate`
59
- 3. Sync: `pnpm skills:sync`
68
+ 3. Sync: `pnpm skills:sync` (copies `skills/` → `.agents/skills/` and `references/` → `.agents/references/`)
60
69
  4. Add a changeset if publishing `@se-studio/skills`
61
70
 
62
71
  ### cms-edit bundled skills (`@se-studio/contentful-cms`)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@se-studio/skills",
3
- "version": "1.3.0",
3
+ "version": "1.3.3",
4
4
  "description": "SE Studio agent skills for marketing site development with Contentful CMS",
5
5
  "repository": {
6
6
  "type": "git",
@@ -10,6 +10,7 @@
10
10
  "license": "MIT",
11
11
  "files": [
12
12
  "skills",
13
+ "references",
13
14
  "*.md"
14
15
  ],
15
16
  "keywords": [
@@ -18,7 +18,7 @@ Guidelines are short markdown fragments — one per CMS type — that describe h
18
18
  pnpm --filter <appName> generate-showcase
19
19
  ```
20
20
  This writes `src/generated/showcase-examples.json`.
21
- 3. **Curate showcase mocks** — run the [curate-showcase-mocks skill](../se-marketing-sites-curate-showcase-mocks/SKILL.md) to select the best examples into `showcase-mocks.json`. This makes the showcase (and screenshots) show realistic content.
21
+ 3. **Curate showcase mocks** — run the [curate-showcase-mocks skill](../../skills/se-marketing-sites-curate-showcase-mocks/SKILL.md) to select the best examples into `showcase-mocks.json`. This makes the showcase (and screenshots) show realistic content.
22
22
  4. **Generate field list** — parse TypeScript types to produce structured field metadata:
23
23
  ```bash
24
24
  # From the app directory:
@@ -27,7 +27,7 @@ Guidelines are short markdown fragments — one per CMS type — that describe h
27
27
  # Or from repo root:
28
28
  pnpm --filter <appName> exec cms-generate-field-list --app-dir .
29
29
  ```
30
- 5. **Generate guidelines** — run the [Generate CMS guidelines skill](../contentful-cms-generate-cms-guidelines/SKILL.md).
30
+ 5. **Generate guidelines** — run the [Generate CMS guidelines skill](../../skills/contentful-cms-generate-cms-guidelines/SKILL.md).
31
31
 
32
32
  Steps 1–3 only need to be repeated when content or component code changes significantly. Step 4 only needs to be repeated when TypeScript types change. Step 5 can be re-run at any time.
33
33
 
@@ -35,7 +35,7 @@ Steps 1–3 only need to be repeated when content or component code changes sign
35
35
 
36
36
  ## How to run guideline generation
37
37
 
38
- Use the Cursor skill at [`../contentful-cms-generate-cms-guidelines/SKILL.md`](../contentful-cms-generate-cms-guidelines/SKILL.md). It supports three modes:
38
+ Use the Cursor skill at [`../../skills/contentful-cms-generate-cms-guidelines/SKILL.md`](../../skills/contentful-cms-generate-cms-guidelines/SKILL.md). It supports three modes:
39
39
 
40
40
  | Mode | When to use |
41
41
  |---|---|
@@ -0,0 +1,175 @@
1
+ ---
2
+ name: cms-seo-audit
3
+ description: "Run the full marketing-site CMS SEO workflow: audit CSV from Contentful, apply schema/meta fixes, bulk publish, revalidate, and production HTML audit via @se-studio/cms-seo and @se-studio/site-check."
4
+ ---
5
+
6
+ # CMS SEO audit, apply, publish, and production verification
7
+
8
+ Use when improving SEO across a Contentful-backed SE marketing site: meta descriptions, schema.org linking, featured images, bulk publish after CMS edits, and live production HTML checks.
9
+
10
+ **Packages:** `@se-studio/cms-seo` (CMS audit/apply/publish), `@se-studio/site-check` (production HTML audit, Screaming Frog — see **screaming-frog-audit** skill).
11
+
12
+ ---
13
+
14
+ ## Prerequisites
15
+
16
+ | Item | Notes |
17
+ |------|-------|
18
+ | `.env.local` | `CONTENTFUL_SPACE_ID`, `CONTENTFUL_MANAGEMENT_TOKEN`, `CONTENTFUL_ENVIRONMENT_NAME` (usually `master`) |
19
+ | Site config | Per-app `scripts/seo-audit.ts` with `SiteSeoConfig` (descriptions, keywords, schema IDs, path bases) |
20
+ | Vercel | `VERCEL_PROTECTION_BYPASS_TOKEN` or `VERCEL_AUTOMATION_BYPASS_SECRET` for preview/production fetches |
21
+ | Revalidate | After publish, trigger site revalidation (Vercel deploy hook or `revalidate` API) before production audit |
22
+
23
+ ---
24
+
25
+ ## Phase 1: Generate audit CSV (dry run)
26
+
27
+ From the app directory (`apps/pedestal-website` or `apps/headwater-website`):
28
+
29
+ ```bash
30
+ pnpm cms:seo-audit
31
+ ```
32
+
33
+ Writes `docs/seo/<site>-seo-schema-audit.csv` with:
34
+
35
+ - Meta description length and recommended copy
36
+ - Current vs recommended schema links
37
+ - Review status (`Approved` / `Revise` / `Skip`) and flags
38
+
39
+ Review the CSV. Approve rows you want applied (or adjust `SiteSeoConfig` and re-run).
40
+
41
+ Optional flags:
42
+
43
+ ```bash
44
+ pnpm cms:seo-audit --sample-articles # hub pages + 5 articles per type only
45
+ pnpm cms:featured-images # featured-image backfill report only
46
+ ```
47
+
48
+ ---
49
+
50
+ ## Phase 2: Apply CMS fixes
51
+
52
+ ```bash
53
+ pnpm cms:seo-audit:apply
54
+ # or featured images only:
55
+ pnpm cms:featured-images:apply
56
+ ```
57
+
58
+ **What apply does:**
59
+
60
+ - Updates approved meta descriptions on pages, articles, tags, persons, indexes
61
+ - Links canonical schema entries (Organization + WebSite on templates; WebPage on pages; CollectionPage on tags/indexes; ProfilePage on persons)
62
+ - Creates or updates schema markup entries when templates need Org/WebSite/CollectionPage markup
63
+ - Backfills `featuredImage` from hero visuals or site logo when `--featured-images` is set
64
+
65
+ Always dry-run first. CMS changes are space-wide (master environment).
66
+
67
+ ---
68
+
69
+ ## Phase 3: Bulk publish (phased)
70
+
71
+ After apply, entries are drafts until published. Use the bulk publish script (per-app `scripts/bulk-action-publish.ts` or site-common wrapper) in dependency order:
72
+
73
+ ```bash
74
+ pnpm cms:bulk-publish assets
75
+ pnpm cms:bulk-publish leaf
76
+ pnpm cms:bulk-publish composable
77
+ pnpm cms:bulk-publish chrome
78
+ pnpm cms:bulk-publish taxonomy
79
+ pnpm cms:bulk-publish article
80
+ pnpm cms:bulk-publish page
81
+ ```
82
+
83
+ Phases match Contentful link dependencies (assets → leaf types → components → chrome → taxonomy → articles → pages). Retry failed phases after fixing blocking entries.
84
+
85
+ ---
86
+
87
+ ## Phase 4: Revalidate preview / production
88
+
89
+ Trigger revalidation so Next.js serves fresh CMS content:
90
+
91
+ - Vercel production deploy, or
92
+ - Site revalidate API / deploy hook
93
+
94
+ Smoke-test with header nav: Pedestal `/about/`, Headwater `/`.
95
+
96
+ ---
97
+
98
+ ## Phase 5: Production HTML audit
99
+
100
+ ```bash
101
+ pnpm seo:audit:production
102
+ ```
103
+
104
+ Uses `@se-studio/site-check/production-audit` (`runProductionSeoAudit`). Crawls production sitemap, checks each URL for:
105
+
106
+ - Title, meta description, H1, thin content
107
+ - Canonical, noindex, JSON-LD validity and schema types
108
+ - Markdown export parity (`index.md` / `*.md` vs HTML)
109
+
110
+ Outputs:
111
+
112
+ - `docs/seo/<site>-production-audit.csv`
113
+ - `docs/seo/<site>-production-audit.md` (with Rich Results spot-checks)
114
+
115
+ Exit code 1 when errors remain.
116
+
117
+ ---
118
+
119
+ ## Phase 6: Screaming Frog (optional, code-release gate)
120
+
121
+ After content is on preview and again after code ships:
122
+
123
+ ```bash
124
+ pnpm seo:screaming-frog:baseline # tag: content
125
+ pnpm seo:screaming-frog:crawl # after code release
126
+ pnpm seo:screaming-frog:compare
127
+ ```
128
+
129
+ See **screaming-frog-audit** skill for full crawl/compare workflow.
130
+
131
+ ---
132
+
133
+ ## SiteSeoConfig checklist
134
+
135
+ When adding a new site or major SEO pass, configure in `scripts/seo-audit.ts`:
136
+
137
+ | Field | Purpose |
138
+ |-------|---------|
139
+ | `siteKey` | Identifier for logging and logo slug fallback |
140
+ | `enableSearchAction` | `true` when site has `/search` (adds SearchAction to WebSite schema) |
141
+ | `pageDescriptions` / `pageKeywords` | Hub and static pages by slug |
142
+ | `indexDescriptions` / `indexKeywords` | Article type and custom type index pages |
143
+ | `schemaIds` | Reuse existing Organization, WebSite, WebPage, CollectionPage, ProfilePage entries |
144
+ | `articlesBase`, `tagsBase`, `peopleBase` | URL path prefixes for audit rows |
145
+
146
+ Import primitives from `@se-studio/cms-seo`:
147
+
148
+ ```ts
149
+ import {
150
+ createCmaClient,
151
+ parseSeoAuditArgv,
152
+ runSeoAudit,
153
+ runFeaturedImageBackfill,
154
+ type SiteSeoConfig,
155
+ } from '@se-studio/cms-seo';
156
+ ```
157
+
158
+ Production audit:
159
+
160
+ ```ts
161
+ import {
162
+ runProductionSeoAudit,
163
+ writeProductionSeoAuditOutputs,
164
+ buildRichResultsSpotChecks,
165
+ getProductionAuditExitCode,
166
+ } from '@se-studio/site-check/production-audit';
167
+ ```
168
+
169
+ ---
170
+
171
+ ## Related skills
172
+
173
+ - **contentful-cms-schema-org** — create Mustache JSON-LD templates (manual/cms-edit path)
174
+ - **contentful-cms-seo-descriptions** — per-page description writing via cms-edit
175
+ - **screaming-frog-audit** — crawl/compare regression checks after code release
@@ -197,9 +197,9 @@ IMPORTANT: Screenshots have already been captured. Skip Phase A entirely.
197
197
  Go straight to Phase B.
198
198
 
199
199
  Files to read before starting:
200
- - ../contentful-cms-cms-guidelines/generation-prompt.md (Phase B instructions)
201
- - ../contentful-cms-cms-guidelines/colour-hint-prompt.md (Phase C instructions)
202
- - ../contentful-cms-cms-guidelines/validation-prompt.md (Phase D instructions)
200
+ - ../../references/contentful-cms-cms-guidelines/generation-prompt.md (Phase B instructions)
201
+ - ../../references/contentful-cms-cms-guidelines/colour-hint-prompt.md (Phase C instructions)
202
+ - ../../references/contentful-cms-cms-guidelines/validation-prompt.md (Phase D instructions)
203
203
  - <APP_DIR>/src/project/components/<TypeName>.tsx (component source)
204
204
  - <APP_DIR>/generated/cms-discovery/field-list.json
205
205
  - <APP_DIR>/src/generated/cms-discovery/accepted-variants/{components|collections|externals}/<type-slug>.json
@@ -112,7 +112,7 @@ Example of a completed `## Fields & Schema` section:
112
112
  ### Step 3 — Generate component guidelines
113
113
 
114
114
  For each component in discovery order, run the full per-component pipeline defined in
115
- [`generate-component-guidelines.md`](../contentful-cms-cms-guidelines/generate-component-guidelines.md).
115
+ [`generate-component-guidelines.md`](../../references/contentful-cms-cms-guidelines/generate-component-guidelines.md).
116
116
 
117
117
  To find unfinished components:
118
118
  1. Fetch `<discoveryUrl>` and collect all `components[].name` values.
@@ -128,12 +128,12 @@ Run a Cursor subagent with this prompt, substituting `<COMPONENT_TYPE>` and `<AP
128
128
  Run the full guideline generation pipeline for <COMPONENT_TYPE>.
129
129
  Target app: <APP_DIR> (all paths relative to repo root / that directory).
130
130
 
131
- Read these pipeline docs first (sibling directory contentful-cms-cms-guidelines/):
132
- - ../contentful-cms-cms-guidelines/generate-component-guidelines.md (overall pipeline)
133
- - ../contentful-cms-cms-guidelines/variant-loop.md (Phase A: variant loop)
134
- - ../contentful-cms-cms-guidelines/generation-prompt.md (Phase B: generation)
135
- - ../contentful-cms-cms-guidelines/colour-hint-prompt.md (Phase C: colour hint)
136
- - ../contentful-cms-cms-guidelines/validation-prompt.md (Phase D: validation)
131
+ Read these pipeline docs first (references/contentful-cms-cms-guidelines/):
132
+ - ../../references/contentful-cms-cms-guidelines/generate-component-guidelines.md (overall pipeline)
133
+ - ../../references/contentful-cms-cms-guidelines/variant-loop.md (Phase A: variant loop)
134
+ - ../../references/contentful-cms-cms-guidelines/generation-prompt.md (Phase B: generation)
135
+ - ../../references/contentful-cms-cms-guidelines/colour-hint-prompt.md (Phase C: colour hint)
136
+ - ../../references/contentful-cms-cms-guidelines/validation-prompt.md (Phase D: validation)
137
137
 
138
138
  === Phase A: Variant loop ===
139
139
  Follow variant-loop.md.
@@ -282,7 +282,7 @@ These links:
282
282
 
283
283
  ## Pipeline reference
284
284
 
285
- All per-component pipeline docs live in the sibling directory [`contentful-cms-cms-guidelines/`](../contentful-cms-cms-guidelines/):
285
+ All per-component pipeline docs live in [`references/contentful-cms-cms-guidelines/`](../../references/contentful-cms-cms-guidelines/):
286
286
 
287
287
  | File | Purpose |
288
288
  |---|---|
@@ -72,4 +72,4 @@ Create JSON-LD templates using these standard Mustache variables:
72
72
 
73
73
  ## Related skills
74
74
 
75
- See the **core** skill for the full cms-edit workflow. See the **seo-descriptions** skill for meta description generation.
75
+ See the **core** skill for the full cms-edit workflow. See the **seo-descriptions** skill for meta description generation. For bulk audit/apply across all entries, schema linking, publish phases, and production verification, see **cms-seo-audit**.
@@ -338,4 +338,4 @@ Follow [`../contentful-cms-regenerate-editor-pack/SKILL.md`](../contentful-cms-r
338
338
  | Full-site bulk generation (Step 4 of `fresh`: Phases 0–5) | [`../contentful-cms-generate-all-guidelines/SKILL.md`](../contentful-cms-generate-all-guidelines/SKILL.md) |
339
339
  | Single-type regeneration (after code change) | [`../contentful-cms-generate-cms-guidelines/SKILL.md`](../contentful-cms-generate-cms-guidelines/SKILL.md) (mode: single) |
340
340
  | Regenerate hosted editor pack | [`../contentful-cms-regenerate-editor-pack/SKILL.md`](../contentful-cms-regenerate-editor-pack/SKILL.md) |
341
- | Per-component pipeline detail | [`generate-component-guidelines.md`](../contentful-cms-cms-guidelines/generate-component-guidelines.md) |
341
+ | Per-component pipeline detail | [`generate-component-guidelines.md`](../../references/contentful-cms-cms-guidelines/generate-component-guidelines.md) |
@@ -94,6 +94,12 @@ Does **not** replace a full audit for new 404s — run `audit` on the post-relea
94
94
 
95
95
  ---
96
96
 
97
+ ## CMS SEO workflow
98
+
99
+ For Contentful meta/schema fixes before a crawl baseline, see **cms-seo-audit** (audit CSV → apply → bulk publish → `pnpm seo:audit:production`).
100
+
101
+ ---
102
+
97
103
  ## Troubleshooting
98
104
 
99
105
  | Problem | Fix |