---
name: blog-pipeline
description: Run the full blog creation pipeline from keyword to publish-ready article
argument-hint: "[keyword or step]"
---

# Blog Pipeline Skill

Orchestrate the full blog creation pipeline, running each skill in sequence from keyword research to publish-ready article.

## Input

**Option A: Full pipeline from keyword**
```
/blog-pipeline "content marketing"
```

**Option B: With user reference material**
```
/blog-pipeline "content marketing" --references="https://example.com/my-article"
/blog-pipeline "content marketing" --references="https://example.com/article, ./images/data-chart.png, ./0-references/notes.md"
```

**Option C: Resume from a specific step**
```
/blog-pipeline --from=draft "content marketing"
```

**Option D: Run without arguments**
```
/blog-pipeline
```
Shows available keywords from `keyword-ideas.csv`.

---

## Pipeline Steps

| Step | Skill | Input | Output Folder |
|------|-------|-------|---------------|
| 1 | `/research` | keyword | `1-research/` |
| 2 | `/outline` | research file | `2-outlines/` |
| 3 | `/ahrefs-mentions` | outline file | `3-outlines-annotated/` |
| 4 | `/draft` | annotated outline | `4-drafts/` |
| 5 | `/verify-claims` | draft file | `5-drafts-cited/` |
| 6 | `/preview` | cited draft | `6-preview/` |
| 7 | `/format-for-publish` | cited draft | `7-publish/` |

---

## Workflow Execution

1. **Parse arguments**: Extract keyword and `--references` value
2. **Handle references** (if provided): Fetch URLs, read images and files, combine into `./0-references/[slug]-ref.md`
3. **Run each step in sequence**, verifying output exists before proceeding
4. **Report completion** with all file locations

---

## Resume from Step

Valid `--from` values: `research`, `outline`, `ahrefs-mentions`, `draft`, `verify-claims`, `preview`, `format-for-publish`

---

## Error Handling

- **Step fails:** Stop pipeline, report error, preserve completed outputs
- **Missing input:** Check if previous step's output exists before proceeding
- **Directory missing:** Create output directory if it doesn't exist

## Example Usage

```
/blog-pipeline "keyword research"
/blog-pipeline
/blog-pipeline --from=draft "keyword research"
```