Loading...
Loading...
Connect a CMS to toprank 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.
npx skill4agent add nowork-studio/toprank setup-cms/seo-analysis../shared/preamble.md$SKILL_SCRIPTSCMS_TYPE=$(python3 "$SKILL_SCRIPTS/cms_detect.py" 2>/dev/null)
CMS_STATUS=$?
echo "CMS_TYPE=$CMS_TYPE EXIT=$CMS_STATUS"CMS_STATUS=0$CMS_TYPECMS_STATUS=2"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."
wordpressstrapicontentfulghost"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 "toprank" → click Add New → copy the generated password
Paste each value when ready."
WP_URLhttp://https://WP_USERNAMEWP_APP_PASSWORDWP_CONTENT_TYPE"What content type should I analyze? Common values:,posts. Press Enter to usepages(default), or enter a custom post type slug."posts
.env.localWP_URL=<value>
WP_USERNAME=<value>
WP_APP_PASSWORD=<value>
WP_CONTENT_TYPE=<value or posts>"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:
). Find it in: Content-Type Builder → [your type] → API ID (plural)articles- Strapi version —
or4(auto-detected if omitted)5Paste each value when ready."
STRAPI_URLSTRAPI_API_KEYSTRAPI_CONTENT_TYPEarticlesSTRAPI_VERSION.env.localSTRAPI_URL=<value>
STRAPI_API_KEY=<value>
STRAPI_CONTENT_TYPE=<value or articles>STRAPI_VERSION=<value>"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:
)masterPaste each value when ready."
CONTENTFUL_SPACE_IDCONTENTFUL_DELIVERY_TOKENCONTENTFUL_CONTENT_TYPECONTENTFUL_ENVIRONMENTmaster.env.localCONTENTFUL_SPACE_ID=<value>
CONTENTFUL_DELIVERY_TOKEN=<value>
CONTENTFUL_CONTENT_TYPE=<value>
CONTENTFUL_ENVIRONMENT=<value or master>"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:
(default) orpostspagesPaste each value when ready."
GHOST_URLGHOST_CONTENT_KEYGHOST_CONTENT_TYPEposts.env.localGHOST_URL=<value>
GHOST_CONTENT_KEY=<value>
GHOST_CONTENT_TYPE=<value or posts>.env.localENV_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""Credentials written to. Testing connection now..."[path]
# 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=$?2>&1PREFLIGHT_EXIT=0PREFLIGHT_EXIT=1401 Unauthorized403 Forbidden404 Not FoundPREFLIGHT_EXIT=2.env.localCMS 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"Runto see a full audit with your CMS content included, or type/seo-analysisagain to connect a different CMS."/setup-cms