# MyAIDev Method - User Guide

> **🎯 Complete guide to customizing and using your AI CLI skills**

This guide covers everything you need to know about using, customizing, and extending the MyAIDev Method package after installation.

## 📋 Table of Contents

- [Quick Start](#quick-start)
- [Plugin Architecture & Skills](#-plugin-architecture--skills)
- [System Configuration](#-system-configuration)
- [Updating MyAIDev Method](#-updating-myaidev-method)
- [Understanding the Structure](#understanding-the-structure)
- [👤 User Pathways](#-user-pathways)
  - [Content Creator Pathway](#content-creator-pathway)
  - [Developer Pathway](#developer-pathway)
- [SPARC Development Workflow](#sparc-development-workflow)
- [Git & CI/CD Workflows](#git--cicd-workflows)
- [Multi-Platform Support](#multi-platform-support)
- [Customizing Skills](#customizing-skills)
- [Managing Skills](#managing-skills)
- [WordPress Integration](#wordpress-integration)
- [PayloadCMS Integration](#payloadcms-integration)
- [Visual Generation](#-visual-generation)
- [Content Rules & Brand Voice](#-content-rules--brand-voice)
- [SSH Configuration](#ssh-configuration)
- [Skill Management](#skill-management)
- [Troubleshooting](#troubleshooting)
- [Advanced Usage](#advanced-usage)
- [Best Practices](#best-practices)
- [Skill Builder (Eval-Driven Development)](#-skill-builder-eval-driven-development)
- [Contributing Skills to the Marketplace](#-contributing-skills-to-the-marketplace)

## 🚀 Quick Start

After installing with `npx myaidev-method@latest init --claude`, you'll see the MyAIDev Method banner and SPARC methodology breakdown:

```
███╗   ███╗██╗   ██╗ █████╗ ██╗██████╗ ███████╗██╗   ██╗
████╗ ████║╚██╗ ██╔╝██╔══██╗██║██╔══██╗██╔════╝██║   ██║
██╔████╔██║ ╚████╔╝ ███████║██║██║  ██║█████╗  ██║   ██║
██║╚██╔╝██║  ╚██╔╝  ██╔══██║██║██║  ██║██╔══╝  ╚██╗ ██╔╝
██║ ╚═╝ ██║   ██║   ██║  ██║██║██████╔╝███████╗ ╚████╔╝ 
╚═╝     ╚═╝   ╚═╝   ╚═╝  ╚═╝╚═╝╚═════╝ ╚══════╝  ╚═══╝  

           ███╗   ███╗███████╗████████╗██╗  ██╗ ██████╗ ██████╗ 
           ████╗ ████║██╔════╝╚══██╔══╝██║  ██║██╔═══██╗██╔══██╗
           ██╔████╔██║█████╗     ██║   ███████║██║   ██║██║  ██║
           ██║╚██╔╝██║██╔══╝     ██║   ██╔══██║██║   ██║██║  ██║
           ██║ ╚═╝ ██║███████╗   ██║   ██║  ██║╚██████╔╝██████╔╝
           ╚═╝     ╚═╝╚══════╝   ╚═╝   ╚═╝  ╚═╝ ╚═════╝ ╚═════╝ 

╔══════════════════════════════════════════════════════════════════════════╗
║  SPARC Methodology - Systematic Software Development Framework           ║
╚══════════════════════════════════════════════════════════════════════════╝

  S │ 📋 Specification
      Define requirements and system boundaries
      → Clear goals, constraints, and success criteria

  P │ 🔄 Pseudocode
      Plan implementation approach
      → Algorithm design and logic flow

  A │ 🏗️ Architecture
      Design system structure and components
      → APIs, data models, and service layers

  R │ ⚡ Refinement
      Implement with SOLID principles and testing
      → Clean code, security, and performance

  C │ 🎯 Completion
      Documentation and deployment preparation
      → User guides, API docs, and CI/CD setup
```

You'll have a `.claude` folder in your project with skills installed:

```
.claude/
├── skills/            # AI skills (installed from skills/)
├── mcp/              # MCP integrations
└── CLAUDE.md         # Project configuration
```

### First-Time Setup

Use the interactive configuration command to set up your environment—no manual `.env` editing required:

```bash
# Configure WordPress integration
/configure wordpress

# Configure OpenStack (if using VM management)
/configure openstack

# Configure default content settings
/configure defaults

# Set up content rules for brand voice
/myai-content-rules-config
```

### Immediate Usage

```bash
# SPARC Development Workflow
/myaidev-workflow "Build user authentication system"

# Create professional content
/content-writer "10 Best Remote Work Tips"

# Git & CI/CD
/myai-git-pr "Add authentication feature"
/myai-deploy-staging

# WordPress administration
/wordpress-publisher health-check

# Manage skills and settings
/configure skills --list
```

## 🔌 Plugin Architecture & Skills

**New in v0.2.25!** MyAIDev Method now supports a modern plugin-based architecture with discoverable skills, cross-platform compatibility, and marketplace distribution.

### Two-Tier Skill Strategy

MyAIDev Method provides two categories of skills:

**Tier 1: Open Source Community Skills** — Free skills contributed by the community and distributed via the [MyAIDev Marketplace](https://github.com/myaione/myaidev-marketplace). Every skill is stringently curated, tested, and vetted for malware and quality before reaching users. Install with `addon install <name>`, run locally in your Claude Code session, and customize by editing the SKILL.md file.

**Tier 2: Premium Cloud-Hosted Skills** — Advanced skills and tools provided by the MyAIDev platform via authenticated API calls to `dev.myai1.ai`. These are cloud-hosted, managed by the MyAIDev team, and offer premium capabilities beyond what open source skills provide. Requires an auth token (`myaidev-method login`).

| | Open Source (Tier 1) | Premium Cloud (Tier 2) |
|---|---|---|
| **Cost** | Free | Subscription |
| **Execution** | Local | Cloud-hosted |
| **Source** | Community | MyAIDev team |
| **Customizable** | Yes | No (managed) |
| **Offline** | Yes | No |

### What's New

- **Skills-Based Architecture**: Capabilities are now defined as discoverable SKILL.md files
- **Plugin Marketplace**: Install community skills from the MyAIDev marketplace
- **Premium Cloud Skills**: Access advanced capabilities via authenticated API
- **Cross-Platform Support**: Works with Claude Code, Gemini CLI, and Codex CLI
- **Dual Command Naming**: Both legacy (`/myai-*`) and new skill-based names work
- **Installation Detection**: CLI commands to detect and upgrade installations

### Installation Options

#### NPX Installation (Recommended)

The traditional method continues to work:

```bash
# Full installation
npx myaidev-method@latest init --claude

# Workflow-specific
npx myaidev-method@latest content --claude
npx myaidev-method@latest dev --claude
npx myaidev-method@latest security --claude
```

#### Plugin Installation (Future)

When Claude Code plugin marketplace becomes available:

```bash
# Add marketplace
/plugin marketplace add myaione/myaidev-method

# Install full or specific packs
/plugin install myaidev-method@myaidev-marketplace
/plugin install myaidev-content@myaidev-marketplace
```

### Skills Overview

Skills are organized into packs for modular installation:

| Pack | Skills | Use Case |
|------|--------|----------|
| **content** | content-writer, content-verifier, visual-generator, wordpress-publisher, + publishers | Content creation and publishing |
| **development** | myaidev-workflow, myaidev-architect, myaidev-coder, myaidev-tester, myaidev-reviewer, myaidev-documenter, myaidev-analyze, myaidev-debug, myaidev-refactor, myaidev-performance, myaidev-migrate | SPARC methodology software development |
| **security** | security-tester, security-auditor | Penetration testing and auditing |
| **infrastructure** | coolify-deployer, openstack-manager | Deployment and cloud management |
| **skill-development** | myai-skill-builder, myai-skill-contributor | Skill creation, eval testing, and marketplace submission |

### SKILL.md Format

Each skill is defined with YAML frontmatter:

```markdown
---
name: content-writer
description: Professional SEO-optimized content creation
argument-hint: [topic] [--word-count=1500] [--tone=professional]
allowed-tools: [Read, Write, Edit, WebSearch, WebFetch, Task]
user-invocable: true
category: content
version: 1.0.0
platforms: [claude-code, gemini-cli, codex-cli]
---

# Content Writer Skill

[Skill instructions and capabilities...]
```

### Command Aliasing

Both naming conventions work:

| Legacy | Skill Name | Function |
|--------|------------|----------|
| `/content-writer` | `/content-writer` | Create content |
| `/configure` | `/configure` | Configuration |
| `/wordpress-publisher` | `/wordpress-publisher` | WordPress publishing |
| `/myai-openstack` | `/openstack-manager` | OpenStack management |

### Installation Management Commands

```bash
# Detect current installation type
npx myaidev-method detect

# Show plugin information
npx myaidev-method plugin-info

# Upgrade from legacy to plugin architecture
npx myaidev-method upgrade
```

### Backward Compatibility

All existing functionality is preserved:

- ✅ `npx myaidev-method init --claude` works exactly as before
- ✅ All `/myai-*` commands work with same names and behavior
- ✅ All skills in `.claude/skills/` work as before
- ✅ Existing user installations are not affected

### Resources

- **Marketplace**: https://dev.myai1.ai/plugins/myaidev-method
- **GitHub**: https://github.com/myaione/myaidev-method

## ⚙️ System Configuration

MyAIDev Method uses the `/configure` skill for interactive setup—**no manual `.env` file editing required**. This is the recommended way to configure all integrations.

### Available Configuration Commands

| Command | Purpose |
|---------|---------|
| `/configure wordpress` | Set up WordPress publishing integration |
| `/configure openstack` | Configure OpenStack VM management |
| `/configure defaults` | Set default content settings, visual generation API keys |
| `/configure skills` | List, validate, backup, and manage skills |
| `/content-rules-config` | Interactive brand voice and content rules setup |

### WordPress Configuration

```bash
/configure wordpress
```

**What it does:**
- Prompts for WordPress URL and validates connectivity
- Guides you through Application Password creation step-by-step
- Tests the connection before saving
- Automatically creates `.env` with secure permissions (600)
- Optionally configures SSH for advanced administration

### OpenStack Configuration

```bash
/configure openstack
```

**What it does:**
- Can import settings from an existing `openrc` file
- Or prompts for each credential manually
- Tests connection with `openstack token issue`
- Optionally sets up default cloud-init scripts
- Saves all credentials securely to `.env`

### Visual Generation & Defaults

```bash
/configure defaults
```

**What it does:**
- Configures visual generation API keys (Gemini, OpenAI, Replicate)
- Sets your preferred default visual service
- Configures default content settings (word count, tone, audience)

### Skill Management

```bash
# List all skills
/configure skills --list

# Check skill health
/configure skills --status

# Validate specific skill
/configure skills --validate content-writer

# Create backup before editing
/configure skills --backup content-writer

# Show skill capabilities
/configure skills --tools wordpress-publisher
```

### Manual Configuration (Alternative)

If you prefer manual setup, create a `.env` file in your project root:

```bash
# WordPress
WORDPRESS_URL=https://your-site.com
WORDPRESS_USERNAME=your-username
WORDPRESS_APP_PASSWORD=xxxx-xxxx-xxxx-xxxx

# Visual Generation (at least one required)
GEMINI_API_KEY=your-gemini-key
OPENAI_API_KEY=your-openai-key
REPLICATE_API_TOKEN=your-replicate-token
VISUAL_DEFAULT_SERVICE=gemini

# OpenStack (optional)
OS_AUTH_URL=https://cloud.example.com:5000/v3
OS_USERNAME=your-username
OS_PASSWORD=your-password
OS_PROJECT_ID=your-project-id
```

> ⚠️ **Security**: The `.env` file contains sensitive credentials. Never commit it to version control. The `/configure` commands automatically set secure file permissions (600).

## 🔄 Updating MyAIDev Method

The MyAIDev Method package receives regular updates with new features, bug fixes, and improved skills. Keep your installation up to date to access the latest capabilities.

### Checking for Updates

Your current installation version is stored in `.claude/.myaidev-version`. When new versions are published to npm, you can update using the dedicated update command.

### Running Updates

```bash
# Interactive update (recommended) - prompts for conflicts
npx myaidev-method@latest update --claude

# Force update - overwrites all files without prompting
npx myaidev-method@latest update --claude --force

# Preview changes - see what would be updated without making changes
npx myaidev-method@latest update --claude --dry-run

# Verbose output - show detailed progress
npx myaidev-method@latest update --claude --verbose
```

### What Gets Updated

The update command updates all MyAIDev Method components:

- ✅ **Skills** (`.claude/skills/`) - New skills and improvements
- ✅ **Executable scripts** (`.myaidev-method/scripts/`) - Bug fixes and new features
- ✅ **Utility libraries** (`.myaidev-method/lib/`) - Helper functions and utilities
- ✅ **Documentation files** (`USER_GUIDE.md`, `PUBLISHING_GUIDE.md`, etc.) - Updated guides
- ✅ **MCP configurations** (`src/mcp/`) - Server configurations and integrations
- ✅ **Dependencies** (`.myaidev-method/package.json`) - npm package updates

### Handling Customizations

If you've customized skills, the update process intelligently handles conflicts:

1. **Detection**: The update command detects which files you've modified
2. **Diff Display**: Shows you the differences between your version and the new version
3. **User Choice**: You decide what to do for each modified file:
   - **Keep current** - Skip this update, preserve your customizations
   - **Use new version** - Overwrite with the latest version
   - **View diff** - See detailed line-by-line differences
   - **Keep + backup** - Update to new version and save your current version as `.bak`

Example update session:

```
$ npx myaidev-method@latest update --claude

🔍 Detecting MyAIDev Method installation...

✓ Found claude installation
  Current version: 0.2.11
  Latest version: 0.2.12

⚠️  This will update your MyAIDev Method installation
   Modified files will require your confirmation

? Continue with update? Yes

💾 Creating backup...
✓ Backup created at: .myaidev-method-backup-2025-11-10T20-59-00

📦 Updating components...

Skills:
  ➕ myai-visual-generator/SKILL.md (new)
  ✓ content-writer/SKILL.md (unchanged)

📝 wordpress-publisher/SKILL.md has been modified
? What would you like to do?
  ❯ Keep current version (skip update)
    Use new version (overwrite)
    View diff
    Keep current + backup (.bak)

  ✅ payloadcms-publish.md (updated)

Scripts:
  ✅ payloadcms-publish.js (updated)
  ✅ coolify-deploy-app.js (updated)

═══════════════════════════════════════
  Update Summary
═══════════════════════════════════════
  ✅ Updated: 5 files
  ➕ Added: 2 new files
  ⏭️  Skipped: 1 files (kept current)
═══════════════════════════════════════

✅ Successfully updated to v0.2.12
   Backup available at: .myaidev-method-backup-2025-11-10T20-59-00
```

### Safety Features

**Automatic Backups**: Before making any changes, the update command creates a complete backup:
```
.myaidev-method-backup-{timestamp}/
├── .claude/
├── .myaidev-method/
└── *.md (documentation files)
```

**Dry Run Mode**: Preview all changes without modifying any files:
```bash
npx myaidev-method@latest update --claude --dry-run
```

**Version Tracking**: The update command checks your current version and only proceeds if an update is available.

### Best Practices

1. **Review Release Notes**: Check the [CHANGELOG.md](CHANGELOG.md) before updating
2. **Use Dry Run**: Preview changes with `--dry-run` before actual update
3. **Backup Custom Work**: If you have heavily customized skills, create manual backups
4. **Update Regularly**: Stay current with latest features and security fixes
5. **Test After Update**: Verify your workflows still function as expected

### Troubleshooting Updates

**Update command not found**:
```bash
# Ensure you're using the latest package
npx myaidev-method@latest --version
```

**No installation detected**:
```bash
# Verify installation exists
ls -la .claude

# Reinstall if needed
npx myaidev-method@latest init --claude
```

**Dependency installation fails**:
```bash
# Manually install dependencies
cd .myaidev-method
npm install
```

**Want to rollback an update**:
```bash
# Restore from backup
rm -rf .claude .myaidev-method *.md
cp -r .myaidev-method-backup-{timestamp}/* .
```

## 🏗️ Understanding the Structure

### Skills Directory (`skills/`)

Contains all skill definitions as SKILL.md files, organized by category:

**SPARC Development:**
- `skills/myaidev-workflow/SKILL.md` - Complete 5-phase SPARC workflow
- `skills/myaidev-architect/SKILL.md` - Architecture design phase
- `skills/myaidev-coder/SKILL.md` - Implementation phase
- `skills/myaidev-tester/SKILL.md` - Testing phase
- `skills/myaidev-reviewer/SKILL.md` - Code review phase
- `skills/myaidev-documenter/SKILL.md` - Documentation phase

**Content & Publishing:**
- `skills/content-writer/SKILL.md` - Content creation
- `skills/wordpress-publisher/SKILL.md` - WordPress publishing
- `skills/payloadcms-publisher/SKILL.md` - PayloadCMS publishing
- `skills/docusaurus-publisher/SKILL.md` - Docusaurus documentation
- `skills/mintlify-publisher/SKILL.md` - Mintlify documentation
- `skills/astro-publisher/SKILL.md` - Astro site publishing
- `skills/myai-visual-generator/SKILL.md` - Visual generation
- `skills/content-production-coordinator/SKILL.md` - Content coordination

**Infrastructure:**
- `skills/coolify-deployer/SKILL.md` - Coolify deployment automation
- `skills/openstack-manager/SKILL.md` - OpenStack management
- `skills/configure/SKILL.md` - Configuration management

### File Format

All skills use Markdown with YAML frontmatter:

```markdown
---
name: skill-name
description: Brief description
allowed-tools: [Read, Write, Edit, WebSearch, WebFetch, Task]
user-invocable: true
category: content
version: 1.0.0
platforms: [claude-code, gemini-cli, codex-cli]
---

# Skill prompt content goes here...
```

## 👤 User Pathways

The MyAIDev Method serves two primary user personas, each with distinct workflows and goals:

### Content Creator Pathway

**Who**: Writers, marketers, content strategists, and non-technical users creating and publishing content at scale.

**Goal**: Streamline content creation, optimization, and multi-platform publishing without needing development expertise.

#### Content Creation Pipeline

The MyAIDev Method provides a complete pipeline from idea to publication:

**1. Research & Planning**
```bash
# Generate content ideas and outlines
/content-writer "Create SEO-optimized blog post about React hooks best practices"
```

The content writer skill:
- Researches topics using web search
- Generates SEO-optimized outlines
- Creates comprehensive, well-structured content
- Includes meta descriptions, keywords, and formatting

**2. Content Creation**

The skill produces:
- SEO-optimized articles with proper headings (H1, H2, H3)
- Meta descriptions and keyword optimization
- Markdown-formatted content ready for publishing
- Proper internal/external linking structure

**3. Multi-Platform Publishing**

Publish to various platforms with a single command:

```bash
# WordPress publishing
/wordpress-publisher "react-hooks-guide.md" --status published

# PayloadCMS headless CMS
/payloadcms-publisher "react-hooks-guide.md" --status published --collection blog-posts

# Docusaurus documentation sites
/docusaurus-publisher "react-hooks-guide.md" --category tutorials

# Mintlify documentation
/mintlify-publisher "react-hooks-guide.md" --section guides

# Astro static sites
/astro-publisher "react-hooks-guide.md" --collection blog
```

**4. Batch Operations**

Create and publish content at scale:
```bash
# Create multiple articles on related topics
/content-writer "5 articles about React performance optimization techniques"

# Publish entire content series
for file in content/*.md; do
  /wordpress-publisher "$file" --status draft
done
```

#### Content Pipeline Setup

Set up your content creation pipeline with these configuration steps:

**Step 1: Configure Brand Voice & Content Rules (Recommended First)**

```bash
# Interactive wizard for brand voice, tone, SEO guidelines, and formatting
/content-rules-config
```

This creates a `content-rules.md` file that customizes all AI-generated content to match your brand. The wizard guides you through:
- Brand identity (company name, values, mission)
- Voice & tone (personality, communication style)
- Writing style (formality, sentence structure)
- SEO guidelines (keyword density, meta requirements)
- Formatting preferences (lists, headers, code blocks)
- Content boundaries (topics to emphasize or avoid)

> **Tip**: Set up content rules before creating your first content. This ensures consistent brand voice from day one.

**Step 2: Configure Publishing Platforms**

```bash
# Configure WordPress (recommended - no manual .env editing)
/configure wordpress

# Configure visual generation APIs (optional)
/configure defaults
```

**Or manually configure `.env`:**

**WordPress**:
```bash
WORDPRESS_URL=https://yoursite.com
WORDPRESS_USERNAME=your-username
WORDPRESS_APP_PASSWORD=xxxx-xxxx-xxxx-xxxx
```

**PayloadCMS**:
```bash
PAYLOADCMS_URL=https://cms.yoursite.com
PAYLOADCMS_EMAIL=your-email@example.com
PAYLOADCMS_PASSWORD=your-password
```

#### Content Creator Workflow Example

Complete workflow from setup to publication:

```bash
# 1. First-time setup: Configure brand voice (creates content-rules.md)
/content-rules-config

# 2. Configure publishing destination
/configure wordpress

# 3. Create content (automatically uses your content-rules.md)
/content-writer "Ultimate guide to TypeScript generics with practical examples"

# 4. Review generated markdown file (typescript-generics-guide.md)
#    Content will match your brand voice, SEO guidelines, and formatting preferences

# 5. Publish to WordPress as draft for review
/wordpress-publisher "typescript-generics-guide.md" --status draft

# 6. Review on WordPress, make edits if needed

# 7. Publish to additional platforms
/payloadcms-publisher "typescript-generics-guide.md" --status published
/docusaurus-publisher "typescript-generics-guide.md" --category advanced-topics
```

> **Note**: Steps 1-2 are one-time setup. For subsequent content, start at step 3.

#### Batch Content Coordination

For publishing multiple pieces of content at once, use the Content Production Coordinator—a powerful orchestration system that coordinates content verification, quality analysis, and multi-platform publishing.

```bash
# Process all content in a queue directory
/content-production-coordinator ./content-queue/
```

**Setting Up a Content Queue:**

1. Create a directory for your content queue:
   ```bash
   mkdir -p ./content-queue
   ```

2. Add content files using the required format:

**Content Queue File Format** (e.g., `./content-queue/my-article.md`):

```markdown
---
title: "Your Article Title"
content_type: article
target_platform: wordpress
status: pending
priority: normal
references:
  - "https://source1.com"
  - "https://source2.com"
goals:
  - "Primary goal for this content"
  - "Secondary goal"
---

## Proprietary Content

[Your unique insights, original analysis, and value-add content here.
This is the section that gets verified for uniqueness.]

## Supporting Content

[Additional context, examples, and supporting material]
```

**Required Fields:**
| Field | Description |
|-------|-------------|
| `title` | Article title (used for publishing) |
| **Proprietary Content section** | Your unique content to be verified |

**Optional Fields:**
| Field | Values | Default |
|-------|--------|---------|
| `content_type` | article, tutorial, guide, listicle | article |
| `target_platform` | wordpress, payloadcms, static, docusaurus, mintlify, astro | wordpress |
| `status` | pending, verified, published, failed | pending |
| `priority` | high, normal, low | normal |
| `references` | Array of source URLs | [] |
| `goals` | Array of publishing goals | [] |
| `publish_date` | ISO 8601 date for scheduled publishing | immediate |

3. Run the coordinator:
   ```bash
   /content-production-coordinator ./content-queue/
   ```

#### Coordinator Features

**Core Operations:**
```bash
# Verify only, no publishing
/content-production-coordinator ./content-queue/ --dry-run

# Skip confirmations (for automation)
/content-production-coordinator ./content-queue/ --force

# Detailed progress output
/content-production-coordinator ./content-queue/ --verbose

# Custom report directory
/content-production-coordinator ./content-queue/ --output-dir ./reports/

# Higher concurrency for large batches
/content-production-coordinator ./content-queue/ --concurrency 5
```

**Multi-Platform Publishing:**
```bash
# Publish to PayloadCMS instead of WordPress
/content-production-coordinator ./content-queue/ --platform payloadcms

# Generate static markdown files
/content-production-coordinator ./content-queue/ --platform static --output-dir ./published/

# Publish to Docusaurus documentation site
/content-production-coordinator ./docs-queue/ --platform docusaurus
```

Each content item can override the default platform using the `target_platform` front matter field.

**Content Rules Integration:**
```bash
# Use custom content rules file
/content-production-coordinator ./content-queue/ --content-rules ./brand/content-rules.md

# Content rules are auto-detected from standard locations
/content-production-coordinator ./content-queue/  # Finds ./content-rules.md automatically
```

The coordinator reads `content-rules.md` from the project root (alongside `brand-config.json`, `product-config.json`, `service-config.json`, and `content-themes.json`).

**CI/CD Integration with Webhooks:**
```bash
# Send notifications to CI/CD webhook
/content-production-coordinator ./content-queue/ --webhook-url https://ci.example.com/webhook

# Notify on all events including each published item
/content-production-coordinator ./content-queue/ \
  --webhook-url https://ci.example.com/webhook \
  --webhook-events start,complete,error,published

# Full CI/CD pipeline integration
/content-production-coordinator ./content-queue/ --force --webhook-url $CI_WEBHOOK_URL --analytics
```

**Available Webhook Events:**
- `start` - When workflow begins
- `complete` - When workflow finishes successfully
- `error` - When errors occur
- `published` - When each item is published

**Queue Management:**
```bash
# Add new content to queue without processing
/content-production-coordinator ./new-articles/ --add-to-queue

# View queue statistics
/content-production-coordinator --queue-stats

# Process items from queue
/content-production-coordinator --queue .content-queue.json

# Clear completed items from queue
/content-production-coordinator --clear-completed
```

**Analytics & Monitoring:**
```bash
# Enable detailed analytics (default)
/content-production-coordinator ./content-queue/ --analytics

# Full production run with all options
/content-production-coordinator ./content-queue/ \
  --verbose \
  --output-dir ./reports/ \
  --concurrency 3 \
  --content-rules ./brand/content-rules.md \
  --webhook-url https://ci.example.com/webhook \
  --analytics
```

When analytics are enabled, generates `analytics-YYYY-MM-DD-HH-MM-SS.md` with:
- Per-phase timing metrics
- Success/failure rates
- Average verification and publishing times
- Content quality score trends
- Error categorization

#### Scheduling & Automation

**Linux Crontab Integration:**

```bash
# Generate crontab entry with instructions
/content-production-coordinator --generate-crontab

# Run in cron-safe mode (for crontab)
/content-production-coordinator ./content-queue/ --cron --force

# With minimum 6-hour interval between runs
/content-production-coordinator ./content-queue/ --cron --min-interval 21600
```

**Example crontab entries:**
```bash
# Every 6 hours
0 */6 * * * cd /path/to/project && npx myaidev-method coordinate-content ./content-queue --cron --force >> /var/log/content-production-coordinator.log 2>&1

# Daily at 9 AM
0 9 * * * cd /path/to/project && npx myaidev-method coordinate-content ./content-queue --cron --force >> /var/log/content-production-coordinator.log 2>&1

# Weekdays at 9 AM and 5 PM
0 9,17 * * 1-5 cd /path/to/project && npx myaidev-method coordinate-content ./content-queue --cron --force >> /var/log/content-production-coordinator.log 2>&1
```

**WordPress Post Scheduling:**

Schedule posts for future publication using WordPress's native scheduling:

```bash
# Delay all posts by 24 hours
/content-production-coordinator ./content-queue/ --schedule-delay 24

# Spread posts 6 hours apart
/content-production-coordinator ./content-queue/ --spread-interval 6

# Combined: Start in 24 hours, then every 6 hours
/content-production-coordinator ./content-queue/ --schedule-delay 24 --spread-interval 6
```

You can also set specific publish dates in content front matter:
```yaml
---
title: "My Article"
publish_date: "2026-02-15T09:00:00Z"  # Schedule for specific date
---
```

**Combined Automation (Cron + WordPress Scheduling):**
```bash
# Run via cron, but schedule posts for optimal times
/content-production-coordinator ./content-queue/ \
  --cron \
  --force \
  --schedule-delay 24 \
  --spread-interval 6 \
  --webhook-url https://ci.example.com/content-published
```

#### Checkpoint/Resume

The coordinator automatically saves progress to `.content-production-coordinator-state.json`. If interrupted:
- Re-run the same command to resume from the last checkpoint
- Use `--fresh` to start over and ignore saved state
- Delete the state file manually to reset

#### Output Reports

The coordinator generates timestamped reports:

**Ready for Publishing Report** (`ready-for-publishing-YYYY-MM-DD-HH-MM-SS.md`):
```markdown
# Content Ready for Publishing
Generated: YYYY-MM-DD HH:MM:SS

## Summary
- Total Items: X
- Total Word Count: ~Y,000 words
- Average Redundancy Score: Low/Minimal

## Items

### 1. [Title]
- **Redundancy Score**: Low
- **Recommendation**: Proceed with publishing
- **Word Count**: ~1,200 words
- **Verifier Feedback**: [Brief feedback]
- **References**: [List of references]
- **Goals**: [Publishing goals]
```

**Needs Review Report** (`needs-review-YYYY-MM-DD-HH-MM-SS.md`):
```markdown
# Content Requiring Review
Generated: YYYY-MM-DD HH:MM:SS

## Summary
- Total Items: X
- Issues Found: Redundancy, AI-generated indicators, etc.

## Items Requiring Attention

### 1. [Title]
- **Redundancy Score**: Medium/High
- **Recommendation**: Needs review / Reject
- **Issue**: [Specific problem identified]
- **Verifier Feedback**: [Detailed feedback]
- **Suggested Actions**: [What to do next]
```

---

### Developer Pathway

**Who**: Software engineers, technical leads, and developers who value structured, specification-driven development.

**Goal**: Systematic software development using proven methodologies (SPARC, Spec-Driven Development, BMAD).

#### Why Developers Choose MyAIDev Method

- **SPARC Methodology**: Structured 5-phase development (Specification → Pseudocode → Architecture → Refinement → Completion)
- **Spec-Driven Development**: Requirements-first approach ensuring clear deliverables
- **BMAD Workflows**: Build, Measure, Analyze, Deploy cycles for iterative improvement
- **Git Integration**: Seamless version control with automated commits and PR creation
- **Quality Assurance**: Built-in testing, code review, and documentation skills

#### SPARC Development Workflow

The SPARC methodology provides systematic development with five phases:

**Full Workflow Execution**:
```bash
# Execute complete 5-phase SPARC workflow
/myaidev-workflow "Build user authentication with JWT and OAuth"
```

This runs:
1. **Specification**: Requirements analysis, user stories, system boundaries
2. **Pseudocode**: Algorithm design, logic planning, data flow
3. **Architecture**: System structure, APIs, database schema, component design
4. **Refinement**: Implementation with SOLID principles, error handling, testing
5. **Completion**: Documentation, deployment prep, production readiness

**Individual Phase Control**:
```bash
# Architecture phase
/myaidev-architect "Design microservices architecture for e-commerce platform"

# Implementation phase
/myaidev-coder "Implement user authentication service"

# Testing phase
/myaidev-tester "Create comprehensive test suite with 80%+ coverage"

# Code review phase
/myaidev-reviewer "Review authentication implementation for security best practices"

# Documentation phase
/myaidev-documenter "Generate API documentation and integration guides"
```

#### Spec-Driven Development

Start with requirements, not code:

```bash
# 1. Create detailed specification
/myaidev-architect "Design RESTful API for social media platform with posts, comments, likes"

# 2. Generate pseudocode and algorithms
/myaidev-workflow "Implement the social media API based on specification"

# 3. Implementation follows the spec
# Skills reference the specification throughout development
```

#### BMAD Workflow Integration

**Build → Measure → Analyze → Deploy** cycles:

```bash
# Build: Implement feature
/myaidev-coder "Add real-time notifications using WebSockets"

# Measure: Test and validate
/myaidev-tester "Create integration tests for WebSocket notifications"

# Analyze: Code review and quality checks
/myaidev-reviewer "Analyze WebSocket implementation for performance and security"

# Deploy: Prepare for production
/coolify-deployer "Deploy notification service to production"
```

#### Git & CI/CD Integration

MyAIDev Method integrates with your git workflow:

```bash
# Commit changes with AI-generated messages
/myai-git-commit "Implement WebSocket notifications"

# Create pull request
/myai-git-pr "Add real-time notification feature"

# Deploy to production
/coolify-deployer "notification-service"
```

#### Developer Workflow Example

Complete feature development:

```bash
# 1. Design phase - Architecture and specification
/myaidev-architect "Design comment system with threading, reactions, and moderation"

# 2. Implementation phase
/myaidev-coder "Implement comment API endpoints with validation"

# 3. Testing phase
/myaidev-tester "Create unit and integration tests for comment system"

# 4. Review phase
/myaidev-reviewer "Review comment system code for security and performance"

# 5. Documentation phase
/myaidev-documenter "Generate API documentation for comment endpoints"

# 6. Git workflow
/myai-git-commit "Add threaded comment system with reactions"
/myai-git-pr "Feature: Threaded comments with moderation"

# 7. Deployment
/coolify-deployer "comment-service"
```

#### Advanced Developer Workflows

**Multi-Skill Collaboration**:
```bash
# Architecture skill designs system
/myaidev-architect "Design event-driven microservices architecture"

# Multiple skills work in parallel
/myaidev-coder "Implement user service"
/myaidev-coder "Implement order service"
/myaidev-coder "Implement notification service"

# Testing skill validates integration
/myaidev-tester "Create end-to-end tests for order flow"

# Documentation skill generates guides
/myaidev-documenter "Generate microservices integration documentation"
```

---

## 🏗️ SPARC Development Workflow

The SPARC methodology provides a systematic approach to software development with 5 phases:

**S**pecification → **P**seudocode → **A**rchitecture → **R**efinement → **C**ompletion

### Complete SPARC Workflow

Run the entire 5-phase workflow:

```bash
/myaidev-workflow "Build user authentication with JWT and OAuth"
```

This executes all phases sequentially:
1. **Specification** - Requirements analysis and system boundaries
2. **Pseudocode** - Algorithm design and logic planning
3. **Architecture** - System structure, APIs, and data models
4. **Refinement** - Implementation with SOLID principles and testing
5. **Completion** - Documentation and deployment preparation

### Individual Phase Commands

For more control, run phases individually:

```bash
# Phase 1: Architecture Design
/myaidev-architect "Design microservices architecture for e-commerce platform"

# Phase 2: Implementation
/myaidev-coder "Implement user authentication service"

# Phase 3: Testing
/myaidev-tester "Create comprehensive test suite with 80%+ coverage"

# Phase 4: Code Review
/myaidev-reviewer "Review authentication implementation for security"

# Phase 5: Documentation
/myaidev-documenter "Generate API documentation and user guides"
```

### SPARC Quality Standards

All phases adhere to these standards:

- **SOLID Principles**: Single Responsibility, Open/Closed, Liskov Substitution, Interface Segregation, Dependency Inversion
- **Clean Code**: DRY (Don't Repeat Yourself), KISS (Keep It Simple), YAGNI (You Aren't Gonna Need It)
- **Security**: OWASP Top 10 compliance
- **Testing**: 80%+ critical path coverage, 60%+ overall coverage
- **Performance**: <200ms API responses, <50ms database queries

### SPARC Output Structure

All phases output to `.myaidev-method/sparc/` directory:

```
.myaidev-method/sparc/
├── architecture.md          # Phase 1: System design
├── pseudocode/             # Phase 2: Algorithm plans
├── code-output/            # Phase 4: Implementation
├── test-results/           # Phase 3: Test suites
├── review-report.md        # Phase 4: Quality analysis
└── documentation/          # Phase 5: API docs & guides
```

## 🔄 Git & CI/CD Workflows

Complete Git operations and deployment automation commands:

### Pull Request Workflow

Create professional pull requests with GitHub CLI integration:

```bash
# Create PR from current branch
/myai-git-pr "Add user authentication feature"

# The command will:
# - Analyze all commits since branch diverged
# - Generate comprehensive PR description
# - Create PR with gh CLI
# - Include testing checklist and deployment notes
```

**PR Description Template includes:**
- Summary of changes
- Type of change (feature/fix/breaking)
- Testing checklist
- Code review checklist
- Related issues
- Screenshots (if applicable)
- Deployment notes

### Branch Synchronization

Keep your branches in sync across the development workflow:

```bash
# Sync all branches
/myai-git-sync

# Features:
# - Status overview of all branches
# - Sync dev → staging → production
# - Conflict resolution helper
# - Branch cleanup (merged branches)
```

### Release Management

Automated semantic versioning and changelog generation:

```bash
# Create new release
/myai-git-release

# Automatically:
# - Determines version bump (major/minor/patch)
# - Generates changelog from conventional commits
# - Creates GitHub release
# - Uploads assets with checksums
# - Publishes to npm (if configured)
```

**Version Bump Detection:**
- `BREAKING CHANGE` → major version (1.0.0 → 2.0.0)
- `feat:` commits → minor version (1.0.0 → 1.1.0)
- `fix:` commits → patch version (1.0.0 → 1.0.1)

### Emergency Hotfix Procedures

Fast-track critical bug fixes to production:

```bash
# Emergency hotfix workflow
/myai-git-hotfix

# Includes:
# - Emergency assessment & incident tracking
# - Multiple fix application methods
# - Fast-track testing
# - Emergency approval gate
# - Post-mortem report generation
```

### Deployment Commands

Deploy to different environments with appropriate safety levels:

```bash
# Development deployment (fast iteration)
/myai-deploy-dev

# Staging deployment (pre-production testing)
/myai-deploy-staging

# Production deployment (multiple strategies)
/myai-deploy-prod
```

**Development Deployment:**
- Fast deployment with hot-reload support
- Docker, Docker Compose, or rsync methods
- Auto-deploy via GitHub Actions

**Staging Deployment:**
- Pre-flight checks and tests
- Coolify or Docker deployment
- Health checks and smoke tests
- Rollback procedures

**Production Deployment:**
- Strict approval gates and backup points
- Multiple strategies:
  - **Blue-Green**: Zero-downtime deployment
  - **Canary**: Gradual rollout (10% → 50% → 100%)
  - **Rolling**: Sequential instance updates
- Comprehensive monitoring and rollback

### Deployment Methods

All deployment commands support:

**Coolify API:**
```bash
# Configure Coolify credentials
COOLIFY_URL=https://coolify.your-server.com
COOLIFY_API_TOKEN=your_api_token
COOLIFY_STAGING_APP_ID=your_app_id
```

**Docker:**
```bash
# Docker deployment
DOCKER_REGISTRY=registry.your-domain.com
STAGING_IMAGE_TAG=staging
```

**Docker Compose:**
```bash
# Deploy with compose
ssh staging-server 'cd /opt/app && docker-compose up -d'
```

### CI/CD Notifications

Deployment commands support notifications:

```bash
# Slack notifications
SLACK_WEBHOOK_URL=https://hooks.slack.com/services/YOUR/WEBHOOK

# Discord notifications
DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/YOUR/WEBHOOK
```

## 🌐 Multi-Platform Support

MyAIDev Method supports three AI CLI platforms with feature parity:

### Claude Code (Default)

Uses `.claude/` directory structure:

```bash
# Initialize for Claude Code
npx myaidev-method@latest init --claude

# Structure
.claude/
├── skills/            # SKILL.md files with YAML frontmatter
│   └── */SKILL.md     # Uses $ARGUMENTS placeholder
├── mcp/
└── CLAUDE.md
```

### Gemini CLI

Uses `.gemini/` directory with TOML format:

```bash
# Initialize for Gemini CLI
npx myaidev-method@latest init --gemini

# Structure
.gemini/
├── commands/           # TOML format
│   └── myai-*.toml    # Uses {{args}} placeholder
└── README.md
```

**Gemini Command Format:**
```toml
prompt = """
You are a specialist in...

Task: {{args}}

## Workflow
...
"""
```

### OpenCode (Codex)

Uses `.opencode/` directory with simple Markdown:

```bash
# Initialize for OpenCode
npx myaidev-method@latest init --opencode

# Structure
.opencode/
├── commands/           # Simple Markdown (no frontmatter)
│   └── myai-*.md      # Uses $ARGUMENTS placeholder
└── README.md
```

**OpenCode Command Format:**
```markdown
# Command Description

You are a specialist in...

Task: $ARGUMENTS

## Workflow
...
```

### Platform Feature Parity

All skills are available on all platforms:
- ✅ Claude Code: Full skills with SKILL.md format
- ✅ Gemini CLI: Skills in TOML format
- ✅ OpenCode: Skills in simple Markdown format

### Switching Platforms

You can initialize for multiple platforms in the same project:

```bash
# Initialize all platforms
npx myaidev-method@latest init --claude
npx myaidev-method@latest init --gemini
npx myaidev-method@latest init --opencode

# Result: All three directories exist
.claude/
.gemini/
.opencode/
```

## 🎨 Customizing Skills

### Method 1: Direct File Editing

**For immediate customization in your current project:**

```bash
# Edit the content writer skill
nano .claude/skills/content-writer/SKILL.md
# or
code .claude/skills/content-writer/SKILL.md

# Restart Claude Code to load changes
```

### Method 2: Replace with Custom File

**If you have a complete custom prompt file:**

```bash
# Always backup first
cp .claude/skills/content-writer/SKILL.md .claude/skills/content-writer/SKILL.md.backup

# Replace with your custom file
cp your-custom-prompt.md .claude/skills/content-writer/SKILL.md

# Restart Claude Code
```

### Method 3: Using Configuration Commands

**Safe editing with built-in tools:**

```bash
# Create backup before editing
/configure skills --backup content-writer

# Edit the skill
/configure skills --edit content-writer

# Validate changes
/configure skills --validate content-writer
```

### Method 4: Update Source for All Future Installations

**To modify the default prompt for new installations:**

1. **Update the source skill**:
   ```bash
   # Edit the skill file
   nano skills/content-writer/SKILL.md
   ```

2. **Publish update**:
   ```bash
   # Bump version
   npm version patch  # 0.0.1 → 0.0.2

   # Publish
   npm publish
   ```

## ✏️ Skill Customization Examples

### Example 1: Technical Documentation Writer

```markdown
---
name: content-writer
description: Technical documentation specialist for developer content
tools: Read, Write, Edit, WebSearch, WebFetch, Task, Grep, Glob
---

You are a technical documentation writer specializing in developer-focused content.

## Writing Style
- Use clear, concise technical language
- Include code examples where appropriate
- Structure content for easy scanning by developers
- Focus on practical implementation details

## Custom Requirements
- Always include code snippets when relevant
- Add "Prerequisites" section for technical tutorials
- Include "Troubleshooting" sections
- Reference official documentation sources

## Output Format
Create content with:
- Step-by-step instructions
- Code examples with syntax highlighting
- API reference links
- Common pitfalls and solutions
```

### Example 2: Marketing Content Writer

```markdown
---
name: content-writer
description: Marketing content specialist focused on conversion
tools: Read, Write, Edit, WebSearch, WebFetch, Task
---

You are a marketing content writer specializing in conversion-focused copy.

## Brand Voice
- Conversational and approachable
- Benefits-focused messaging
- Strong calls-to-action
- Customer pain point awareness

## Content Types
- Landing page copy
- Email marketing content
- Social media posts
- Product descriptions

## SEO Focus
- High-converting keywords
- Local SEO optimization
- Featured snippet targeting
- User intent matching
```

### Example 3: Industry-Specific Writer

```markdown
---
name: content-writer
description: Healthcare content writer with medical expertise
tools: Read, Write, Edit, WebSearch, WebFetch, Task
---

You are a healthcare content writer with deep medical knowledge.

## Compliance Requirements
- HIPAA compliance awareness
- Medical accuracy verification
- Proper medical terminology
- Citation of peer-reviewed sources

## Content Guidelines
- Patient-friendly language
- Evidence-based information
- Professional medical tone
- Accessibility considerations
```

## ⚙️ Managing Skills

### Viewing Available Skills

```bash
# List all skills
/configure skills --list

# Show skill details
ls -la .claude/skills/

# View specific skill
cat .claude/skills/content-writer/SKILL.md
```

### Customizing Content Generation (Recommended)

**Best Practice:** Use `content-rules.md` for content customization instead of editing skills directly.

```bash
# Use interactive setup (recommended)
/content-rules-config
# Or copy the example template
cp content-rules-example.md content-rules.md
```

**Why use content-rules.md?**
- ✅ No skill modification required
- ✅ Preserves updates when upgrading MyAIDev Method
- ✅ Easy to version control
- ✅ Project-specific customization
- ✅ Works even if file doesn't exist

> 📖 **See [Content Rules & Brand Voice](#-content-rules--brand-voice)** for comprehensive documentation on setting up brand voice, writing style, SEO guidelines, and more.

### Customizing Skills (Advanced)

For deeper customization, edit skill files directly:

```bash
# Edit content writer skill
nano .claude/skills/content-writer/SKILL.md
```

**Example skill customization:**

```markdown
---
name: content-writer
description: Create technical blog posts with code examples
allowed-tools: [Read, Write, Edit, WebSearch, WebFetch, Task, Grep, Glob]
user-invocable: true
category: content
version: 1.0.0
---

Create technical blog posts based on the topic: $ARGUMENTS

## Requirements
- Include practical code examples
- Add "Prerequisites" section
- Provide GitHub repository links
- Include troubleshooting section

## Output Format
Save as markdown with:
- Technical accuracy
- Step-by-step tutorials
- Copy-paste ready code
- Real-world applications
```

### Creating New Skills

1. **Create new skill directory and file**:
   ```bash
   mkdir -p .claude/skills/code-reviewer
   nano .claude/skills/code-reviewer/SKILL.md
   ```

2. **Add skill definition**:
   ```markdown
   ---
   name: code-reviewer
   description: Professional code review and analysis
   allowed-tools: [Read, Write, Edit, Grep, Glob, Task]
   user-invocable: true
   category: development
   version: 1.0.0
   ---

   Review the code specified in $ARGUMENTS and provide:
   - Security analysis
   - Performance recommendations
   - Best practice suggestions
   - Refactoring opportunities
   ```

3. **Restart Claude Code** to load the new skill

## 🔌 WordPress Integration

### Initial Setup

**Option 1: Interactive Setup (Recommended)**

Use the interactive configuration command—no manual `.env` editing required:

```bash
/configure wordpress
```

This guided skill will:
1. Prompt for your WordPress site URL and validate connectivity
2. Collect your WordPress username
3. Walk you through creating an Application Password with step-by-step instructions
4. Test the connection and verify everything works
5. Automatically save credentials to `.env` with secure permissions (600)
6. Optionally set up SSH for advanced administration features

**Option 2: Manual `.env` Setup**

If you prefer manual configuration:
1. Create `.env` file in your project root
2. Add your WordPress credentials:
   ```bash
   WORDPRESS_URL=https://your-site.com
   WORDPRESS_USERNAME=your-username
   WORDPRESS_APP_PASSWORD=your-app-password
   ```

### Creating Application Password

1. Go to WordPress Admin → Users → Your Profile
2. Find "Application Passwords" section
3. Enter name (e.g., "MyAIDev CLI") and click "Add New"
4. Copy the generated password
   - Copy the generated password

### WordPress Skills

```bash
# Test connection
/wordpress-publisher health-check

# Security operations
/wordpress-publisher security-scan
/wordpress-publisher malware-check
/wordpress-publisher user-audit

# Performance optimization
/wordpress-publisher speed-test --detailed
/wordpress-publisher database-optimize
/wordpress-publisher cache-setup

# Content management
/wordpress-publisher "article.md" --status draft
/content-writer "Blog Post Title" --publish_to_wordpress true
```

### Publishing Workflow

**Important**: WordPress publishing works through Claude Code skills, not terminal commands.

#### To Publish Content:

1. **Inside Claude Code** (not terminal):
   ```bash
   /wordpress-publisher "your-article.md" --status draft
   ```

2. **The command will**:
   - Read your markdown file
   - Extract frontmatter (title, meta_description, tags, etc.)
   - Connect to WordPress REST API
   - Create/update the post
   - Return post ID and URLs

#### Common Publishing Options:

```bash
# Publish as draft (default)
/wordpress-publisher "article.md"

# Publish immediately
/wordpress-publisher "article.md" --status publish

# Schedule for review
/wordpress-publisher "article.md" --status pending
```

#### Content Format Expected:

Your markdown files should have frontmatter:

```markdown
---
title: "Your Article Title"
meta_description: "SEO description for the post"
slug: "your-article-slug"
tags: ["tag1", "tag2"]
category: "Blog"
---

# Your Article Content

Content goes here...
```

### WordPress Configuration Options

```bash
# Configure WordPress settings
/configure wordpress

# Set default publishing options
/configure defaults
```

## 🎨 Visual Generation

MyAIDev Method includes AI-powered visual generation capabilities for creating images and videos to accompany your content.

### Available Services

| Service | Provider | Best For | API Key Required |
|---------|----------|----------|------------------|
| **Gemini Nano Banana** | Google | General images, diagrams, infographics | `GEMINI_API_KEY` |
| **GPT Image 1.5** | OpenAI | Realistic images, text rendering | `OPENAI_API_KEY` |
| **FLUX 2 Pro** | Replicate | Artistic images, creative styles | `REPLICATE_API_TOKEN` |
| **Veo 3** | Google | Video generation | `GEMINI_API_KEY` |

### Model Strengths & Use Cases

**Gemini Nano Banana (Google)**
- ✅ Excellent text rendering in images
- ✅ Great for infographics and data visualizations
- ✅ Good balance of quality and speed
- ✅ Cost-effective for high volume
- Best for: Technical diagrams, infographics, educational content

**GPT Image 1.5 (OpenAI)**
- ✅ Excellent text rendering accuracy
- ✅ High-quality realistic images
- ✅ Strong prompt following
- ✅ Good for complex scenes with text
- Best for: Marketing materials, product visuals, detailed illustrations

**FLUX 2 Pro (Replicate)**
- ✅ Exceptional artistic quality
- ✅ Unique creative styles
- ✅ Great for abstract and artistic imagery
- ❌ Less reliable for text in images
- Best for: Creative content, artistic blog headers, brand imagery

**Veo 3 (Google)**
- ✅ Video generation capability
- ✅ Good for short promotional clips
- Best for: Social media videos, product demos, animated content

### Service Selection

The visual generation system automatically selects which service to use based on:

1. **Available API Keys**: Only services with valid API keys are considered
2. **User Preference**: Your `VISUAL_DEFAULT_SERVICE` setting takes priority
3. **Fallback**: Uses the first available service if no preference is set

### Configuration

**Option 1: Interactive Setup (Recommended)**

Use the configure command for guided setup:

```bash
/configure defaults
```

This will prompt you to configure:
- Visual generation API keys
- Default visual service preference
- Output directory settings

**Option 2: Manual `.env` Configuration**

Add API keys directly to your `.env` file:

```bash
# Required: At least one of these
GEMINI_API_KEY=your-gemini-api-key
OPENAI_API_KEY=your-openai-api-key
REPLICATE_API_TOKEN=your-replicate-token

# Optional: Set your preferred default service
VISUAL_DEFAULT_SERVICE=gemini  # Options: gemini, gpt-image-1.5, flux

# Optional: Custom output directory (default: ./generated-visuals)
VISUAL_OUTPUT_DIR=./my-custom-output-path
```

### Usage Examples

```bash
# Generate image using default/preferred service
/content-writer "Blog post about Docker" --generate_visual true

# Generate specific visual type
node .myaidev-method/scripts/generate-visual-cli.js --type infographic-data "Cloud Cost Comparison"

# Generate with specific service
node .myaidev-method/scripts/generate-visual-cli.js --service gpt-image-1.5 "Product feature diagram"

# Generate video (uses Veo 3)
node .myaidev-method/scripts/generate-visual-cli.js --type video "Product demo animation"
```

### Visual Types

| Type | Description | Recommended Service |
|------|-------------|---------------------|
| `hero` | Blog post header images | Gemini or GPT Image 1.5 |
| `infographic-data` | Data visualization | Gemini or GPT Image 1.5 |
| `infographic-comparison` | Comparison charts | Gemini or GPT Image 1.5 |
| `diagram` | Technical diagrams | Gemini |
| `product` | Product imagery | GPT Image 1.5 |
| `video` | Short video clips | Veo 3 |

### Troubleshooting Visual Generation

**No services available**:
```bash
# Check your API keys are set
cat .env | grep -E "(GEMINI|OPENAI|REPLICATE)"

# Test a specific service
node .myaidev-method/scripts/generate-visual-cli.js --service gemini "Test image"
```

**Service selection not working**:
```bash
# Set explicit default service
echo "VISUAL_DEFAULT_SERVICE=gemini" >> .env
```

## 📝 Content Rules & Brand Voice

The `content-rules.md` file is a powerful customization system that controls how AI-generated content matches your brand voice, style, and requirements—without modifying skill files.

### Why Content Rules Matter

Content rules provide a **non-destructive** way to customize all content generation:

| Benefit | Description |
|---------|-------------|
| **Preserves Updates** | Customize without editing skills—your rules survive package updates |
| **Brand Consistency** | Define voice, tone, and style once, apply everywhere |
| **Project-Specific** | Each project can have its own content rules |
| **Easy to Share** | Version control your brand guidelines with your project |
| **Fallback Safe** | Works even if the file doesn't exist (uses sensible defaults) |

### Setting Up Content Rules

**Option 1: Interactive Setup (Recommended)**

Use the content rules setup command for guided configuration:

```bash
/content-rules-config
```

This interactive wizard will guide you through:
1. **Brand Identity**: Company name, values, mission
2. **Voice & Tone**: Personality, communication style
3. **Writing Style**: Formality, sentence structure, vocabulary
4. **SEO Guidelines**: Keyword density, meta requirements
5. **Formatting**: Structure preferences, visual elements
6. **Audience**: Target demographics and expertise level

**Option 2: Copy Template**

```bash
# Copy the example template
cp content-rules-example.md content-rules.md

# Edit with your preferences
nano content-rules.md
```

### What You Can Customize

**1. Brand Voice**
```markdown
## Brand Voice
- **Personality**: Professional yet approachable
- **Values**: Innovation, reliability, simplicity
- **Tone**: Confident, helpful, forward-thinking
- **Language Style**: Clear, jargon-free unless technical audience
```

**2. Writing Style**
```markdown
## Writing Style
- **Formality**: Semi-formal (conversational but professional)
- **Person**: Second person ("you") for tutorials, first plural ("we") for company
- **Sentence Length**: Varied, average 15-20 words
- **Paragraph Length**: Maximum 3-4 sentences
- **Active Voice**: Preferred over passive
```

**3. SEO Requirements**
```markdown
## SEO Guidelines
- **Keyword Density**: 1-2% of total word count
- **Meta Description**: 150-160 characters, include primary keyword
- **Headers**: Include keywords in H1 and at least one H2
- **Internal Links**: Minimum 2-3 per 1000 words
- **External Links**: 1-2 authoritative sources per article
```

**4. Formatting Preferences**
```markdown
## Formatting Rules
- **Lists**: Use bullet points for features, numbered for steps
- **Code Blocks**: Always include language identifier
- **Images**: Include alt text and captions
- **Callouts**: Use blockquotes for important notes
- **Tables**: Use for comparisons and data presentation
```

**5. Content Structure**
```markdown
## Structure Guidelines
- **Introduction**: Hook + context + article overview (150-200 words)
- **Body**: Clear sections with descriptive headers
- **Conclusion**: Summary + call-to-action
- **FAQ Section**: Include for articles over 1500 words
```

**6. Topics & Restrictions**
```markdown
## Content Boundaries
### Topics to Emphasize
- Product benefits and use cases
- Industry best practices
- Customer success stories

### Topics to Avoid
- Competitor comparisons (unless specifically requested)
- Speculative pricing
- Unverified claims
```

### Content Rules in Action

When you run any content generation command, the system:

1. **Checks for `content-rules.md`** in your project root
2. **Parses your customizations** and applies them to generation
3. **Falls back to defaults** for any unspecified settings

**Example with content rules**:
```bash
# With content-rules.md specifying technical voice
/content-writer "Docker Container Best Practices"

# Output will follow your defined:
# - Brand voice (e.g., professional, technically accurate)
# - Structure (e.g., code examples required)
# - SEO guidelines (e.g., specific keyword density)
# - Formatting (e.g., numbered steps for procedures)
```

### Example content-rules.md

```markdown
# Content Generation Rules

## Brand Identity
- **Company**: TechStartup Inc.
- **Mission**: Simplifying cloud infrastructure for developers
- **Values**: Transparency, developer experience, reliability

## Voice & Tone
- Professional yet friendly
- Technical but accessible
- Confident without being arrogant
- Helpful and educational

## Writing Style
- Use "you" when addressing the reader
- Keep sentences concise (max 25 words)
- Explain jargon on first use
- Use analogies for complex concepts

## SEO Guidelines
- Primary keyword in title and first 100 words
- Include 3-5 related secondary keywords
- Meta description: 155 characters max
- Add FAQ section for articles 1500+ words

## Formatting
- Start with a compelling hook
- Use headers every 300-400 words
- Include code examples for technical topics
- End with clear call-to-action

## Required Elements
- Author attribution
- Last updated date
- Related articles section
- Share buttons callout

## Restrictions
- No competitor mentions by name
- No pricing information in blog posts
- No unverified performance claims
```

### Best Practices for Content Rules

1. **Start with the template**: Use `/myai-content-rules-config` to generate a starting point
2. **Iterate gradually**: Start with basic rules, refine based on output
3. **Be specific**: Vague rules produce inconsistent results
4. **Include examples**: Show what good vs. bad looks like
5. **Version control**: Track changes to your content rules over time
6. **Team alignment**: Share content rules across your team for consistency

## 💻 SSH Configuration

### Setup Options

#### Option 1: Use Existing SSH Keys (Recommended)

If you already have SSH configured:

```bash
# Test existing SSH
ssh user@your-server

# Use in WordPress admin (automatic)
/wordpress-publisher security-scan
```

#### Option 2: Specify SSH Details

```bash
# Add to .env file
SSH_HOST=your-server-ip
SSH_USERNAME=your-ssh-username
SSH_KEY_PATH=/path/to/private/key
WORDPRESS_PATH=/var/www/html
```

#### Option 3: SSH Config File

Configure in `~/.ssh/config`:

```
Host wordpress-server
    HostName your-server-ip
    User your-username
    IdentityFile ~/.ssh/your-key
    Port 22
```

Then set: `SSH_HOST=wordpress-server`

### SSH-Enabled Operations

When SSH is available:

```bash
# Server-level security
/wordpress-publisher file-permissions
/wordpress-publisher malware-check

# Performance monitoring
/wordpress-publisher resource-monitor
/wordpress-publisher error-analysis

# Backup operations
/wordpress-publisher backup-create
/wordpress-publisher backup-verify
```

## 🛠️ Skill Management

### Using Configuration Commands

```bash
# List all skills
/configure skills --list

# Check skill status
/configure skills --status

# Validate specific skill
/configure skills --validate content-writer

# Create backup
/configure skills --backup wordpress-publisher

# Edit skill safely
/configure skills --edit content-writer

# Restore from backup
/configure skills --restore content-writer

# Show skill tools
/configure skills --tools wordpress-publisher
```

### Manual Skill Management

```bash
# View skill details
cat .claude/skills/content-writer/SKILL.md

# List all skills
ls -la .claude/skills/

# Check modification dates
ls -lt .claude/skills/

# Create manual backup
cp .claude/skills/content-writer/SKILL.md backups/content-writer-$(date +%Y%m%d).md
```

### Skill Validation

Before using modified skills:

1. **Check YAML syntax**:
   ```bash
   head -10 .claude/skills/content-writer/SKILL.md
   ```

2. **Validate required fields**:
   - `name`: Skill identifier
   - `description`: Brief description
   - `allowed-tools`: Available tools list

3. **Test functionality**:
   ```bash
   /configure skills --validate content-writer
   ```

## 🔍 Troubleshooting

### Common Issues

#### Skills Not Appearing

**Problem**: Custom skills don't show in `/` menu.

**Solutions**:
```bash
# Check file location
ls .claude/skills/

# Verify YAML syntax
head -5 .claude/skills/content-writer/SKILL.md

# Check file permissions
chmod 644 .claude/skills/*/SKILL.md

# Restart Claude Code
```

#### WordPress Connection Issues

**Problem**: Cannot connect to WordPress.

**Solutions**:
```bash
# Test WordPress API manually
curl -u "username:app-password" "https://your-site.com/wp-json/wp/v2/users/me"

# Check environment variables
cat .env

# Verify WordPress settings
/configure wordpress
```

#### SSH Authentication Problems

**Problem**: SSH operations fail.

**Solutions**:
```bash
# Test SSH manually
ssh user@your-server

# Check SSH configuration
cat ~/.ssh/config

# Verify key permissions
chmod 600 ~/.ssh/id_rsa
```

#### Skill Not Working

**Problem**: Skill behavior doesn't match expectations.

**Solutions**:
```bash
# Check skill file
cat .claude/skills/content-writer/SKILL.md

# Validate YAML frontmatter
/configure skills --validate content-writer

# Restart Claude Code
```

### Debug Mode

Enable detailed logging:

```bash
# Add to .env file
DEBUG=true
VERBOSE_LOGGING=true
```

### Log Files

Check logs for errors:

```bash
# View recent errors
tail -f ~/.claude/logs/errors.log

# Check command execution
tail -f ~/.claude/logs/commands.log
```

## 🚀 Advanced Usage

### Creating Custom Skill Workflows

**Multi-step content creation:**

```bash
# 1. Research and outline
/content-writer "Topic Research" --research_only true

# 2. Create content
/content-writer "Full Article" --outline_from research.md

# 3. WordPress optimization
/wordpress-publisher seo-analyze --content article.md

# 4. Publish
/wordpress-publisher article.md --status publish
```

### 📝 Complete Content Creation Pipeline Examples

#### Example 1: Technical Blog Post Pipeline

**Full workflow from research to multi-platform publishing:**

```bash
# Step 1: Research and planning
/content-writer "Complete Guide to Docker Containerization" --research_phase true
# Output: research-docker-guide.md with sources, outline, and key points

# Step 2: Create comprehensive content
/content-writer "Docker Containerization Guide" --technical_depth advanced --include_code_examples true
# Output: docker-guide.md with full article, code snippets, and examples

# Step 3: Platform-specific optimization
/content-writer "Optimize for platforms" --source docker-guide.md --platforms "wordpress,docusaurus,medium"
# Output: 
# - docker-guide-wordpress.md (SEO optimized, WP formatting)
# - docker-guide-docusaurus.md (technical docs format)
# - docker-guide-medium.md (Medium-friendly formatting)

# Step 4: Multi-platform publishing
/wordpress-publisher "docker-guide-wordpress.md" --status publish --category "Tutorials"
/docusaurus-publisher "docker-guide-docusaurus.md" --section "guides" --sidebar_position 3
/myai-medium-publish "docker-guide-medium.md" --tags "docker,devops,containers"
```

#### Example 2: Product Launch Content Campaign

**Coordinated content across multiple channels:**

```bash
# Step 1: Campaign planning
/content-writer "Product Launch Campaign: AI Code Assistant" --campaign_planning true
# Output: campaign-plan.md with content calendar and platform strategy

# Step 2: Create core content pieces
/content-writer "AI Code Assistant Features" --content_type "feature_overview" --target_audience "developers"
/content-writer "Getting Started Guide" --content_type "tutorial" --difficulty "beginner"
/content-writer "Advanced Use Cases" --content_type "case_studies" --include_examples true

# Step 3: Platform-specific adaptations
# Landing page content
/content-writer "Landing Page Copy" --source "feature-overview.md" --conversion_focused true --cta "Start Free Trial"

# Documentation site
/docusaurus-publisher "getting-started.md" --section "quickstart" --add_navigation true
/docusaurus-publisher "advanced-use-cases.md" --section "examples" --add_code_samples true

# Blog posts
/wordpress-publisher "feature-overview.md" --status publish --category "Product Updates"
/astro-publisher "getting-started.md" --collection "tutorials" --featured true

# Social media content
/content-writer "Social Media Posts" --source "feature-overview.md" --platforms "twitter,linkedin" --post_count 5
```

#### Example 3: Educational Content Series

**Multi-part series across documentation platforms:**

```bash
# Step 1: Series planning
/content-writer "Web Development Fundamentals Series" --series_planning true --parts 10
# Output: series-plan.md with episode breakdown and learning objectives

# Step 2: Create individual parts
for i in {1..10}; do
  /content-writer "Web Dev Part $i" --series "fundamentals" --part_number $i --previous_context "series-plan.md"
done

# Step 3: Multi-platform publishing
# Documentation sites
/docusaurus-publisher "web-dev-part-*.md" --collection "tutorial-series" --auto_navigation true
/mintlify-publisher "web-dev-part-*.md" --group "fundamentals" --sequential_order true

# Blog platforms
for file in web-dev-part-*.md; do
  /wordpress-publisher "$file" --status publish --series "Web Dev Fundamentals"
  /astro-publisher "$file" --collection "education" --tags "webdev,tutorial"
done

# Create series index
/content-writer "Series Index Page" --series_summary "fundamentals" --include_progress_tracker true
/docusaurus-publisher "series-index.md" --as_landing_page true
```

#### Example 4: API Documentation Pipeline

**Technical documentation with code examples:**

```bash
# Step 1: API analysis and planning
/myaidev-documenter "Analyze REST API" --source "api-spec.yaml" --generate_examples true
# Output: api-analysis.md with endpoints, parameters, and usage patterns

# Step 2: Create comprehensive documentation
/content-writer "REST API Documentation" --technical_writing true --include_curl_examples true --source "api-analysis.md"
# Output: api-docs.md with detailed endpoint documentation

# Step 3: Platform-specific formatting
/content-writer "Format for platforms" --source "api-docs.md" --platforms "mintlify,docusaurus,postman"
# Output:
# - api-docs-mintlify.md (Mintlify-optimized with interactive examples)
# - api-docs-docusaurus.md (Docusaurus format with sidebar navigation)
# - api-collection.json (Postman collection for testing)

# Step 4: Multi-platform publishing
/mintlify-publisher "api-docs-mintlify.md" --section "api-reference" --interactive_examples true
/docusaurus-publisher "api-docs-docusaurus.md" --section "api" --add_try_it_buttons true

# Step 5: Generate SDK documentation
/myaidev-documenter "Generate SDK Examples" --languages "javascript,python,curl" --source "api-docs.md"
/docusaurus-publisher "sdk-examples.md" --section "sdks" --code_tabs true
```

#### Example 5: Content Localization Pipeline

**Multi-language content creation and publishing:**

```bash
# Step 1: Create master content
/content-writer "Product Features Guide" --master_content true --localization_ready true
# Output: features-guide-en.md (English master version)

# Step 2: Localize content
/content-writer "Localize content" --source "features-guide-en.md" --target_languages "es,fr,de,ja"
# Output: features-guide-es.md, features-guide-fr.md, etc.

# Step 3: Platform-specific publishing by language
# WordPress multisite
/wordpress-publisher "features-guide-en.md" --site "main" --language "en"
/wordpress-publisher "features-guide-es.md" --site "es" --language "es"
/wordpress-publisher "features-guide-fr.md" --site "fr" --language "fr"

# Docusaurus i18n
/docusaurus-publisher "features-guide-en.md" --locale "en" --section "guides"
/docusaurus-publisher "features-guide-es.md" --locale "es" --section "guides"
/docusaurus-publisher "features-guide-fr.md" --locale "fr" --section "guides"

# Create language switcher
/content-writer "Language Navigation" --available_languages "en,es,fr,de,ja" --current_page "features-guide"
```

### 🔄 Content Workflow Automation

#### Automated Content Calendar

```bash
# Weekly content automation
/content-writer "Weekly Tech News Roundup" --auto_schedule "every monday" --sources "hackernews,techcrunch"
/wordpress-publisher "weekly-roundup.md" --schedule "monday 9am" --category "News"

# Monthly feature highlights
/content-writer "Monthly Product Updates" --template "product-updates.md" --auto_generate "monthly"
/docusaurus-publisher "product-updates.md" --section "changelog" --auto_date true
```

#### Content Repurposing Pipeline

```bash
# Transform long-form content into multiple formats
/content-writer "Repurpose Content" --source "comprehensive-guide.md" --formats "summary,social,newsletter,slides"
# Output:
# - guide-summary.md (executive summary)
# - guide-social.md (social media posts)
# - guide-newsletter.md (email newsletter format)
# - guide-slides.md (presentation outline)

# Publish across platforms
/wordpress-publisher "guide-summary.md" --category "Summaries"
/astro-publisher "guide-newsletter.md" --collection "newsletter"
/content-writer "Create Slide Deck" --source "guide-slides.md" --export_format "reveal.js"
```

### 📊 Content Performance Tracking

#### Analytics Integration

```bash
# Content performance analysis
/wordpress-publisher analytics-report --content "docker-guide" --metrics "views,engagement,conversions"
/content-writer "Performance Report" --source "analytics-data.json" --recommendations true

# A/B testing setup
/content-writer "Create Variants" --source "landing-page.md" --variants 3 --test_elements "headline,cta"
/wordpress-publisher "landing-page-variant-a.md" --ab_test "group_a"
/wordpress-publisher "landing-page-variant-b.md" --ab_test "group_b"
```

### 🎯 Platform-Specific Best Practices

#### WordPress Optimization

```bash
# SEO-optimized WordPress content
/content-writer "SEO Article" --target_keyword "docker tutorial" --seo_optimized true
/wordpress-publisher seo-analyze --content "seo-article.md" --suggestions true
/wordpress-publisher "seo-article.md" --yoast_optimization true --featured_image "auto"
```

#### Technical Documentation (Docusaurus/Mintlify)

```bash
# Interactive documentation
/content-writer "Interactive Guide" --platform "docusaurus" --interactive_elements true
/docusaurus-publisher "interactive-guide.md" --add_live_editor true --code_playground true

# API reference with examples
/content-writer "API Reference" --platform "mintlify" --openapi_spec "api.yaml"
/mintlify-publisher "api-reference.md" --interactive_examples true --try_it_buttons true
```

#### Static Site Publishing (Astro)

```bash
# Performance-optimized content
/content-writer "Performance Guide" --platform "astro" --image_optimization true
/astro-publisher "performance-guide.md" --optimize_images true --generate_sitemap true --rss_feed true
```

### Batch Operations

**Process multiple files:**

```bash
# Create multiple articles
for topic in "Topic 1" "Topic 2" "Topic 3"; do
  /content-writer "$topic" --auto_save true
done

# Batch WordPress health checks
/wordpress-publisher health-check --comprehensive --schedule daily
```

### Integration with CI/CD

**Automated content workflows:**

```bash
# In your CI/CD pipeline
npx myaidev-method@latest init --claude
/content-writer "Weekly Newsletter" --template newsletter.md
/wordpress-publisher newsletter.md --schedule "next monday"
```

### Custom Environment Configurations

**Development vs Production:**

```bash
# .env.development
WORDPRESS_URL=https://staging.yoursite.com
DEBUG=true

# .env.production  
WORDPRESS_URL=https://yoursite.com
DEBUG=false
```

## ✨ Best Practices

### Skill Customization

1. **Always backup before editing**:
   ```bash
   /configure skills --backup content-writer
   ```

2. **Test in development first**:
   ```bash
   # Test with sample content
   /content-writer "Test Article" --draft_mode true
   ```

3. **Version control your customizations**:
   ```bash
   git add .claude/
   git commit -m "Customize content writer skill for technical docs"
   ```

4. **Document your changes**:
   ```bash
   # Add comments to your skill files
   echo "# Custom modifications for technical content" >> .claude/skills/content-writer/SKILL.md
   ```

### Security

1. **Secure your .env file**:
   ```bash
   chmod 600 .env
   echo ".env" >> .gitignore
   ```

2. **Use strong WordPress Application Passwords**

3. **Limit SSH access**:
   ```bash
   # Use specific SSH keys
   SSH_KEY_PATH=/path/to/dedicated/key
   ```

4. **Regular security audits**:
   ```bash
   /wordpress-publisher security-scan --comprehensive
   ```

### Performance

1. **Monitor resource usage**:
   ```bash
   /wordpress-publisher resource-monitor
   ```

2. **Regular maintenance**:
   ```bash
   /wordpress-publisher database-optimize --weekly
   ```

3. **Cache optimization**:
   ```bash
   /wordpress-publisher cache-setup --type redis
   ```

### Content Quality

1. **Consistent style guides**:
   - Define brand voice in skill prompts
   - Include specific formatting requirements
   - Add industry-specific terminology

2. **Quality checks**:
   ```bash
   # Validate content before publishing
   /configure skills --validate content-writer
   ```

3. **A/B testing**:
   - Create multiple skill variants
   - Test different approaches
   - Measure engagement metrics

### Collaboration

1. **Team configurations**:
   ```bash
   # Share skill configurations
   git add .claude/skills/
   git commit -m "Team content writer skill configuration"
   ```

2. **Documentation**:
   ```bash
   # Document custom workflows
   echo "## Team Workflow" >> .claude/CLAUDE.md
   ```

3. **Code reviews for skill changes**:
   - Review prompt modifications
   - Test skill behavior
   - Validate output quality

## 🔬 Skill Builder (Eval-Driven Development)

The **Skill Builder** (`/myai-skill-builder`) is the recommended tool for creating production-quality skills. It uses eval-driven development — automated testing with parallel A/B comparison, quantitative benchmarking, and iterative refinement — to ensure skills meet marketplace standards before submission.

### Actions

| Action | Command | Description |
|--------|---------|-------------|
| **Create** | `/myai-skill-builder create` | Full guided workflow: concept → SKILL.md → evals → testing → publishing |
| **Refine** | `/myai-skill-builder refine <path>` | Analyze and improve an existing skill with marketplace quality scoring |
| **Test** | `/myai-skill-builder test <path>` | Run automated evals with parallel A/B testing |
| **Benchmark** | `/myai-skill-builder benchmark <path>` | Multi-run statistical analysis with variance measurement |
| **Validate** | `/myai-skill-builder validate <path>` | Quick structural and security validation |
| **Publish** | `/myai-skill-builder publish <path>` | Validate, score, and submit to the marketplace |

### Create Workflow (11 Phases)

The `create` action walks through a complete skill development lifecycle:

1. **Concept Discovery** — Interactive questions about purpose, target user, and tools needed
2. **Identity** — Name, description (with "when" clause), and category
3. **Generate SKILL.md** — Creates from a template tier (basic / intermediate / advanced with sub-agents)
4. **Progressive Disclosure** — Moves long reference docs to `references/`, deterministic tasks to `scripts/`, templates to `assets/`
5. **Iterative Refinement** — Self-review against quality checklist, user feedback loop
6. **Validate** — Runs `npx myaidev-method addon validate` to check structure and security
7. **Write Evals** — Generates automated test cases in `evals/evals.json` with assertions
8. **Run & Grade** — Parallel A/B testing (with-skill vs baseline) with grader subagent scoring
9. **Iterate** — Improve skill based on eval results, rerun to verify
10. **Description Optimization** — Train/test split on trigger queries, optimize for activation accuracy
11. **Publish Decision** — Submit to marketplace with eval evidence

### Eval-Driven Testing

The skill builder runs automated evaluations to measure whether a skill actually helps:

```
{slug}-workspace/
├── iteration-1/
│   ├── eval-basic-create/
│   │   ├── with_skill/           # Outputs from skill-assisted run
│   │   │   ├── outputs/
│   │   │   ├── timing.json       # {total_tokens, duration_ms}
│   │   │   └── grading.json      # Per-assertion PASS/FAIL with evidence
│   │   └── without_skill/        # Outputs from vanilla Claude baseline
│   │       ├── outputs/
│   │       ├── timing.json
│   │       └── grading.json
│   └── benchmark.json            # Aggregated pass rates, token usage, timing
├── iteration-2/
│   └── ...
├── benchmark.json                # Multi-run statistical results
└── feedback.json                 # User feedback from HTML reviewer
```

For each eval, **two parallel agents** are spawned: one with the skill loaded and one without (baseline). A **grader subagent** then evaluates each output against assertions and provides PASS/FAIL verdicts with cited evidence.

The `benchmark` action runs 3+ iterations to measure variance:

```bash
/myai-skill-builder benchmark .claude/skills/my-skill
```

This produces statistical analysis (mean, standard deviation) for pass rates, token usage, and timing, plus identifies flaky evals and non-discriminating assertions via an **analyzer subagent**.

### Supporting Files

Skills can include supporting directories that travel with the skill through the entire pipeline (submit → store → download → install):

| Directory | Purpose | Examples |
|-----------|---------|---------|
| `agents/` | Sub-agent definitions for Task tool delegation | `grader-agent.md`, `analyzer-agent.md` |
| `scripts/` | Deterministic computation, validation, aggregation | `validate.py`, `aggregate_benchmark.py` |
| `references/` | API schemas, long guides, documentation | `schemas.md`, `api-spec.md` |
| `assets/` | Templates, HTML files, starter configs | `eval_review.html`, `template.json` |
| `evals/` | Automated test definitions | `evals.json` |

When the skill builder detects that agents repeatedly write the same helper code during evals, it extracts the pattern into a bundled script in `scripts/`.

### Marketplace Quality Scoring

Skills are scored on 5 categories (0-100 each) both by the skill builder (locally) and by the marketplace's AI analysis (server-side):

| Category | Weight | What It Measures |
|----------|--------|-----------------|
| **Quality** | 25% | Instruction clarity, structure, formatting, agent persona specificity |
| **Security** | 20% | No credentials, no destructive commands, safe patterns |
| **Completeness** | 25% | All sections filled, error handling, edge cases, Quick Start |
| **Originality** | 15% | Distinct problem, genuine value, not a trivial wrapper |
| **Usefulness** | 15% | Real user need, well-scoped, time savings vs manual approach |

Preview your score before submitting:

```bash
/myai-skill-builder refine .claude/skills/my-skill
```

### Skill Writing Best Practices

- **Progressive disclosure**: Keep SKILL.md under 500 lines. Move reference material to `references/`, deterministic tasks to `scripts/`.
- **Explain the why**: Don't just say "do X" — explain why X matters so the agent can adapt when circumstances change.
- **Avoid heavy-handed MUSTs**: Describe goals and constraints. The agent is intelligent — let it figure out how.
- **Include "when" contexts in description**: "Use when building X, debugging Y, or preparing Z." Undertriggering is worse than overtriggering.
- **Keep it lean**: After each iteration, remove instructions that don't contribute to passing evals.

---

## 🎁 Contributing Skills to the Marketplace

The MyAIDev Marketplace at `dev.myai1.ai` hosts community and first-party skills. All contributed skills go through automated AI analysis and admin review before being published.

### Submission Pipeline

```
Author creates skill
  → CLI validates locally (structure, security, frontmatter)
  → CLI bundles SKILL.md + supporting files
  → API validates bundle (path traversal, size limits, content scanning)
  → AI analysis scores the skill (quality, security, completeness, originality, usefulness)
  → Admin reviews and approves/rejects
  → Published and installable via `addon install`
```

### Quick Start

**Option A: Using the Skill Builder (Recommended)**

```bash
# Full guided workflow with eval testing
/myai-skill-builder create

# Or submit an existing skill
/myai-skill-builder publish .claude/skills/my-skill
```

**Option B: Using the Skill Contributor**

```bash
# Quick scaffolding and submission
/skill-contributor create
/skill-contributor submit
```

**Option C: CLI directly**

```bash
npx myaidev-method login
npx myaidev-method addon validate --dir .claude/skills/my-skill
npx myaidev-method addon submit --dir .claude/skills/my-skill
npx myaidev-method addon status
```

### What Gets Submitted

When you submit, the CLI automatically detects and bundles supporting files alongside the SKILL.md:

```
my-skill/
├── SKILL.md                       ← submitted as content
├── agents/grader-agent.md         ← bundled as supportingFiles
├── scripts/validate.py            ← bundled as supportingFiles
├── references/schemas.md          ← bundled as supportingFiles
└── evals/evals.json               ← bundled as supportingFiles
```

The CLI skips `__pycache__`, `.pyc`, `.DS_Store`, and `node_modules` when collecting files.

### Bundle Validation (Server-Side)

The server validates all submitted bundles:

- **Path traversal prevention** — No `../` or absolute paths
- **Allowed directories only** — Files must be in `agents/`, `scripts/`, `references/`, `assets/`, or `evals/`
- **Blocked file types** — No `.exe`, `.dll`, `.sh`, `.bat`, `.env`, `.pem`, `.key`
- **Size limits** — Max 500KB total for supporting files, max 50 files
- **Content scanning** — All files scanned for dangerous patterns (credential references, destructive commands, remote code execution)

### Submission Statuses

| Status | Meaning |
|--------|---------|
| `pending_review` | Submitted, waiting for processing |
| `ai_analyzing` | AI is scoring the skill automatically |
| `ready_for_review` | AI analysis complete, waiting for admin review |
| `approved` | Published to the marketplace |
| `rejected` | Did not meet quality standards |
| `changes_requested` | Admin requested modifications |

Track your submissions:

```bash
# All submissions
npx myaidev-method addon status

# Specific submission by ID
npx myaidev-method addon status <submission-id>
```

### Installing Bundled Skills

When a skill has supporting files, the CLI downloads everything as a JSON bundle and recreates the full directory structure:

```bash
npx myaidev-method addon install my-skill
```

Creates:

```
.claude/skills/my-skill/
├── SKILL.md
├── agents/
│   └── grader-agent.md
├── scripts/
│   └── validate.py
└── references/
    └── schemas.md
```

Skills without supporting files are downloaded as plain markdown for backward compatibility.

### Skill Requirements

#### Frontmatter

| Field | Required | Rules |
|-------|----------|-------|
| `name` | Yes | Lowercase with hyphens, max 64 chars |
| `description` | Yes | Must include "when" clause (e.g., "Use when...") |
| `allowed-tools` | Yes | Only tools the skill actually uses |
| `argument-hint` | Recommended | Shows expected argument format |
| `context` | Recommended | Use `fork` for most skills |

#### Content Structure

- H1 heading matching skill purpose
- Quick Start section with concrete usage example
- Arguments section documenting `$ARGUMENTS` parsing
- Workflow with numbered steps for each action
- Error handling with realistic scenarios
- SKILL.md body under 500 lines

#### Security Rules (violations block submission)

- No credential paths (`~/.ssh`, `~/.aws`, `/etc/shadow`)
- No destructive commands (`rm -rf /`, `chmod 777`, `mkfs`)
- No remote script piping (`curl | bash`, `wget | sh`)
- Minimal dynamic code evaluation (`eval()`, `exec()`)

### Example: End-to-End Skill Creation

```bash
# 1. Authenticate
npx myaidev-method login

# 2. Build skill with eval-driven testing
/myai-skill-builder create
# → Concept discovery questions
# → Generates SKILL.md + supporting files
# → Writes evals, runs A/B tests
# → Optimizes description for trigger accuracy
# → Submits to marketplace with eval evidence

# 3. Check status
npx myaidev-method addon status

# 4. After approval, others can install
npx myaidev-method addon install your-skill-name
```

## 📚 Additional Resources

### Learning More

- **Claude Code Documentation**: Official Claude Code docs
- **WordPress REST API**: https://developer.wordpress.org/rest-api/
- **Markdown Guide**: https://www.markdownguide.org/
- **YAML Syntax**: https://yaml.org/spec/

### Community

- **GitHub Issues**: Report bugs and request features
- **Discussions**: Share configurations and tips
- **Examples**: Browse community skill configurations

### Support

If you encounter issues:

1. **Check this guide** for troubleshooting steps
2. **Review error logs** for specific issues
3. **Test components individually** (WordPress, SSH, skills)
4. **Create GitHub issues** for bugs or feature requests

---

**Happy customizing!** 🚀

Remember: The power of MyAIDev Method lies in its customizability. Don't hesitate to experiment with different skill configurations to find what works best for your workflow.
