A Claude Code Plugin that provides an autonomous AI copywriter for SaaS content marketing.
Uses the Ralph Wiggum pattern - an iterative AI loop that ships content while you sleep.
Installation
Option 1: Add as Marketplace (Recommended)
# In Claude Code, add the repo as a marketplace: /plugin marketplace add muratcankoylan/ralph-wiggum-marketer # Then install the plugin: /plugin install ralph-wiggum-marketer@muratcankoylan-ralph-wiggum-marketer
Option 2: Test Locally (For Development)
# Clone the repo git clone https://github.com/muratcankoylan/ralph-wiggum-marketer.git # Run Claude Code with the plugin directory claude --plugin-dir ./ralph-wiggum-marketer
Option 3: Interactive Plugin Manager
# Open the plugin manager: /plugin # Browse, search, and install from the interactive UI
Quick Start
# 1. Initialize a new content project /ralph-init # 2. Check progress anytime /ralph-status # 3. Cancel if needed /ralph-cancel
Commands
| Command | Description |
|---|---|
/ralph-init |
Initialize a new content project in current directory |
/ralph-marketer |
Start the autonomous copywriter loop |
/ralph-status |
Check content pipeline and progress |
/ralph-cancel |
Cancel the active loop |
How It Works
┌──────────────────────────────────────────────────────────────────┐
│ MULTI-AGENT ECOSYSTEM │
├──────────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ TrendScout │ │ Research │ │ Product/ │ │
│ │ Agent │ │ Agent │ │ Marketing │ │
│ └──────┬──────┘ └──────┬──────┘ └──────┬──────┘ │
│ │ │ │ │
│ ▼ ▼ ▼ │
│ ┌────────────────────────────────────────────────────┐ │
│ │ SQLite Content Database │ │
│ │ • trends • research • communications │ │
│ └────────────────────────┬───────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌────────────────────────────────────────────────────┐ │
│ │ RALPH THE COPYWRITER │ │
│ │ │ │
│ │ Reads inputs → Plans content → Writes drafts │ │
│ │ → Reviews & iterates → Publishes │ │
│ │ │ │
│ │ Memory: git commits + progress.txt + prd.json │ │
│ └────────────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ Published Content │
│ (blogs, case studies, social, newsletters) │
└──────────────────────────────────────────────────────────────────┘
The Ralph Loop
- Read PRD: Check
scripts/ralph/prd.jsonfor tasks - Check Progress: Read
scripts/ralph/progress.txtfor learnings - Pick Task: Find highest priority story where
passes: false - Execute: Complete the task following acceptance criteria
- Verify: Run tests to ensure quality
- Commit: Save progress to git
- Update: Mark task done, log learnings
- Repeat: Loop until all tasks complete
Each iteration is a fresh context window. Memory persists through files.
Plugin Structure
ralph-wiggum-marketer/
├── .claude-plugin/
│ └── plugin.json # Plugin manifest
├── commands/
│ ├── ralph-marketer.md # Main loop command
│ ├── ralph-init.md # Project initialization
│ ├── ralph-status.md # Status check
│ └── ralph-cancel.md # Cancel loop
├── skills/
│ └── copywriter/
│ └── SKILL.md # Copywriter skill
├── hooks/
│ ├── hooks.json # Hook configuration
│ └── stop-hook.sh # Loop continuation hook
├── scripts/
│ └── src/ # Database & utility scripts
├── templates/
│ ├── prd.json # Task template
│ ├── progress.txt # Progress log template
│ ├── prompt.md # Agent instructions template
│ └── package.json # Project package.json template
└── README.md
Database Schema
Input Tables (from other agents)
-- Trends from TrendScout trends (topic, description, source, relevance_score, status) -- Research from Research Agent research (title, summary, key_findings, data_points, category, status) -- Communications from Product/Marketing communications (type, title, details, key_messages, target_audience, priority, status)
Ralph's Workspace
-- Content planning content_plan (content_type, title, brief, target_keywords, status) -- Work in progress drafts (plan_id, version, content, word_count, feedback) -- Final content published (plan_id, final_content, meta_description) -- Activity tracking agent_log (action, details, created_at)
Customizing
Add Your Own Content Sources
Edit src/db/seed.js:
// Add a trend insertTrend.run( 'Your Trend Topic', 'Description of the trend', 'Source', 85 // relevance score ); // Add a communication insertComm.run( 'product_update', 'Your Product Launch', 'Details about what it does', JSON.stringify(['Key message 1', 'Key message 2']), 'Target audience', 1 // priority );
Add Your Own Tasks
Edit scripts/ralph/prd.json:
{
"id": "WRITE-004",
"title": "Write your custom blog",
"acceptanceCriteria": [
"At least 1000 words",
"Includes 3 data points",
"Has compelling CTA"
],
"priority": 5,
"passes": false
}Sample Tasks
The default PRD includes 12 stories:
- SETUP-001: Initialize database
- PLAN-001: Plan product launch blog
- WRITE-001: Write launch blog draft
- PLAN-002: Plan thought leadership blog
- WRITE-002: Write data-driven blog
- REVIEW-001: Review and improve draft
- PUBLISH-001: Publish launch blog
- PLAN-003: Plan case study
- WRITE-003: Write case study
- SOCIAL-001: Create social posts
- NEWSLETTER-001: Draft newsletter
- METRICS-001: Log final metrics
The Ralph Philosophy
"Ralph is a Bash loop. Memory persists only through git history and text files. Each iteration is a fresh context window."
Key principles:
- Small stories - Must complete in one iteration
- Explicit criteria - No ambiguity
- Fast feedback - Tests every iteration
- Compound learnings - Patterns accumulate
- Persistence wins - Keep iterating
Credits
- Original Ralph concept: @GeoffreyHuntley
- Official Ralph plugin: claude-plugins-official
- Video walkthrough: @mattpocockuk
License
MIT