/setup-cms

Connect a CMS to notfair SEO tools.

How to use it

Claude Code
  1. Run the line below. It pulls the whole folder into ~/.claude/skills/setup-cms.
  2. Describe your job in plain words. Claude Code follows the skill from there.
Claude Code — installs the whole folder, not just SKILL.md
npx degit nowork-studio/notfair-plugin/seo/setup-cms#main ~/.claude/skills/setup-cms

For one project only, change the path to .claude/skills/setup-cms.

Claude (web or desktop app)
  1. On this page open ⋯ → Download .md.
  2. Save it as SKILL.md in a folder, zip the folder, then Customize → Skills → + → Create skill → Upload a skill.
  3. Pick the file and Save. Claude shows the name and description and runs a security scan.
  4. Check the skill is switched on.
  5. Start a new chat and describe your job in plain words. The AI follows the skill from there.
ChatGPT or another app
  1. ChatGPT: make a Project and paste it into Instructions.
  2. Neither? Paste it at the top of a new chat — it works for that chat.
Not working?
  • Check which app you pasted it into — the steps above name the right one.
  • Some skills need the paid tier of Claude or ChatGPT.
Step-by-step guide with screenshots · Ask in the forum

Paste into Claude, ChatGPT or Cursor.

Source of /setup-cms

Show the full text294 lines
nameargument-hintdescriptionallowed-tools
setup-cms<CMS name: wordpress, strapi, contentful, or ghost>> Connect a CMS to notfair SEO tools. Guides users through configuring WordPress, Strapi, Contentful, or Ghost — tests the connection, and writes credentials to .env.local. Once set up, seo-analysis automatically cross- references CMS content against Google Search Console data. Use whenever the user says "connect my CMS", "set up WordPress", "configure Strapi", "add Contentful", "connect Ghost", or "CMS setup". Also trigger if the user asks why no CMS data appears in a seo-analysis report. - Bash - Read - Write - AskUserQuestion

/setup-cms

Guide the user through connecting their CMS to notfair's SEO analysis tools.

Once configured, /seo-analysis automatically pulls published content from the CMS and cross-references it against Google Search Console data — finding invisible pages, content gaps, stale articles, and missing SEO fields.


Step 0 — Setup

Read and follow ../shared/preamble.md — it locates the SEO scripts directory. Use $SKILL_SCRIPTS from the preamble for all script calls below.

Step 1 — Detect existing CMS configuration

CMS_TYPE=$(python3 "$SKILL_SCRIPTS/cms_detect.py" 2>/dev/null)
CMS_STATUS=$?
echo "CMS_TYPE=$CMS_TYPE  EXIT=$CMS_STATUS"
  • CMS_STATUS=0 → a CMS is already configured ($CMS_TYPE is the name). Show the user: "You already have [$CMS_TYPE] connected. Would you like to reconfigure it, or switch to a different CMS?" Wait for their reply. If they say reconfigure/switch, continue to Step 2. If they say test or verify, jump to Step 5 (skip to connection test).

  • CMS_STATUS=2 → nothing configured yet. Continue to Step 2.


Step 2 — Choose a CMS

Ask the user:

"Which CMS are you connecting? I support:

  1. WordPress — self-hosted or WordPress.com (uses REST API + Application Password)
  2. Strapi — v4 or v5, self-hosted (uses API Token)
  3. Contentful — cloud headless CMS (uses Delivery API key)
  4. Ghost — Ghost.org or self-hosted (uses Content API key)

Reply with the name or number."

Wait for their answer. Map to: wordpress, strapi, contentful, ghost.


Step 3 — Credential setup by CMS

Jump to the sub-section for the chosen CMS.


3A — WordPress

WordPress uses the built-in Application Passwords feature (introduced in WP 5.6). This is the safest way to grant API access — it never exposes your main password and can be revoked at any time.

Tell the user:

"I need three things to connect WordPress:

  1. Your WordPress URL (e.g. https://myblog.com)
  2. Your WordPress username (the one you log in with)
  3. An Application Password — create one in: WordPress Admin → Users → Profile → scroll to Application Passwords → enter a name like "notfair" → click Add New → copy the generated password

Paste each value when ready."

Collect values one at a time:

  1. Ask for WP_URL → validate it starts with http:// or https://
  2. Ask for WP_USERNAME
  3. Ask for WP_APP_PASSWORD
  4. Ask for WP_CONTENT_TYPE:

    "What content type should I analyze? Common values: posts, pages. Press Enter to use posts (default), or enter a custom post type slug."

Once all four are collected, continue to Step 4 (test connection).

Write to .env.local:

WP_URL=<value>
WP_USERNAME=<value>
WP_APP_PASSWORD=<value>
WP_CONTENT_TYPE=<value or posts>

3B — Strapi

Tell the user:

"I need two things to connect Strapi:

  1. Your Strapi URL (e.g. https://cms.example.com)
  2. A Full-access API Token — create one in: Strapi Admin → Settings → Global settings → API Tokens → Create new API Token → Type: Full access → copy the token

Optionally:

  • Content type — the plural API ID of your content collection (default: articles). Find it in: Content-Type Builder → [your type] → API ID (plural)
  • Strapi version — 4 or 5 (auto-detected if omitted)

Paste each value when ready."

Collect:

  1. STRAPI_URL
  2. STRAPI_API_KEY
  3. STRAPI_CONTENT_TYPE (optional, default: articles)
  4. STRAPI_VERSION (optional)

Write to .env.local:

STRAPI_URL=<value>
STRAPI_API_KEY=<value>
STRAPI_CONTENT_TYPE=<value or articles>

Include STRAPI_VERSION=<value> only if the user specified it.


3C — Contentful

Tell the user:

"I need three things to connect Contentful:

  1. Space ID — find it in: Contentful → Settings → General Settings → Space ID
  2. Content Delivery API token — find it in: Settings → API Keys → [your key] → Content Delivery API - access token (If no key exists, create one under Settings → API Keys → Add API Key)
  3. Content type ID — the API identifier for your content type. Find it in: Content model → [your type] → API Identifier

Optionally:

  • Environment (default: master)

Paste each value when ready."

Collect:

  1. CONTENTFUL_SPACE_ID
  2. CONTENTFUL_DELIVERY_TOKEN
  3. CONTENTFUL_CONTENT_TYPE
  4. CONTENTFUL_ENVIRONMENT (optional, default: master)

Write to .env.local:

CONTENTFUL_SPACE_ID=<value>
CONTENTFUL_DELIVERY_TOKEN=<value>
CONTENTFUL_CONTENT_TYPE=<value>
CONTENTFUL_ENVIRONMENT=<value or master>

3D — Ghost

Tell the user:

"I need two things to connect Ghost:

  1. Your Ghost URL (e.g. https://myblog.ghost.io)
  2. Content API key — create one in: Ghost Admin → Settings → Integrations → Add custom integration → copy the Content API Key

Optionally:

  • Content type: posts (default) or pages

Paste each value when ready."

Collect:

  1. GHOST_URL
  2. GHOST_CONTENT_KEY
  3. GHOST_CONTENT_TYPE (optional, default: posts)

Write to .env.local:

GHOST_URL=<value>
GHOST_CONTENT_KEY=<value>
GHOST_CONTENT_TYPE=<value or posts>

Step 4 — Write .env.local

Find the project's .env.local file. Search for it:

ENV_FILE=""
for candidate in ".env.local" "$HOME/.env.local"; do
  [ -f "$candidate" ] && ENV_FILE="$candidate" && break
done
[ -z "$ENV_FILE" ] && ENV_FILE=".env.local"
echo "Writing to: $ENV_FILE"

Merge strategy — do not overwrite the entire file. For each env var:

  1. If the key already exists in the file, replace that line.
  2. If it does not exist, append it to the end.

Read the file first (if it exists), then update key by key, then write back.

If the file doesn't exist yet, create it.

After writing, confirm:

"Credentials written to [path]. Testing connection now..."


Step 5 — Test connection

Run the appropriate preflight script and capture the exit code:

# WordPress
python3 "$SKILL_SCRIPTS/preflight_wordpress.py" 2>&1; PREFLIGHT_EXIT=$?

# Strapi
python3 "$SKILL_SCRIPTS/preflight_strapi.py" 2>&1; PREFLIGHT_EXIT=$?

# Contentful
python3 "$SKILL_SCRIPTS/preflight_contentful.py" 2>&1; PREFLIGHT_EXIT=$?

# Ghost
python3 "$SKILL_SCRIPTS/preflight_ghost.py" 2>&1; PREFLIGHT_EXIT=$?

The 2>&1 redirect surfaces error messages in the output so you can show them.

PREFLIGHT_EXIT=0 — connection successful. Show the "OK: …" line to the user, then continue to Step 6.

PREFLIGHT_EXIT=1 — connection failed. Show the full error output verbatim. Help the user diagnose:

  • 401 Unauthorized → wrong token/password — suggest regenerating
  • 403 Forbidden → token lacks permission — suggest a Full Access / unrestricted token
  • 404 Not Found → wrong URL or wrong content type slug
  • Network error → URL unreachable — check the URL in a browser first

Ask: "Want to fix the credentials and try again (I'll go back to Step 3), or skip CMS setup for now?"

PREFLIGHT_EXIT=2 → credentials were removed from .env.local between steps. Restart from Step 3.


Step 6 — Confirm and summarize

Once the connection succeeds, show a summary:

CMS connected successfully!

  CMS:          [WordPress/Strapi/Contentful/Ghost]
  URL:          [cms_url]
  Content type: [content_type]
  Published:    [N] entries found

What this enables in /seo-analysis:
  • Cross-reference [N] published articles against Google Search Console data
  • Find published content with zero GSC impressions (unindexed or invisible)
  • Identify content gaps: queries ranking 11-30 with no matching article
  • Flag stale content: articles >6 months old with declining clicks
  • Audit SEO fields: missing meta titles/descriptions, length violations

Then offer:

"Run /seo-analysis to see a full audit with your CMS content included, or type /setup-cms again to connect a different CMS."

1---
2name: setup-cms
3argument-hint: "<CMS name: wordpress, strapi, contentful, or ghost>"
4description: >
5 Connect a CMS to notfair SEO tools. Guides users through configuring
6 WordPress, Strapi, Contentful, or Ghost — tests the connection, and writes
7 credentials to .env.local. Once set up, seo-analysis automatically cross-
8 references CMS content against Google Search Console data. Use whenever the
9 user says "connect my CMS", "set up WordPress", "configure Strapi", "add
10 Contentful", "connect Ghost", or "CMS setup". Also trigger if the user asks
11 why no CMS data appears in a seo-analysis report.
12allowed-tools:
13 - Bash
14 - Read
15 - Write
16 - AskUserQuestion
17---
18 
19# /setup-cms
20 
21Guide the user through connecting their CMS to notfair's SEO analysis tools.
22 
23Once configured, `/seo-analysis` automatically pulls published content from
24the CMS and cross-references it against Google Search Console data — finding
25invisible pages, content gaps, stale articles, and missing SEO fields.
26 
27---
28 
29## Step 0 — Setup
30 
31Read and follow `../shared/preamble.md` — it locates the SEO scripts directory. Use `$SKILL_SCRIPTS` from the preamble for all script calls below.
32 
33## Step 1 — Detect existing CMS configuration
34 
35```bash
36CMS_TYPE=$(python3 "$SKILL_SCRIPTS/cms_detect.py" 2>/dev/null)
37CMS_STATUS=$?
38echo "CMS_TYPE=$CMS_TYPE EXIT=$CMS_STATUS"
39```
40 
41- `CMS_STATUS=0` → a CMS is already configured (`$CMS_TYPE` is the name).
42 Show the user: "You already have **[$CMS_TYPE]** connected. Would you like to
43 reconfigure it, or switch to a different CMS?"
44 Wait for their reply. If they say reconfigure/switch, continue to Step 2.
45 If they say test or verify, jump to Step 5 (skip to connection test).
46 
47- `CMS_STATUS=2` → nothing configured yet. Continue to Step 2.
48 
49---
50 
51## Step 2 — Choose a CMS
52 
53Ask the user:
54 
55> "Which CMS are you connecting? I support:
56>
57> 1. **WordPress** — self-hosted or WordPress.com (uses REST API + Application Password)
58> 2. **Strapi** — v4 or v5, self-hosted (uses API Token)
59> 3. **Contentful** — cloud headless CMS (uses Delivery API key)
60> 4. **Ghost** — Ghost.org or self-hosted (uses Content API key)
61>
62> Reply with the name or number."
63 
64Wait for their answer. Map to: `wordpress`, `strapi`, `contentful`, `ghost`.
65 
66---
67 
68## Step 3 — Credential setup by CMS
69 
70Jump to the sub-section for the chosen CMS.
71 
72---
73 
74### 3A — WordPress
75 
76WordPress uses the built-in **Application Passwords** feature (introduced in WP 5.6).
77This is the safest way to grant API access — it never exposes your main password
78and can be revoked at any time.
79 
80Tell the user:
81 
82> "I need three things to connect WordPress:
83>
84> 1. **Your WordPress URL** (e.g. `https://myblog.com`)
85> 2. **Your WordPress username** (the one you log in with)
86> 3. **An Application Password** — create one in:
87> WordPress Admin → Users → Profile → scroll to **Application Passwords**
88> → enter a name like "notfair" → click **Add New** → copy the generated password
89>
90> Paste each value when ready."
91 
92Collect values one at a time:
931. Ask for `WP_URL` → validate it starts with `http://` or `https://`
942. Ask for `WP_USERNAME`
953. Ask for `WP_APP_PASSWORD`
964. Ask for `WP_CONTENT_TYPE`:
97 > "What content type should I analyze? Common values: `posts`, `pages`.
98 > Press Enter to use `posts` (default), or enter a custom post type slug."
99 
100Once all four are collected, continue to Step 4 (test connection).
101 
102Write to `.env.local`:
103```
104WP_URL=<value>
105WP_USERNAME=<value>
106WP_APP_PASSWORD=<value>
107WP_CONTENT_TYPE=<value or posts>
108```
109 
110---
111 
112### 3B — Strapi
113 
114Tell the user:
115 
116> "I need two things to connect Strapi:
117>
118> 1. **Your Strapi URL** (e.g. `https://cms.example.com`)
119> 2. **A Full-access API Token** — create one in:
120> Strapi Admin → Settings → Global settings → API Tokens → Create new API Token
121> → Type: **Full access** → copy the token
122>
123> Optionally:
124> - **Content type** — the plural API ID of your content collection (default: `articles`).
125> Find it in: Content-Type Builder → [your type] → API ID (plural)
126> - **Strapi version** — `4` or `5` (auto-detected if omitted)
127>
128> Paste each value when ready."
129 
130Collect:
1311. `STRAPI_URL`
1322. `STRAPI_API_KEY`
1333. `STRAPI_CONTENT_TYPE` (optional, default: `articles`)
1344. `STRAPI_VERSION` (optional)
135 
136Write to `.env.local`:
137```
138STRAPI_URL=<value>
139STRAPI_API_KEY=<value>
140STRAPI_CONTENT_TYPE=<value or articles>
141```
142Include `STRAPI_VERSION=<value>` only if the user specified it.
143 
144---
145 
146### 3C — Contentful
147 
148Tell the user:
149 
150> "I need three things to connect Contentful:
151>
152> 1. **Space ID** — find it in: Contentful → Settings → General Settings → Space ID
153> 2. **Content Delivery API token** — find it in:
154> Settings → API Keys → [your key] → Content Delivery API - access token
155> (If no key exists, create one under Settings → API Keys → Add API Key)
156> 3. **Content type ID** — the API identifier for your content type.
157> Find it in: Content model → [your type] → API Identifier
158>
159> Optionally:
160> - **Environment** (default: `master`)
161>
162> Paste each value when ready."
163 
164Collect:
1651. `CONTENTFUL_SPACE_ID`
1662. `CONTENTFUL_DELIVERY_TOKEN`
1673. `CONTENTFUL_CONTENT_TYPE`
1684. `CONTENTFUL_ENVIRONMENT` (optional, default: `master`)
169 
170Write to `.env.local`:
171```
172CONTENTFUL_SPACE_ID=<value>
173CONTENTFUL_DELIVERY_TOKEN=<value>
174CONTENTFUL_CONTENT_TYPE=<value>
175CONTENTFUL_ENVIRONMENT=<value or master>
176```
177 
178---
179 
180### 3D — Ghost
181 
182Tell the user:
183 
184> "I need two things to connect Ghost:
185>
186> 1. **Your Ghost URL** (e.g. `https://myblog.ghost.io`)
187> 2. **Content API key** — create one in:
188> Ghost Admin → Settings → Integrations → Add custom integration
189> → copy the **Content API Key**
190>
191> Optionally:
192> - **Content type**: `posts` (default) or `pages`
193>
194> Paste each value when ready."
195 
196Collect:
1971. `GHOST_URL`
1982. `GHOST_CONTENT_KEY`
1993. `GHOST_CONTENT_TYPE` (optional, default: `posts`)
200 
201Write to `.env.local`:
202```
203GHOST_URL=<value>
204GHOST_CONTENT_KEY=<value>
205GHOST_CONTENT_TYPE=<value or posts>
206```
207 
208---
209 
210## Step 4 — Write .env.local
211 
212Find the project's `.env.local` file. Search for it:
213```bash
214ENV_FILE=""
215for candidate in ".env.local" "$HOME/.env.local"; do
216 [ -f "$candidate" ] && ENV_FILE="$candidate" && break
217done
218[ -z "$ENV_FILE" ] && ENV_FILE=".env.local"
219echo "Writing to: $ENV_FILE"
220```
221 
222**Merge strategy** — do not overwrite the entire file. For each env var:
2231. If the key already exists in the file, replace that line.
2242. If it does not exist, append it to the end.
225 
226Read the file first (if it exists), then update key by key, then write back.
227 
228If the file doesn't exist yet, create it.
229 
230After writing, confirm:
231> "Credentials written to `[path]`. Testing connection now..."
232 
233---
234 
235## Step 5 — Test connection
236 
237Run the appropriate preflight script and capture the exit code:
238 
239```bash
240# WordPress
241python3 "$SKILL_SCRIPTS/preflight_wordpress.py" 2>&1; PREFLIGHT_EXIT=$?
242 
243# Strapi
244python3 "$SKILL_SCRIPTS/preflight_strapi.py" 2>&1; PREFLIGHT_EXIT=$?
245 
246# Contentful
247python3 "$SKILL_SCRIPTS/preflight_contentful.py" 2>&1; PREFLIGHT_EXIT=$?
248 
249# Ghost
250python3 "$SKILL_SCRIPTS/preflight_ghost.py" 2>&1; PREFLIGHT_EXIT=$?
251```
252 
253The `2>&1` redirect surfaces error messages in the output so you can show them.
254 
255**`PREFLIGHT_EXIT=0`** — connection successful. Show the "OK: …" line to the user,
256then continue to Step 6.
257 
258**`PREFLIGHT_EXIT=1`** — connection failed. Show the full error output verbatim.
259Help the user diagnose:
260- `401 Unauthorized` → wrong token/password — suggest regenerating
261- `403 Forbidden` → token lacks permission — suggest a Full Access / unrestricted token
262- `404 Not Found` → wrong URL or wrong content type slug
263- Network error → URL unreachable — check the URL in a browser first
264 
265Ask: "Want to fix the credentials and try again (I'll go back to Step 3), or skip CMS setup for now?"
266 
267**`PREFLIGHT_EXIT=2`** → credentials were removed from `.env.local` between steps. Restart from Step 3.
268 
269---
270 
271## Step 6 — Confirm and summarize
272 
273Once the connection succeeds, show a summary:
274 
275```
276CMS connected successfully!
277 
278 CMS: [WordPress/Strapi/Contentful/Ghost]
279 URL: [cms_url]
280 Content type: [content_type]
281 Published: [N] entries found
282 
283What this enables in /seo-analysis:
284 • Cross-reference [N] published articles against Google Search Console data
285 • Find published content with zero GSC impressions (unindexed or invisible)
286 • Identify content gaps: queries ranking 11-30 with no matching article
287 • Flag stale content: articles >6 months old with declining clicks
288 • Audit SEO fields: missing meta titles/descriptions, length violations
289```
290 
291Then offer:
292> "Run `/seo-analysis` to see a full audit with your CMS content included,
293> or type `/setup-cms` again to connect a different CMS."
294 

Discussion

Alternatives

Also in SEO & keywordsSee all 364 in Marketing →