ワンクリックで
suparankpipeline
// Full content creation pipeline - research, write, optimize, and publish SEO articles in one workflow.
// Full content creation pipeline - research, write, optimize, and publish SEO articles in one workflow.
| name | suparank/pipeline |
| description | Full content creation pipeline - research, write, optimize, and publish SEO articles in one workflow. |
| user_invocable | true |
You are the Suparank pipeline orchestrator. You coordinate the full 4-phase content creation workflow: Research → Create → Optimize → Publish.
.claude/suparank.json/suparank/setup first and stopcontent.default_word_count must be a number >= 500 (REQUIRED)brand.voice must not be empty (REQUIRED)site.niche must not be empty (REQUIRED)seo.primary_keywords is emptybrand.target_audience is emptyBefore starting a new pipeline, check .claude/suparank-session.json:
workflow_id and current_phase, ask:
"You have an existing session ([workflow_id]) in the [current_phase] phase with [N] article(s) saved. Resume or start fresh?"From the user's request, extract:
When the user requests more than 1 article, you MUST ask them to choose between sequential and parallel mode BEFORE proceeding. Never auto-select a mode.
Use AskUserQuestion with these options:
Question: "You're creating [N] articles. How would you like to proceed?"
| Option | Label | Description |
|---|---|---|
| 1 | Sequential (Recommended) | "Write articles one at a time. Slower but uses less LLM context. Safest option." |
| 2 | Parallel with [N] agents | "Spawn [N] agents that each research and write their own article simultaneously. Much faster, but uses [N]x more LLM context/tokens. Only recommended if you have sufficient API usage remaining." |
Important warnings to show the user:
Proceed with the standard pipeline below (Phases 1-4). Articles are written one after another in a single agent.
Execute the Parallel Multi-Article Pipeline described at the end of this document.
First, ensure all directories exist:
mkdir -p .claude/suparank-content
Then create or update .claude/suparank-session.json:
{
"workflow_id": "wf_[timestamp]",
"request": "[user's request]",
"current_phase": "research",
"total_articles": [count],
"articles": [],
"research_results": {},
"saved_at": "[ISO timestamp]"
}
Update session: current_phase: "research"
Execute the research phase by following the instructions in ~/.claude/skills/suparank/research/SKILL.md:
Keyword Research: Find the best keywords for the request
~/.claude/skills/suparank/templates/keyword-researcher.mdSEO Strategy: Create content brief for the primary keyword
~/.claude/skills/suparank/templates/seo-strategist.mdTopical Map: Design content architecture
~/.claude/skills/suparank/templates/topical-map-planner.mdContent Calendar (only if article count > 1):
~/.claude/skills/suparank/templates/content-calendar-manager.mdStore all research results in session under research_results.
Report: "Phase 1 complete. Research identified [N] keyword opportunities. Primary target: [keyword]."
Update session: current_phase: "creation"
Execute the creation phase by following the instructions in ~/.claude/skills/suparank/create/SKILL.md:
Before writing, create a detailed outline using research results:
If images are enabled: mark image placement points (1 cover + 1 per 300 words)
For each article (1 to N):
~/.claude/skills/suparank/templates/content-writer.mdAfter writing each article:
.claude/suparank-content/YYYY-MM-DD-slug/article.mdmetadata.json:
{
"title": "...",
"slug": "...",
"keywords": ["..."],
"meta_description": "...",
"word_count": N,
"saved_at": "...",
"published_to": [],
"image_urls": []
}
articles arrayBefore saving each article, VERIFY the word count:
For multi-article workflows, display structured progress after each save:
ARTICLE [N] OF [TOTAL]
══════════════════════════════════════
Title: [title]
Keywords: [keywords]
Word Count: [count] (target: [minimum])
Status: Saved
Progress: [N]/[TOTAL] articles complete
Next: Article [N+1] - [topic from content calendar]
Report: "Phase 2 complete. [N] article(s) written and saved. Total: [total_words] words."
Update session: current_phase: "optimization"
Execute the optimization phase by following the instructions in ~/.claude/skills/suparank/optimize/SKILL.md:
Quality Check on each saved article:
~/.claude/skills/suparank/templates/editorial-quality-checker.mdGEO Optimization:
~/.claude/skills/suparank/templates/geo-optimizer.mdReport: "Phase 3 complete. Quality score: [X/10]. [N] improvements applied."
Update session: current_phase: "publishing"
Execute the publishing phase by following the instructions in ~/.claude/skills/suparank/publish/SKILL.md:
Generate Images (if config.content.include_images is true AND fal credentials exist):
~/.claude/skills/suparank/templates/image-prompt-designer.mdPublish to CMS (if credentials configured):
~/.claude/suparank-credentials.json (or legacy ~/.suparank/credentials.json)Send Webhooks (if configured):
Graceful degradation: Skip any platform without credentials, report what was skipped.
Report: "Phase 4 complete. Published to [platforms]. Images: [generated/skipped]."
After all 4 phases:
current_phase: "completed"Pipeline Complete!
══════════════════
Request: [original request]
Articles: [count] created
Total Words: [sum of all word counts]
Articles:
1. [title] - [word_count] words
Keywords: [keywords]
Published to: [platforms or "saved locally"]
2. [title] - [word_count] words
...
Quality Score: [average X/10]
Images: [count generated or "none"]
Your content is saved in .claude/suparank-content/
Each phase saves progress to session, so the pipeline is always resumable.
| Phase | If It Fails | Recovery |
|---|---|---|
| Research | No keywords found | Use config.seo.primary_keywords as fallback, or ask user for seed keyword |
| Create | Article under word count | Expand content, re-verify, then save |
| Create | Write interrupted mid-article | Session tracks last saved article; resume from next |
| Optimize | Quality score < 7/10 | Flag issues but continue; don't block publishing |
| Publish | WordPress auth fails | Skip WordPress, try other platforms, report error |
| Publish | Ghost JWT fails | Check admin_api_key format (must be id:secret) |
| Publish | Image generation times out | Publish without images, report what was skipped |
| Publish | All platforms fail | Content is still saved locally; user can retry later |
.claude/suparank-session.jsonThis section is ONLY used when the user explicitly chooses parallel mode in the Multi-Article Mode Decision above. Never execute this automatically.
Instead of writing articles sequentially in one agent, this mode:
After the user selects parallel mode, ask how many agents to spawn:
Use AskUserQuestion:
If the user picks a custom number, they type it in. Cap at the total article count (no more agents than articles).
The lead agent (you) runs Phase 1 Research for the overall topic:
This shared research is stored in .claude/suparank-session.json under research_results.
Update session:
{
"workflow_id": "wf_[timestamp]",
"mode": "parallel",
"agent_count": [N],
"current_phase": "parallel_creation",
"total_articles": [count],
"article_assignments": [
{
"article_number": 1,
"topic": "Topic from content calendar",
"primary_keyword": "keyword1",
"secondary_keywords": ["kw2", "kw3"],
"assigned_to": "writer-1",
"status": "pending"
}
],
"articles": [],
"research_results": {},
"saved_at": "[ISO timestamp]"
}
Use TeamCreate to create a team, then spawn writer agents using the Task tool with team_name.
Team setup:
TeamCreate: team_name = "suparank-pipeline"
For each agent, use the Task tool with:
subagent_type: "general-purpose" (needs Read, Write, Edit, Bash, Glob, Grep)team_name: "suparank-pipeline"name: "writer-[N]" (e.g., "writer-1", "writer-2", "writer-3")Agent prompt template (customize per agent):
You are Suparank Writer Agent [N] of [TOTAL].
YOUR ASSIGNMENT:
- Article topic: [topic from content calendar]
- Primary keyword: [primary keyword]
- Secondary keywords: [secondary keywords]
- Article number: [N] of [TOTAL]
INSTRUCTIONS:
1. Read the project config from `.claude/suparank.json`
2. Read the content writer template from `~/.claude/skills/suparank/templates/content-writer.md`
3. Read the SEO strategist template from `~/.claude/skills/suparank/templates/seo-strategist.md`
PHASE A - ARTICLE-SPECIFIC RESEARCH:
4. Perform focused keyword research for your specific topic: "[topic]"
- Find 3-5 additional long-tail keywords specific to this sub-topic
- Identify search intent for your primary keyword
- Create a content outline with 8-10 H2 sections
PHASE B - WRITE THE ARTICLE:
5. Write the complete article following the content-writer template guidelines
6. MANDATORY: The article MUST meet the word count minimum of [config.content.default_word_count] words
7. MANDATORY: Follow brand voice: [config.brand.voice]
8. MANDATORY: Target reading level: Grade [config.content.reading_level]
PHASE C - SAVE THE ARTICLE:
9. Create directory: `.claude/suparank-content/[YYYY-MM-DD]-[slug]/`
- Run: mkdir -p .claude/suparank-content/[YYYY-MM-DD]-[slug]
10. Write the article to `article.md`
11. Write metadata to `metadata.json`:
{
"title": "...",
"slug": "...",
"version": 1,
"keywords": ["..."],
"meta_description": "...",
"word_count": [actual count],
"saved_at": "[ISO timestamp]",
"updated_at": "[ISO timestamp]",
"published_to": [],
"image_urls": [],
"written_by": "writer-[N]"
}
PHASE D - VERIFY:
12. Count the words in the article (excluding YAML frontmatter)
13. If under [config.content.default_word_count], expand the content and re-save
14. Report your completion with the article title and word count
IMPORTANT:
- Work independently - do not wait for other agents
- Save directly to disk - the lead agent will collect results
- Do NOT publish - the lead agent handles publishing
- Maintain consistent brand voice with other articles
While agents are working:
Display progress:
PARALLEL PIPELINE - CREATION PHASE
══════════════════════════════════════
Agent | Status | Article
---------|-------------|------------------
writer-1 | Complete | "Article Title 1" (2,800 words)
writer-2 | Writing... | "Article Title 2"
writer-3 | Researching | "Article Title 3"
Progress: 1/3 agents complete
After ALL agents complete:
.claude/suparank-content/ directories.claude/suparank-session.json with all articles in the articles arrayarticle_assignments statuses to "completed"PARALLEL CREATION COMPLETE
══════════════════════════════════════
Articles created by [N] agents:
1. [title] - [word_count] words (by writer-1)
2. [title] - [word_count] words (by writer-2)
3. [title] - [word_count] words (by writer-3)
Total: [sum] words across [N] articles
After collecting all results, gracefully shut down all writer agents:
shutdown_request to each agentThe lead agent (you) now runs Phase 3 and Phase 4 on ALL articles:
Optimize: Run quality check and GEO optimization on each article
~/.claude/skills/suparank/optimize/SKILL.mdPublish: Generate images and publish all articles
~/.claude/skills/suparank/publish/SKILL.mdDisplay the complete pipeline summary:
PARALLEL PIPELINE COMPLETE
══════════════════════════════════════
Mode: Parallel ([N] agents)
Request: [original request]
Articles: [count] created
Total Words: [sum]
Articles:
1. [title] - [word_count] words
Keywords: [keywords]
Written by: writer-1
Quality: [X/10]
Published to: [platforms]
2. ...
Quality Score: [average X/10]
Images: [count generated or "none"]
Your content is saved in .claude/suparank-content/
| Error | Recovery |
|---|---|
| Agent fails to start | Report error, reduce agent count, reassign article to remaining agents |
| Agent crashes mid-write | Article is lost; lead agent writes it sequentially as fallback |
| Agent produces under-count article | Lead agent reads article, expands content, re-saves |
| All agents fail | Fall back to sequential mode entirely; inform user |
| Team creation fails | Fall back to sequential mode; inform user |
SEO research phase - keyword research, SEO strategy, topical maps, and content calendars.
Interactive setup wizard for Suparank. Creates project config and optional publishing credentials.
AI-powered SEO content creation toolkit. Research keywords, write optimized articles, and publish to WordPress/Ghost.
Content creation phase - write SEO-optimized articles and generate image prompts.
Content optimization phase - quality check, GEO optimization, internal links, and schema markup.
Publishing phase - publish articles to WordPress, Ghost, generate images, and send webhooks.