/xuanran-seo-blog-writer:wordpress-category-setupfrom xuanran-seo-blog-writer
Designs and deploys WordPress blog category taxonomies with descriptions, slugs, and RankMath SEO meta. Supports interactive design, config-based apply, and live refresh modes.
Ships in xuanran-seo-blog-writer. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
The category taxonomy is the topical-authority foundation of every WordPress content site. This subskill designs it (interactively) and deploys it (via scripts/wordpress/setup_categories.py) with full SEO optimization — slug, description, RankMath title, meta description, focus keyword, robots directive, and OG/Twitter overrides.
The canonical reference implementation is the project-charlie project, which has 6 top-level + 29 subcategories live with full RankMath metadata. New projects should adapt that pattern to their industry.
/init completes for a new WordPress project — before the first /article runs, so articles have proper categories to land inprojects/{slug}/ must be initialized (run /init <url> first)~/.xuanran-seo/credentials/wordpress/{slug}.json exists and WPClient(slug).health_check() returns 200register_term_meta for category taxonomy): probe GET /xuanran/v1/rank-math-bridge — bridge_version >= 1.1.0 required for the SEO title / focus keyword / OG fields to persist on category archives. Without v1.1, you still get descriptions + slugs + parent hierarchy, but RankMath custom titles default to the global template %term% %sep% %sitename%.business-context.json :: wordpress.seo_plugin). Yoast support is out of scope — Yoast uses different meta key names and ACL rules.Use when projects/{slug}/categories-config.json does NOT exist. The subskill walks an editorial-design interview, drafts the config, shows it for confirmation, then applies.
Workflow:
Load context. Read projects/{slug}/business-context.json for industry, target_audience.primary, voice ratios, and (if present) default_categories and default_tags_pool. These constrain category names and descriptions to the brand voice.
Surface the design principles (see references/category-design-principles.md). Walk the user through the six rules before designing — the rules drive every later decision and rejecting them upfront saves redesigns later.
Top-level category interview. Ask the user to name 5–10 top-level categories. Recommend mapping to (a) product lines, (b) major service axes, or (c) the underlying engineering subsystems for a technical site (project-charlie used the 6-subsystem cultivation framework).
For each top-level, ask 4–7 subcategories with intent classification:
Reject any subcategory that conflates intents (e.g. a "Guides" subcategory mixing "What is PPFD?" with "Best 1000W LED 2026" — the first is Informational, the second is Commercial-Investigation; they cannibalize on the same archive page). This is project-charlie's Rule 3 (see skills/seo-blog/SKILL.md).
Draft descriptions using the style guide (references/category-description-style-guide.md):
Draft RankMath meta per category:
rank_math_title (50–60 chars): {Category Name}: {Differentiating Phrase} | {Brand Name}rank_math_description (150–160 chars): single-sentence summary including focus keyword in first 120 charsrank_math_focus_keyword: 1–3 primary keywords this archive page targetsrank_math_robots: ["index"] (always — there is no reason to noindex a real category archive)rank_math_facebook_* and rank_math_twitter_*: shorter restatement for social cardsrank_math_twitter_card_type: summary_large_imageValidate against the design principles:
lighting-buyer-guides, not lighting/buyer-guides)<a href, no <p>Show full proposal to user as a structured table → confirm.
Save to projects/{slug}/categories-config.json (schema: see template).
Apply via python -m scripts.wordpress.setup_categories {slug}.
Verify — fetch 3–5 live archive URLs with CF bypass header (if configured); confirm HTTP 200, description rendered, RankMath title in <title>, focus keyword in meta description.
Use when projects/{slug}/categories-config.json already exists (manually authored, copied from another project, or generated by a previous Mode A run).
Workflow:
schemas/categories-config.schema.json — to be created when needed).Command: python -m scripts.wordpress.setup_categories {slug} (idempotent — safe to re-run).
Use when categories-config.json has been edited locally and you want to push changes to the live site.
Workflow: identical to Mode B. The setup script is idempotent — it PATCHes existing categories with the new field values and creates any new ones.
references/category-design-principles.md)Quick summary — read the full reference doc before designing:
lighting-buyer-guides) so WordPress's global slug uniqueness rule doesn't collide.| Symptom | Cause | Recovery |
|---|---|---|
GET /xuanran/v1/rank-math-bridge returns 404 | MU plugin not installed | Deploy install/wordpress-mu-plugin/xuanran-rank-math-rest-bridge.php to wp-content/mu-plugins/ on the server. No activation needed; MU plugins auto-load. |
Bridge returns bridge_version: "1.0.0" | MU plugin too old, lacks term meta | Upgrade to v1.1+ (replace the file). After re-deploy, re-run setup_categories to populate RankMath term meta. |
meta: [] returned after PATCH | RankMath term meta keys not registered | Same as above — MU plugin v1.1+ required. Without it, description still applies but custom SEO titles fall back to global template. |
| Category created but archive URL returns 404 | Permalink not flushed | Visit wp-admin/options-permalink.php and save (no changes needed — just trigger flush). |
Description renders with HTML entities <p> | Theme escaped the description | Re-run setup_categories with v2 plain-text descriptions (no HTML). See project-charlie v1→v2 migration. |
| Posts assigned to wrong category | Manual reassignment needed | POST /wp/v2/posts/{id} with {"categories": [new_id]} — this REPLACES all categories on the post (single primary recommended). |
| Duplicate categories on the live site (same name, two term IDs — usually a parentless top-level stray next to the curated child) | Historical publish-time creation minted a dup: pre-v3.19.2 the name match wasn't HTML-entity-aware, so every &-bearing name missed and got re-created (project-hotel 8 pairs, project-kilo orphans). The publisher is resolve-only since 2026-07-11, so new dups can't be minted — but old damage persists until repaired. | python -m scripts.wordpress.dedupe_categories {slug} --check to detect (exit 1 = dups found); --apply to repair: backs up, reassigns every affected post to the canonical (config-listed) term, fixes rank_math_primary_category, deletes the strays, writes 301 rules to projects/{slug}/.seo/category-dedupe-redirects-{date}.json (import in Rank Math → Redirections), and refreshes categories-live.json. |
The /setup-categories slash command (registered in .claude-plugin/plugin.json) invokes this subskill with the active project slug. The user can override with /setup-categories {slug} to operate on a specific project.
references/category-design-principles.md — the 6 design rules in detailreferences/category-description-style-guide.md — how to write tight, link-free descriptionstemplates/categories-config-template.json — empty starter templateprojects/project-charlie/categories-config.json — canonical reference (6 top + 29 sub, all 35 live)projects/project-charlie/content-taxonomy.md — full design doc with subcategory specs and cross-linking matrixscripts/wordpress/setup_categories.py — the idempotent applierinstall/wordpress-mu-plugin/xuanran-rank-math-rest-bridge.php v1.1+ — the term-meta bridgeskills/seo-blog/SKILL.md Rule 3 — the mandatory-sections gate that complements categories at the article levelWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub xuanranl/loamwright-seo-skill --plugin xuanran-seo-blog-writer75 skills in this plugin
/ai-overview-recovery4-phase recovery when Google AI Overview drops an article. Measure damage → diagnose skip reason → rewrite → T+7/14/28 monitor. Triggered by drift-detector AIO loss alert OR /aio-recovery command./ai-visibility-trackerActive probe of ChatGPT/PPLX/Claude/Gemini to check if our article is cited. Compares to projects/{slug}/geo-baseline.json. Triggered by /ai-visibility command or daily/weekly schedule./batch-articleRun /article end-to-end for a list of keywords. Each keyword goes through the FULL pipeline (research → plan → build → optimize → publish → monitor baseline). Use for agency-scale operations — drop 10-500 keywords, get 10-500 published articles. Resumable across sessions./batch-job-pollerSupplemental recovery tool for orphan official-OpenAI image batches (batch is only ever used on the official-OpenAI fallback path; the primary openclawroot relay has no Batch API). The canonical image flow (openai-image-generator) runs realtime and does not require this skill. Use only to diagnose stuck batches or download images from a batch that completed after the main pipeline gave up./brand-auto-tunerAnalyze winner vs loser articles to find features that distinguish them, then suggest brand-guideline.yaml updates. Use after ≥10 articles have outcome tags. Closes the data-loop: production → measurement → learning → next-cycle adjustment./brand-guideline-maker7-Block interactive interview + URL Analysis triangulation. Builds projects/{slug}/brand-guideline.yaml that gets injected into every /article draft. The single most impactful one-time investment per brand — wrong voice = wrong content forever. Triggered by /brand-guideline command, OR after /init Stage 5 when voice-discrepancy detected.Other plugins' skills for the same job