{"slug":"setup-cms","title":"setup-cms","summary":"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","platform":"Claude","tags":[],"authorName":"LLM Mart","authorSlug":"llm-mart","score":0,"source":"github","price":null,"verified":false,"createdAt":"2026-08-25T15:10:39.04689Z","repo":{"url":"https://github.com/nowork-studio/notfair-plugin","stars":3849,"forks":495,"license":"MIT","updatedAt":"2026-09-22T18:08:44Z"},"bodyHtml":"<hr>\n<p>name: setup-cms\nargument-hint: \"&lt;CMS name: wordpress, strapi, contentful, or ghost&gt;\"\ndescription: &gt;\nConnect a CMS to notfair SEO tools. Guides users through configuring\nWordPress, Strapi, Contentful, or Ghost — tests the connection, and writes\ncredentials to .env.local. Once set up, seo-analysis automatically cross-\nreferences CMS content against Google Search Console data. Use whenever the\nuser says \"connect my CMS\", \"set up WordPress\", \"configure Strapi\", \"add\nContentful\", \"connect Ghost\", or \"CMS setup\". Also trigger if the user asks\nwhy no CMS data appears in a seo-analysis report.\nallowed-tools:</p>\n<ul>\n<li>Bash</li>\n<li>Read</li>\n<li>Write</li>\n<li>AskUserQuestion</li>\n</ul>\n<hr>\n<h1>/setup-cms</h1>\n<p>Guide the user through connecting their CMS to notfair's SEO analysis tools.</p>\n<p>Once configured, <code>/seo-analysis</code> automatically pulls published content from\nthe CMS and cross-references it against Google Search Console data — finding\ninvisible pages, content gaps, stale articles, and missing SEO fields.</p>\n<hr>\n<h2>Step 0 — Setup</h2>\n<p>Read and follow <code>../shared/preamble.md</code> — it locates the SEO scripts directory. Use <code>$SKILL_SCRIPTS</code> from the preamble for all script calls below.</p>\n<h2>Step 1 — Detect existing CMS configuration</h2>\n<pre><code>CMS_TYPE=$(python3 \"$SKILL_SCRIPTS/cms_detect.py\" 2&gt;/dev/null)\nCMS_STATUS=$?\necho \"CMS_TYPE=$CMS_TYPE  EXIT=$CMS_STATUS\"\n</code></pre>\n<ul>\n<li><p><code>CMS_STATUS=0</code> → a CMS is already configured (<code>$CMS_TYPE</code> is the name).\nShow the user: \"You already have <strong>[$CMS_TYPE]</strong> connected. Would you like to\nreconfigure it, or switch to a different CMS?\"\nWait for their reply. If they say reconfigure/switch, continue to Step 2.\nIf they say test or verify, jump to Step 5 (skip to connection test).</p>\n</li>\n<li><p><code>CMS_STATUS=2</code> → nothing configured yet. Continue to Step 2.</p>\n</li>\n</ul>\n<hr>\n<h2>Step 2 — Choose a CMS</h2>\n<p>Ask the user:</p>\n<blockquote>\n<p>\"Which CMS are you connecting? I support:</p>\n<ol>\n<li><strong>WordPress</strong> — self-hosted or WordPress.com (uses REST API + Application Password)</li>\n<li><strong>Strapi</strong> — v4 or v5, self-hosted (uses API Token)</li>\n<li><strong>Contentful</strong> — cloud headless CMS (uses Delivery API key)</li>\n<li><strong>Ghost</strong> — Ghost.org or self-hosted (uses Content API key)</li>\n</ol>\n<p>Reply with the name or number.\"</p>\n</blockquote>\n<p>Wait for their answer. Map to: <code>wordpress</code>, <code>strapi</code>, <code>contentful</code>, <code>ghost</code>.</p>\n<hr>\n<h2>Step 3 — Credential setup by CMS</h2>\n<p>Jump to the sub-section for the chosen CMS.</p>\n<hr>\n<h3>3A — WordPress</h3>\n<p>WordPress uses the built-in <strong>Application Passwords</strong> feature (introduced in WP 5.6).\nThis is the safest way to grant API access — it never exposes your main password\nand can be revoked at any time.</p>\n<p>Tell the user:</p>\n<blockquote>\n<p>\"I need three things to connect WordPress:</p>\n<ol>\n<li><strong>Your WordPress URL</strong> (e.g. <code>https://myblog.com</code>)</li>\n<li><strong>Your WordPress username</strong> (the one you log in with)</li>\n<li><strong>An Application Password</strong> — create one in:\nWordPress Admin → Users → Profile → scroll to <strong>Application Passwords</strong>\n→ enter a name like \"notfair\" → click <strong>Add New</strong> → copy the generated password</li>\n</ol>\n<p>Paste each value when ready.\"</p>\n</blockquote>\n<p>Collect values one at a time:</p>\n<ol>\n<li>Ask for <code>WP_URL</code> → validate it starts with <code>http://</code> or <code>https://</code></li>\n<li>Ask for <code>WP_USERNAME</code></li>\n<li>Ask for <code>WP_APP_PASSWORD</code></li>\n<li>Ask for <code>WP_CONTENT_TYPE</code>:\n<blockquote>\n<p>\"What content type should I analyze? Common values: <code>posts</code>, <code>pages</code>.\nPress Enter to use <code>posts</code> (default), or enter a custom post type slug.\"</p>\n</blockquote>\n</li>\n</ol>\n<p>Once all four are collected, continue to Step 4 (test connection).</p>\n<p>Write to <code>.env.local</code>:</p>\n<pre><code>WP_URL=&lt;value&gt;\nWP_USERNAME=&lt;value&gt;\nWP_APP_PASSWORD=&lt;value&gt;\nWP_CONTENT_TYPE=&lt;value or posts&gt;\n</code></pre>\n<hr>\n<h3>3B — Strapi</h3>\n<p>Tell the user:</p>\n<blockquote>\n<p>\"I need two things to connect Strapi:</p>\n<ol>\n<li><strong>Your Strapi URL</strong> (e.g. <code>https://cms.example.com</code>)</li>\n<li><strong>A Full-access API Token</strong> — create one in:\nStrapi Admin → Settings → Global settings → API Tokens → Create new API Token\n→ Type: <strong>Full access</strong> → copy the token</li>\n</ol>\n<p>Optionally:</p>\n<ul>\n<li><strong>Content type</strong> — the plural API ID of your content collection (default: <code>articles</code>).\nFind it in: Content-Type Builder → [your type] → API ID (plural)</li>\n<li><strong>Strapi version</strong> — <code>4</code> or <code>5</code> (auto-detected if omitted)</li>\n</ul>\n<p>Paste each value when ready.\"</p>\n</blockquote>\n<p>Collect:</p>\n<ol>\n<li><code>STRAPI_URL</code></li>\n<li><code>STRAPI_API_KEY</code></li>\n<li><code>STRAPI_CONTENT_TYPE</code> (optional, default: <code>articles</code>)</li>\n<li><code>STRAPI_VERSION</code> (optional)</li>\n</ol>\n<p>Write to <code>.env.local</code>:</p>\n<pre><code>STRAPI_URL=&lt;value&gt;\nSTRAPI_API_KEY=&lt;value&gt;\nSTRAPI_CONTENT_TYPE=&lt;value or articles&gt;\n</code></pre>\n<p>Include <code>STRAPI_VERSION=&lt;value&gt;</code> only if the user specified it.</p>\n<hr>\n<h3>3C — Contentful</h3>\n<p>Tell the user:</p>\n<blockquote>\n<p>\"I need three things to connect Contentful:</p>\n<ol>\n<li><strong>Space ID</strong> — find it in: Contentful → Settings → General Settings → Space ID</li>\n<li><strong>Content Delivery API token</strong> — find it in:\nSettings → API Keys → [your key] → Content Delivery API - access token\n(If no key exists, create one under Settings → API Keys → Add API Key)</li>\n<li><strong>Content type ID</strong> — the API identifier for your content type.\nFind it in: Content model → [your type] → API Identifier</li>\n</ol>\n<p>Optionally:</p>\n<ul>\n<li><strong>Environment</strong> (default: <code>master</code>)</li>\n</ul>\n<p>Paste each value when ready.\"</p>\n</blockquote>\n<p>Collect:</p>\n<ol>\n<li><code>CONTENTFUL_SPACE_ID</code></li>\n<li><code>CONTENTFUL_DELIVERY_TOKEN</code></li>\n<li><code>CONTENTFUL_CONTENT_TYPE</code></li>\n<li><code>CONTENTFUL_ENVIRONMENT</code> (optional, default: <code>master</code>)</li>\n</ol>\n<p>Write to <code>.env.local</code>:</p>\n<pre><code>CONTENTFUL_SPACE_ID=&lt;value&gt;\nCONTENTFUL_DELIVERY_TOKEN=&lt;value&gt;\nCONTENTFUL_CONTENT_TYPE=&lt;value&gt;\nCONTENTFUL_ENVIRONMENT=&lt;value or master&gt;\n</code></pre>\n<hr>\n<h3>3D — Ghost</h3>\n<p>Tell the user:</p>\n<blockquote>\n<p>\"I need two things to connect Ghost:</p>\n<ol>\n<li><strong>Your Ghost URL</strong> (e.g. <code>https://myblog.ghost.io</code>)</li>\n<li><strong>Content API key</strong> — create one in:\nGhost Admin → Settings → Integrations → Add custom integration\n→ copy the <strong>Content API Key</strong></li>\n</ol>\n<p>Optionally:</p>\n<ul>\n<li><strong>Content type</strong>: <code>posts</code> (default) or <code>pages</code></li>\n</ul>\n<p>Paste each value when ready.\"</p>\n</blockquote>\n<p>Collect:</p>\n<ol>\n<li><code>GHOST_URL</code></li>\n<li><code>GHOST_CONTENT_KEY</code></li>\n<li><code>GHOST_CONTENT_TYPE</code> (optional, default: <code>posts</code>)</li>\n</ol>\n<p>Write to <code>.env.local</code>:</p>\n<pre><code>GHOST_URL=&lt;value&gt;\nGHOST_CONTENT_KEY=&lt;value&gt;\nGHOST_CONTENT_TYPE=&lt;value or posts&gt;\n</code></pre>\n<hr>\n<h2>Step 4 — Write .env.local</h2>\n<p>Find the project's <code>.env.local</code> file. Search for it:</p>\n<pre><code>ENV_FILE=\"\"\nfor candidate in \".env.local\" \"$HOME/.env.local\"; do\n  [ -f \"$candidate\" ] &amp;&amp; ENV_FILE=\"$candidate\" &amp;&amp; break\ndone\n[ -z \"$ENV_FILE\" ] &amp;&amp; ENV_FILE=\".env.local\"\necho \"Writing to: $ENV_FILE\"\n</code></pre>\n<p><strong>Merge strategy</strong> — do not overwrite the entire file. For each env var:</p>\n<ol>\n<li>If the key already exists in the file, replace that line.</li>\n<li>If it does not exist, append it to the end.</li>\n</ol>\n<p>Read the file first (if it exists), then update key by key, then write back.</p>\n<p>If the file doesn't exist yet, create it.</p>\n<p>After writing, confirm:</p>\n<blockquote>\n<p>\"Credentials written to <code>[path]</code>. Testing connection now...\"</p>\n</blockquote>\n<hr>\n<h2>Step 5 — Test connection</h2>\n<p>Run the appropriate preflight script and capture the exit code:</p>\n<pre><code># WordPress\npython3 \"$SKILL_SCRIPTS/preflight_wordpress.py\" 2&gt;&amp;1; PREFLIGHT_EXIT=$?\n\n# Strapi\npython3 \"$SKILL_SCRIPTS/preflight_strapi.py\" 2&gt;&amp;1; PREFLIGHT_EXIT=$?\n\n# Contentful\npython3 \"$SKILL_SCRIPTS/preflight_contentful.py\" 2&gt;&amp;1; PREFLIGHT_EXIT=$?\n\n# Ghost\npython3 \"$SKILL_SCRIPTS/preflight_ghost.py\" 2&gt;&amp;1; PREFLIGHT_EXIT=$?\n</code></pre>\n<p>The <code>2&gt;&amp;1</code> redirect surfaces error messages in the output so you can show them.</p>\n<p><strong><code>PREFLIGHT_EXIT=0</code></strong> — connection successful. Show the \"OK: …\" line to the user,\nthen continue to Step 6.</p>\n<p><strong><code>PREFLIGHT_EXIT=1</code></strong> — connection failed. Show the full error output verbatim.\nHelp the user diagnose:</p>\n<ul>\n<li><code>401 Unauthorized</code> → wrong token/password — suggest regenerating</li>\n<li><code>403 Forbidden</code> → token lacks permission — suggest a Full Access / unrestricted token</li>\n<li><code>404 Not Found</code> → wrong URL or wrong content type slug</li>\n<li>Network error → URL unreachable — check the URL in a browser first</li>\n</ul>\n<p>Ask: \"Want to fix the credentials and try again (I'll go back to Step 3), or skip CMS setup for now?\"</p>\n<p><strong><code>PREFLIGHT_EXIT=2</code></strong> → credentials were removed from <code>.env.local</code> between steps. Restart from Step 3.</p>\n<hr>\n<h2>Step 6 — Confirm and summarize</h2>\n<p>Once the connection succeeds, show a summary:</p>\n<pre><code>CMS connected successfully!\n\n  CMS:          [WordPress/Strapi/Contentful/Ghost]\n  URL:          [cms_url]\n  Content type: [content_type]\n  Published:    [N] entries found\n\nWhat this enables in /seo-analysis:\n  • Cross-reference [N] published articles against Google Search Console data\n  • Find published content with zero GSC impressions (unindexed or invisible)\n  • Identify content gaps: queries ranking 11-30 with no matching article\n  • Flag stale content: articles &gt;6 months old with declining clicks\n  • Audit SEO fields: missing meta titles/descriptions, length violations\n</code></pre>\n<p>Then offer:</p>\n<blockquote>\n<p>\"Run <code>/seo-analysis</code> to see a full audit with your CMS content included,\nor type <code>/setup-cms</code> again to connect a different CMS.\"</p>\n</blockquote>\n","files":[{"path":"evals/evals.json","sizeBytes":1696,"isText":true},{"path":"SKILL.md","sizeBytes":8820,"isText":true}],"reviewScore":null,"reviewSummary":null,"trust":{"provenance":"trusted-source-unreviewed","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow.","bodySource":null},"bodyLocked":false,"purchaseUrl":null,"sourceUrl":null,"report":{"provenance":"trusted-source-unreviewed","screen":{"ran":true,"outcome":"notes-only","suspicious":0,"notes":24,"hiddenCharacters":false},"virusScan":{"engine":"clamav","status":"clean","scannedAt":"2026-08-25T15:11:51.142028Z","sha256":"D25199125A9952D95CFC9DE814519AD1473CB4649977925A09C5BAF9196AD1C3","sizeBytes":4395},"review":null,"source":{"repositoryUrl":"https://github.com/nowork-studio/notfair-plugin","path":"seo/setup-cms","license":"MIT","commit":"f98476822da879fc56b0bb7d1a2bf683b934f98f","subtreeSha":"4D4E00C8817F9F464AB83DFF97C35ED2EAC051A1CDAF5859329192DAA405B2CF","lastSyncedAt":"2026-09-23T13:50:57.861587Z"},"reviewedAt":"2026-08-25T15:13:48.953862Z","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow."},"install":[{"target":"skills-cli","command":"npx skills add https://github.com/nowork-studio/notfair-plugin/tree/main/seo/setup-cms"},{"target":"claude-code","command":"claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install nowork-studio-notfair-plugin@llmmart"},{"target":"git","command":"git clone https://github.com/nowork-studio/notfair-plugin.git"}]}