/setup-cms
Connect a CMS to notfair SEO tools.
How to use it
Claude Code
- Run the line below. It pulls the whole folder into
~/.claude/skills/setup-cms. - Describe your job in plain words. Claude Code follows the skill from there.
npx degit nowork-studio/notfair-plugin/seo/setup-cms#main ~/.claude/skills/setup-cmsFor one project only, change the path to .claude/skills/setup-cms.
Claude (web or desktop app)
- On this page open ⋯ → Download .md.
- Save it as SKILL.md in a folder, zip the folder, then Customize → Skills → + → Create skill → Upload a skill.
- Pick the file and Save. Claude shows the name and description and runs a security scan.
- Check the skill is switched on.
- Start a new chat and describe your job in plain words. The AI follows the skill from there.
ChatGPT or another app
- ChatGPT: make a Project and paste it into Instructions.
- 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.
Paste into Claude, ChatGPT or Cursor.
Source of /setup-cms
Show the full text294 lines
| name | argument-hint | description | allowed-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_TYPEis 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:
- WordPress — self-hosted or WordPress.com (uses REST API + Application Password)
- Strapi — v4 or v5, self-hosted (uses API Token)
- Contentful — cloud headless CMS (uses Delivery API key)
- 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:
- Your WordPress URL (e.g.
https://myblog.com)- Your WordPress username (the one you log in with)
- 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:
- Ask for
WP_URL→ validate it starts withhttp://orhttps:// - Ask for
WP_USERNAME - Ask for
WP_APP_PASSWORD - Ask for
WP_CONTENT_TYPE:"What content type should I analyze? Common values:
posts,pages. Press Enter to useposts(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:
- Your Strapi URL (e.g.
https://cms.example.com)- 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 —
4or5(auto-detected if omitted)Paste each value when ready."
Collect:
STRAPI_URLSTRAPI_API_KEYSTRAPI_CONTENT_TYPE(optional, default:articles)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:
- Space ID — find it in: Contentful → Settings → General Settings → Space ID
- 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)
- 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:
CONTENTFUL_SPACE_IDCONTENTFUL_DELIVERY_TOKENCONTENTFUL_CONTENT_TYPECONTENTFUL_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:
- Your Ghost URL (e.g.
https://myblog.ghost.io)- Content API key — create one in: Ghost Admin → Settings → Integrations → Add custom integration → copy the Content API Key
Optionally:
- Content type:
posts(default) orpagesPaste each value when ready."
Collect:
GHOST_URLGHOST_CONTENT_KEYGHOST_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:
- If the key already exists in the file, replace that line.
- 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 regenerating403 Forbidden→ token lacks permission — suggest a Full Access / unrestricted token404 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-analysisto see a full audit with your CMS content included, or type/setup-cmsagain to connect a different CMS."
| 1 | |
| 2 | name setup-cms |
| 3 | argument-hint "<CMS name: wordpress, strapi, contentful, or ghost>" |
| 4 | description > |
| 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. |
| 12 | allowed-tools |
| 13 | - Bash |
| 14 | - Read |
| 15 | - Write |
| 16 | - AskUserQuestion |
| 17 | |
| 18 | |
| 19 | # /setup-cms |
| 20 | |
| 21 | Guide the user through connecting their CMS to notfair's SEO analysis tools. |
| 22 | |
| 23 | Once configured, `/seo-analysis` automatically pulls published content from |
| 24 | the CMS and cross-references it against Google Search Console data — finding |
| 25 | invisible pages, content gaps, stale articles, and missing SEO fields. |
| 26 | |
| 27 | |
| 28 | |
| 29 | ## Step 0 — Setup |
| 30 | |
| 31 | Read 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 | |
| 36 | CMS_TYPE=$(python3 "$SKILL_SCRIPTS/cms_detect.py" 2>/dev/null) |
| 37 | CMS_STATUS=$? |
| 38 | echo "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 | |
| 53 | Ask 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 | |
| 64 | Wait for their answer. Map to: `wordpress`, `strapi`, `contentful`, `ghost`. |
| 65 | |
| 66 | |
| 67 | |
| 68 | ## Step 3 — Credential setup by CMS |
| 69 | |
| 70 | Jump to the sub-section for the chosen CMS. |
| 71 | |
| 72 | |
| 73 | |
| 74 | ### 3A — WordPress |
| 75 | |
| 76 | WordPress uses the built-in **Application Passwords** feature (introduced in WP 5.6). |
| 77 | This is the safest way to grant API access — it never exposes your main password |
| 78 | and can be revoked at any time. |
| 79 | |
| 80 | Tell 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 | |
| 92 | Collect values one at a time: |
| 93 | Ask for `WP_URL` → validate it starts with `http://` or `https://` |
| 94 | Ask for `WP_USERNAME` |
| 95 | Ask for `WP_APP_PASSWORD` |
| 96 | 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 | |
| 100 | Once all four are collected, continue to Step 4 (test connection). |
| 101 | |
| 102 | Write to `.env.local`: |
| 103 | |
| 104 | WP_URL=<value> |
| 105 | WP_USERNAME=<value> |
| 106 | WP_APP_PASSWORD=<value> |
| 107 | WP_CONTENT_TYPE=<value or posts> |
| 108 | |
| 109 | |
| 110 | |
| 111 | |
| 112 | ### 3B — Strapi |
| 113 | |
| 114 | Tell 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 | |
| 130 | Collect: |
| 131 | `STRAPI_URL` |
| 132 | `STRAPI_API_KEY` |
| 133 | `STRAPI_CONTENT_TYPE` (optional, default: `articles`) |
| 134 | `STRAPI_VERSION` (optional) |
| 135 | |
| 136 | Write to `.env.local`: |
| 137 | |
| 138 | STRAPI_URL=<value> |
| 139 | STRAPI_API_KEY=<value> |
| 140 | STRAPI_CONTENT_TYPE=<value or articles> |
| 141 | |
| 142 | Include `STRAPI_VERSION=<value>` only if the user specified it. |
| 143 | |
| 144 | |
| 145 | |
| 146 | ### 3C — Contentful |
| 147 | |
| 148 | Tell 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 | |
| 164 | Collect: |
| 165 | `CONTENTFUL_SPACE_ID` |
| 166 | `CONTENTFUL_DELIVERY_TOKEN` |
| 167 | `CONTENTFUL_CONTENT_TYPE` |
| 168 | `CONTENTFUL_ENVIRONMENT` (optional, default: `master`) |
| 169 | |
| 170 | Write to `.env.local`: |
| 171 | |
| 172 | CONTENTFUL_SPACE_ID=<value> |
| 173 | CONTENTFUL_DELIVERY_TOKEN=<value> |
| 174 | CONTENTFUL_CONTENT_TYPE=<value> |
| 175 | CONTENTFUL_ENVIRONMENT=<value or master> |
| 176 | |
| 177 | |
| 178 | |
| 179 | |
| 180 | ### 3D — Ghost |
| 181 | |
| 182 | Tell 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 | |
| 196 | Collect: |
| 197 | `GHOST_URL` |
| 198 | `GHOST_CONTENT_KEY` |
| 199 | `GHOST_CONTENT_TYPE` (optional, default: `posts`) |
| 200 | |
| 201 | Write to `.env.local`: |
| 202 | |
| 203 | GHOST_URL=<value> |
| 204 | GHOST_CONTENT_KEY=<value> |
| 205 | GHOST_CONTENT_TYPE=<value or posts> |
| 206 | |
| 207 | |
| 208 | |
| 209 | |
| 210 | ## Step 4 — Write .env.local |
| 211 | |
| 212 | Find the project's `.env.local` file. Search for it: |
| 213 | |
| 214 | ENV_FILE="" |
| 215 | for candidate in ".env.local" "$HOME/.env.local"; do |
| 216 | [ -f "$candidate" ] && ENV_FILE="$candidate" && break |
| 217 | done |
| 218 | [ -z "$ENV_FILE" ] && ENV_FILE=".env.local" |
| 219 | echo "Writing to: $ENV_FILE" |
| 220 | |
| 221 | |
| 222 | **Merge strategy** — do not overwrite the entire file. For each env var: |
| 223 | If the key already exists in the file, replace that line. |
| 224 | If it does not exist, append it to the end. |
| 225 | |
| 226 | Read the file first (if it exists), then update key by key, then write back. |
| 227 | |
| 228 | If the file doesn't exist yet, create it. |
| 229 | |
| 230 | After writing, confirm: |
| 231 | > "Credentials written to `[path]`. Testing connection now..." |
| 232 | |
| 233 | |
| 234 | |
| 235 | ## Step 5 — Test connection |
| 236 | |
| 237 | Run the appropriate preflight script and capture the exit code: |
| 238 | |
| 239 | |
| 240 | # WordPress |
| 241 | python3 "$SKILL_SCRIPTS/preflight_wordpress.py" 2>&1; PREFLIGHT_EXIT=$? |
| 242 | |
| 243 | # Strapi |
| 244 | python3 "$SKILL_SCRIPTS/preflight_strapi.py" 2>&1; PREFLIGHT_EXIT=$? |
| 245 | |
| 246 | # Contentful |
| 247 | python3 "$SKILL_SCRIPTS/preflight_contentful.py" 2>&1; PREFLIGHT_EXIT=$? |
| 248 | |
| 249 | # Ghost |
| 250 | python3 "$SKILL_SCRIPTS/preflight_ghost.py" 2>&1; PREFLIGHT_EXIT=$? |
| 251 | |
| 252 | |
| 253 | The `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, |
| 256 | then continue to Step 6. |
| 257 | |
| 258 | **`PREFLIGHT_EXIT=1`** — connection failed. Show the full error output verbatim. |
| 259 | Help 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 | |
| 265 | Ask: "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 | |
| 273 | Once the connection succeeds, show a summary: |
| 274 | |
| 275 | |
| 276 | CMS connected successfully! |
| 277 | |
| 278 | CMS: [WordPress/Strapi/Contentful/Ghost] |
| 279 | URL: [cms_url] |
| 280 | Content type: [content_type] |
| 281 | Published: [N] entries found |
| 282 | |
| 283 | What 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 | |
| 291 | Then 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
Browse more free Claude skills or everything in Marketing.