# MyAIDev Method

> **🚀 A comprehensive development framework for AI-assisted software development with systematic workflows and multi-platform publishing!**

The **MyAIDev Method** is a complete development framework for AI CLI tools (Claude Code, Gemini CLI, Codex CLI) featuring the **SPARC methodology** for systematic software development, inspired by [GitHub Spec-Kit](https://github.com/github/spec-kit) patterns for agentic software development.

**🌟 What makes this special:**

**Comprehensive Development Framework:**
- **SPARC Methodology**: 5-phase systematic development workflow (Specification → Pseudocode → Architecture → Refinement → Completion)
- **Development Skills**: Architect, Coder, Tester, Reviewer, Documenter - complete coverage from design to deployment
- **Quality-First**: Built-in security (OWASP Top 10), testing (80%+ coverage), and code review standards
- **Spec-Kit Inspired**: Proven patterns for agentic software development based on GitHub's Spec-Kit framework

**Multi-Platform Publishing & Deployment:**
- **CMS Publishing**: WordPress, PayloadCMS with full content management
- **Static Site Generators**: Docusaurus, Mintlify, Astro with git-based workflows
- **Deployment**: Coolify self-hosted PaaS orchestration
- **Infrastructure**: RamNode.com optimized deployment patterns

**Professional Tooling:**
- **Instant setup**: Install as a Claude Code plugin or via `npx`
- **Claude Code native**: Follows official plugin and skills standards for maximum compatibility
- **Zero dependencies**: Core features work standalone, optional MCP integrations available
- **Production-ready**: SOLID principles, Clean Code, comprehensive testing built-in

## 📋 Table of Contents

- [Features](#features)
- [Plugin Architecture & Skills](#-plugin-architecture--skills)
- [Installation](#installation)
- [Quick Start](#quick-start)
- [Updating](#updating)
- [Developer Use Cases](#developer-use-cases)
- [SPARC Development Workflow](#sparc-development-workflow)
- [Development Skills](#development-skills)
- [Content & Publishing Skills](#content--publishing-skills)
- [Visual Content Generation](#visual-content-generation)
- [OpenStack Integration](#openstack-integration)
- [Skills Reference](#skills-reference)
- [MCP Server Integration](#mcp-server-integration)
- [Configuration](#configuration)
- [WordPress Integration](#wordpress-integration)
- [SSH Integration](#ssh-integration)
- [Customizing Skills](#customizing-skills)
- [Project Structure](#project-structure)
- [Environment Variables](#environment-variables)
- [Examples](#examples)
- [Troubleshooting](#troubleshooting)
- [Contributing](#contributing)
- [License](#license)

## ✨ Features

### 🏗️ Development Framework (SPARC Methodology)
- **Systematic Workflow**: 5-phase SPARC methodology (Specification → Pseudocode → Architecture → Refinement → Completion)
- **Development Skills**: Complete suite of specialized skills for the full development lifecycle
  - 🏗️ **myaidev-architect**: System design, API specifications, data modeling, technology selection
  - 💻 **myaidev-coder**: Feature implementation, refactoring, SOLID principles, Clean Code
  - 🧪 **myaidev-tester**: Unit/integration testing, 80%+ coverage, quality gates
  - 👁️ **myaidev-reviewer**: Code quality, security (OWASP Top 10), performance analysis
  - 📚 **myaidev-documenter**: API docs, user guides, architecture documentation
- **Spec-Kit Patterns**: Proven agentic development patterns inspired by GitHub Spec-Kit
- **Quality Standards**: Built-in security, testing, code review, and documentation standards
- **File-Based Workflow**: Sequential agent coordination with `.myaidev-method/sparc/` outputs

### 📝 Content & Publishing
- **content-writer**: Professional SEO-optimized content creation with multi-agent pipeline
- **Multi-Platform Publishing**: WordPress, PayloadCMS, Docusaurus, Mintlify, Astro
- **Git-Based Workflows**: Automated publishing for static site generators
- **content-production-coordinator**: Batch content orchestration and multi-platform publishing

### 📋 Content Production Coordinator (New in v0.2.24-2!)
**Enterprise-grade content orchestration for batch verification and multi-platform publishing**
- **6-Phase Workflow**: Initialize → Verify → Categorize → Report → Notify → Publish
- **Multi-Platform Publishing**: WordPress, PayloadCMS, Docusaurus, Mintlify, Astro, Static
- **Content Verification**: Proprietary content uniqueness and quality analysis
- **Scheduling**: Linux crontab integration + WordPress native post scheduling
- **CI/CD Integration**: Webhook notifications for pipeline integration
- **Analytics & Monitoring**: Per-phase timing, success rates, quality scores
- **Queue Management**: Persistent queue with add/process/clear operations
- **Checkpoint/Resume**: Automatic progress saving with resume capability

### 🎨 Visual Content Generation (Updated in v0.2.22!)
- **AI-Powered Image Generation**: Google Gemini "Nano Banana" (SOTA), OpenAI GPT Image 1.5 (SOTA), Imagen 3, FLUX 2
- **AI-Powered Video Generation**: Google Veo 3 (latest video generation)
- **Multi-Platform Support**: Works with Claude Code, Gemini CLI, and Codex CLI
- **Budget Management**: Daily/monthly limits, cost tracking, and warnings
- **Smart Service Selection**: Automatic service selection based on content type
- **Content Integration**: Generate images during content creation with `--with-images` flag
- **Cost-Effective**: Starting at $0.02/image (Gemini Flash)
- **Organized Storage**: Automatic file organization by date in `content-assets/`

### 🔒 Security Testing (New in v0.2.21!)
**Professional security testing capabilities inspired by [Agent Zero](https://github.com/frdel/agent-zero)**
- **PTES Methodology**: Full penetration testing execution standard implementation
- **OSINT & Reconnaissance**: Comprehensive intelligence gathering and passive reconnaissance
- **Web Application Security**: OWASP Top 10 testing and web application assessment
- **Security Auditing**: Compliance validation (PCI-DSS, GDPR, HIPAA, SOC 2)
- **Authorization-First**: Mandatory authorization system prevents unauthorized testing
- **Environment Flexibility**: Native Linux, Kali Docker, or hybrid deployment
- **Professional Reporting**: Executive summaries, technical findings, remediation guidance
- **Legal Compliance**: Built-in warnings and ethical guidelines

**⚠️ IMPORTANT**: Security testing requires explicit written authorization. All security operations must comply with applicable laws and regulations.

### 🌩️ OpenStack Cloud Integration (New in v0.2.22!)
**Complete cloud infrastructure orchestration for VM management and deployment**
- **VM Lifecycle Management**: Create, start, stop, reboot, delete virtual machines
- **Resource Discovery**: List images, flavors, networks, security groups, keypairs
- **Network Configuration**: Floating IPs, IP assignment, security groups
- **Storage Management**: Volumes, volume attachments
- **Cloud-Init Support**: Automatic VM provisioning with cloud-init scripts
- **Session Tracking**: Operation history and session management
- **Interactive Setup**: Parse openrc files or manual credential entry

### 🚀 Deployment & Infrastructure
- **Coolify Integration**: Self-hosted PaaS deployment and orchestration
- **RamNode Optimized**: Deployment patterns optimized for RamNode.com infrastructure
- **SSH Integration**: Server-level operations for advanced administration
- **MCP Server Integration**: Optional advanced features with SPARC Orchestrator, Chrome DevTools, and WordPress MCP servers

### 🛠️ Development Tools
- **Skills-Based Architecture**: Discoverable SKILL.md files following the Agent Skills standard
- **Plugin Support**: Ships as a Claude Code plugin with auto-namespaced skills
- **Cross-Platform**: Full compatibility with Claude Code, Gemini CLI, Codex CLI
- **Zero Dependencies**: Core features work standalone, optional MCP integrations

## 🔌 Plugin Architecture & Skills

**New in v0.2.25!** MyAIDev Method now supports a modern plugin-based architecture with discoverable skills.

### Installation Methods

#### Method 1: Plugin Installation (Recommended)

```bash
# Add marketplace and install (one-time)
/plugin marketplace add myaione/myaidev-method
/plugin install myaidev-method@myaidev-marketplace
```

Skills will be available as `/myaidev-method:content-writer`, `/myaidev-method:myaidev-workflow`, etc.

#### Method 2: Local Plugin (Development)

```bash
# Test locally
claude --plugin-dir /path/to/myaidev-method

# Or clone and install
git clone https://github.com/myaione/myaidev-method.git
claude --plugin-dir ./myaidev-method
```

#### Method 3: NPX Installer (Copies skills to project)

```bash
# Full installation - copies skills to .claude/skills/
npx myaidev-method init --claude

# Workflow-specific installation
npx myaidev-method content --claude
npx myaidev-method visual --claude
npx myaidev-method develop --claude
npx myaidev-method security --claude
```

### Skills-Based Architecture

Skills are discoverable capabilities defined in SKILL.md files:

| Skill Pack | Skills Included | Description |
|------------|-----------------|-------------|
| **content** | content-writer, content-production-coordinator, myai-visual-generator, "wordpress-publisher", "astro-publisher", "docusaurus-publisher", "mintlify-publisher", "payloadcms-publisher" | Content production and publishing |
| **content-maintenance** | content-enrichment | Content enrichment |
| **development** | myaidev-architect, myaidev-coder, myaidev-tester, myaidev-reviewer, myaidev-documenter | SPARC methodology |
| **security** | security-tester, security-auditor | Security testing and auditing |
| **infrastructure** | coolify-deployer, openstack-manager | Deployment and cloud management |

### Skill Invocation

When installed as a plugin, skills are namespaced:

| Skill | Invocation | Description |
|-------|-----------|-------------|
| content-writer | `/myaidev-method:content-writer` | Content creation pipeline |
| myaidev-workflow | `/myaidev-method:myaidev-workflow` | Full SPARC development workflow |
| myai-visual-generator | `/myaidev-method:myai-visual-generator` | AI image/video generation |
| wordpress-publisher | `/myaidev-method:wordpress-publisher` | WordPress publishing |
| configure | `/myaidev-method:configure` | Configuration wizard |
| security-tester | `/myaidev-method:security-tester` | Penetration testing |
| security-auditor | `/myaidev-method:security-auditor` | Security auditing |

When installed via NPX (copied to project), skills are invoked without namespace: `/content-writer`, `/myaidev-workflow`, etc.

### Cross-Platform Support

MyAIDev Method supports multiple AI CLI platforms:

| Platform | Format | Features |
|----------|--------|----------|
| **Claude Code** | Markdown + YAML | Full feature support, MCP servers, hooks |
| **Gemini CLI** | TOML | Commands and skills |
| **Codex CLI** | Markdown | Commands and skills |

Build for specific platforms:
```bash
npm run build:platforms  # Build all
npm run build:claude     # Claude Code only
npm run build:gemini     # Gemini CLI only
npm run build:codex      # Codex CLI only
```

### Distribution

The plugin is available through multiple channels:

- **Plugin Marketplace**: `/plugin marketplace add myaione/myaidev-method`
- **NPM**: `npx myaidev-method` or `npm install myaidev-method`
- **GitHub**: https://github.com/myaione/myaidev-method

## 🚀 Installation

[![npm version](https://badge.fury.io/js/myaidev-method.svg)](https://www.npmjs.com/package/myaidev-method)
[![npm downloads](https://img.shields.io/npm/dt/myaidev-method.svg)](https://www.npmjs.com/package/myaidev-method)

### ⚡ Modular Installation (New in v0.2.19!)

**Install only what you need!** MyAIDev Method now supports modular workflow installation:

```bash
# Content creation only
npx myaidev-method@latest content --claude

# Development workflow only (SPARC)
npx myaidev-method@latest dev --claude

# WordPress publishing
npx myaidev-method@latest publish --wordpress

# Visual content generation
npx myaidev-method@latest visual --claude

# Security testing (NEW in v0.2.21!)
npx myaidev-method@latest security --pentest     # Penetration testing
npx myaidev-method@latest security --audit       # Security auditing
npx myaidev-method@latest security --webapp      # Web app security
npx myaidev-method@latest security --all         # All security workflows

# Complete installation (all workflows)
npx myaidev-method@latest init --claude
```

**See [MODULAR_INSTALLATION.md](MODULAR_INSTALLATION.md) for complete guide**

### 💡 Quick Installation Examples

**Content Creator:**
```bash
npx myaidev-method@latest content --claude
npx myaidev-method@latest add publish-wordpress
```

**Software Developer:**
```bash
npx myaidev-method@latest dev --claude
```

**Full Installation (Backward Compatible):**

```bash
# For Claude Code (most popular)
npx myaidev-method@latest init --claude

# For Gemini CLI
npx myaidev-method@latest init --gemini

# For Codex CLI
npx myaidev-method@latest init --codex

# Interactive setup (prompts for CLI choice)
npx myaidev-method@latest init
```

**That's it!** No complex setup.

### Requirements

- Node.js >= 20.0.0
- Claude Code >= 1.0.0 (for Claude features)
- WordPress site with REST API enabled (optional, for WordPress features)
- SSH access to server (optional, for advanced WordPress admin features)

> **Note**: WordPress and SSH are completely optional. You can use the content writer agent without any external dependencies!

## 🏃‍♂️ Quick Start

1. **Install and configure** (one command):
   ```bash
   npx myaidev-method@latest init --claude
   ```

2. **Start using immediately**:
   ```bash
   # Create professional content
   /content-writer "10 Tips for Remote Work"

   # Configure settings (optional)
   /configure
   ```

3. **Add WordPress integration** (optional):
   ```bash
   cp .env.example .env
   # Edit .env with your WordPress credentials
   /wordpress-publisher health-check
   ```

## 🔄 Updating

Keep your MyAIDev Method installation up to date with the latest features and bug fixes:

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

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

# Preview changes without updating
npx myaidev-method@latest update --claude --dry-run
```

The update command:
- ✅ Detects your current version
- ✅ Updates skills, scripts, and documentation
- ✅ Preserves your customizations (interactive conflict resolution)
- ✅ Creates automatic backups before updating
- ✅ Installs updated dependencies

See [USER_GUIDE.md - Updating Section](USER_GUIDE.md#-updating-myaidev-method) for detailed update instructions and best practices.

## 💡 Developer Use Cases

**New!** See real-world scenarios demonstrating how MyAIDev Method supercharges development workflows:

📖 **[DEVELOPER_USE_CASES.md](DEVELOPER_USE_CASES.md)** - Comprehensive guide featuring:

- **Full-Stack SaaS Development**: Build production-ready apps in days instead of weeks
- **Microservices Refactoring**: Zero-downtime migrations with systematic strategies
- **Technical Content Pipeline**: 4x content output with multi-platform publishing
- **Database Migrations**: Safe migrations with rollback capabilities
- **Team Collaboration**: Automated code reviews and knowledge bases
- **ROI Analysis**: Real productivity metrics and time savings

**Examples with Time Savings**:
- Full-stack feature: 120 hours → 24 hours (80% faster)
- Technical blog post: 12 hours → 2-3 hours (75% faster)
- Code review: 45 minutes → 10 minutes (78% faster)
- Developer onboarding: 2 weeks → 2 days (90% faster)

Each use case includes:
- Traditional vs MyAIDev approach comparison
- Complete code examples and commands
- Quantified time savings and quality improvements
- Integration patterns and best practices

## 📝 Content Creation for Marketers

**New!** Discover how marketers and content creators can leverage MyAIDev Method for efficient, high-quality content production:

📖 **[CONTENT_CREATION_GUIDE.md](CONTENT_CREATION_GUIDE.md)** - Complete marketing workflow guide featuring:

- **4-Phase Content Pipeline**: Ideation → Generation → Publishing → Optimization
- **AI Content Generation**: Professional blog posts, tutorials, case studies, and technical content
- **Multi-Platform Publishing**: WordPress, PayloadCMS, LinkedIn, email newsletters in one workflow
- **Hub-and-Spoke Distribution**: Single content piece adapted for multiple channels
- **SEO Optimization**: Keyword research, LSI integration, meta descriptions
- **Where AI Excels vs Human Input**: Clear guidance on AI capabilities and limitations
- **8 Common Pitfalls**: Detailed explanations and solutions to avoid content marketing mistakes

**Examples with Time Savings**:
- Blog post (2,500 words): 12 hours → 2-3 hours (75% faster)
- Technical tutorial series: 40 hours → 8 hours (80% faster)
- Multi-platform distribution: 6 hours → 30 minutes (92% faster)
- SEO research and optimization: 4 hours → 45 minutes (81% faster)

**Content Templates Included**:
- Long-form educational blog posts
- Technical tutorials with code examples
- Product announcements and release notes
- Case studies with metrics and results
- LinkedIn thought leadership articles
- Email newsletters

## 🏗️ SPARC Development Workflow

The **MyAIDev Method** implements the **SPARC methodology** - a systematic 5-phase approach to software development inspired by [GitHub Spec-Kit](https://github.com/github/spec-kit) patterns for agentic software development.

### What is SPARC?

**SPARC** stands for:
- **S**pecification - Define requirements and system boundaries
- **P**seudocode - Plan implementation approach
- **A**rchitecture - Design system structure, APIs, and data models
- **R**efinement - Implement, test, and review code quality
- **C**ompletion - Document and deliver production-ready software

### The 5 Phases

```
┌─────────────────────────────────────────────────────────────────┐
│  SPARC Workflow: Systematic Software Development                 │
└─────────────────────────────────────────────────────────────────┘

Phase 1: 🏗️ ARCHITECTURE
├─ Skill: myaidev-architect
├─ Output: .myaidev-method/sparc/architecture.md
├─ Deliverables:
│  ├─ System design with Mermaid diagrams
│  ├─ API specifications (REST/GraphQL/gRPC)
│  ├─ Data models and schemas
│  ├─ Technology stack recommendations
│  └─ Security and scalability planning
└─ Invoke: /myaidev-architect "Design authentication system"

Phase 2: 💻 IMPLEMENTATION
├─ Skill: myaidev-coder
├─ Output: .myaidev-method/sparc/code-output/
├─ Standards: SOLID, Clean Code, DRY/KISS/YAGNI
├─ Features:
│  ├─ Production-ready code implementation
│  ├─ Security best practices (OWASP Top 10)
│  ├─ Error handling and input validation
│  └─ Inline documentation (JSDoc, etc.)
└─ Invoke: /myaidev-coder "Implement JWT authentication"

Phase 3: 🧪 TESTING
├─ Skill: myaidev-tester
├─ Output: .myaidev-method/sparc/test-results/
├─ Coverage: 80%+ critical paths, 60%+ overall
├─ Deliverables:
│  ├─ Unit test suites
│  ├─ Integration tests
│  ├─ Coverage reports
│  └─ Quality gate validation
└─ Invoke: /myaidev-tester "Test authentication module"

Phase 4: 👁️ REVIEW
├─ Skill: myaidev-reviewer
├─ Output: .myaidev-method/sparc/review-report.md
├─ Analysis:
│  ├─ Code quality and complexity
│  ├─ Security audit (OWASP Top 10)
│  ├─ Performance optimization
│  ├─ Best practices compliance
│  └─ Technical debt assessment
└─ Invoke: /myaidev-reviewer "Review authentication implementation"

Phase 5: 📚 DOCUMENTATION
├─ Skill: myaidev-documenter
├─ Output: .myaidev-method/sparc/documentation/
├─ Deliverables:
│  ├─ API reference (OpenAPI/Swagger)
│  ├─ User guides and tutorials
│  ├─ Architecture documentation
│  └─ Code examples and snippets
└─ Invoke: /myaidev-documenter "Document authentication API"
```

### Complete Workflow Execution

Run the entire SPARC workflow with a single command:

```bash
# Invoke the myaidev-workflow skill
/myaidev-workflow "Build user authentication system with JWT"

# Or with plugin namespace
/myaidev-method:myaidev-workflow "Build user authentication system with JWT"
```

### Workflow Output Structure

```
.myaidev-method/
├── sparc/
│   ├── architecture.md              # Phase 1: System design
│   ├── code-output/                 # Phase 2: Implementation
│   │   ├── src/
│   │   ├── tests/
│   │   └── ...
│   ├── test-results/                # Phase 3: Testing
│   │   ├── unit/
│   │   ├── integration/
│   │   └── coverage-report.md
│   ├── review-report.md             # Phase 4: Code review
│   └── documentation/               # Phase 5: Documentation
│       ├── api/
│       ├── user-guide/
│       └── architecture/
├── tasks/                           # Task tracking
└── workflows/                       # Workflow execution logs
```

### Quality Standards

Every SPARC workflow enforces:

- **Code Quality**: SOLID principles, Clean Code, maintainability metrics
- **Security**: OWASP Top 10 compliance, vulnerability scanning
- **Testing**: 80%+ critical path coverage, integration tests
- **Performance**: Algorithm complexity analysis, optimization recommendations
- **Documentation**: Complete API docs, user guides, architecture specs

### GitHub Spec-Kit Inspiration

This framework is inspired by [GitHub's Spec-Kit](https://github.com/github/spec-kit) patterns for agentic software development:

- **Systematic Approach**: Structured phases with clear deliverables
- **Quality Gates**: Validation at each phase transition
- **Skill Specialization**: Dedicated skills with specific expertise
- **File-Based Coordination**: Agents communicate through well-defined outputs
- **Reproducible Workflows**: Consistent results across projects

### Individual Phase Commands

You can also run individual phases:

```bash
# Invoke individual SPARC phase skills
/myaidev-architect "Design real-time chat app"
/myaidev-coder "Implement WebSocket server"
/myaidev-tester "Test chat functionality"
/myaidev-reviewer "Review chat implementation"
/myaidev-documenter "Document chat API"
```

## 🤖 Development Skills

### Complete Development Lifecycle Coverage

The MyAIDev Method provides specialized skills for every phase of the development lifecycle:

### 🏗️ myaidev-architect
**Skill:** `skills/myaidev-architect/SKILL.md`
**Phase:** Architecture (SPARC Phase 1)

System architect specializing in scalable design, API specifications, and technology selection.

**Capabilities:**
- High-level system architecture with Mermaid diagrams
- API contract definitions (REST, GraphQL, gRPC)
- Data modeling and schema design
- Technology stack recommendations
- Security architecture planning
- Scalability and performance planning

**Output:** `.myaidev-method/sparc/architecture.md`

### 💻 myaidev-coder
**Skill:** `skills/myaidev-coder/SKILL.md`
**Phase:** Implementation (SPARC Phase 2)

Production code implementer following SOLID principles and Clean Code practices.

**Capabilities:**
- Feature implementation from architecture specs
- Code refactoring and optimization
- SOLID principles application
- Security best practices (OWASP Top 10)
- Error handling and input validation
- Inline documentation (JSDoc, Sphinx, etc.)

**Output:** `.myaidev-method/sparc/code-output/`

**Quality Standards:**
- 80%+ test coverage target
- SOLID, DRY, KISS, YAGNI principles
- Security-first implementation
- Comprehensive error handling

### 🧪 myaidev-tester
**Skill:** `skills/myaidev-tester/SKILL.md`
**Phase:** Testing (SPARC Phase 3)

Comprehensive testing specialist with TDD workflow support.

**Capabilities:**
- Unit test creation (AAA pattern)
- Integration test development
- Coverage analysis and reporting
- Quality gate validation
- Test-Driven Development (TDD) workflow
- Multiple framework support (Jest, Mocha, Pytest, etc.)

**Output:** `.myaidev-method/sparc/test-results/`

**Coverage Standards:**
- 80%+ for critical paths
- 60%+ overall coverage
- Pre-commit, pre-merge, pre-deployment gates

### 👁️ myaidev-reviewer
**Skill:** `skills/myaidev-reviewer/SKILL.md`
**Phase:** Review (SPARC Phase 4)

Code quality and security analyst with comprehensive review capabilities.

**Capabilities:**
- Code quality metrics and complexity analysis
- Security audit (OWASP Top 10 compliance)
- Performance review and optimization
- Best practices validation (SOLID, framework standards)
- Technical debt assessment with priority scoring
- Code smell and anti-pattern detection

**Output:** `.myaidev-method/sparc/review-report.md`

**Review Standards:**
- Code quality: Complexity, readability, maintainability
- Security: OWASP Top 10, vulnerability patterns
- Performance: Algorithm complexity, resource management
- Best practices: Framework standards, design patterns

### 📚 myaidev-documenter
**Skill:** `skills/myaidev-documenter/SKILL.md`
**Phase:** Documentation (SPARC Phase 5)

Technical documentation specialist for APIs, user guides, and architecture docs.

**Capabilities:**
- API reference generation (OpenAPI/Swagger)
- User guide and tutorial creation
- Architecture documentation
- Code example generation and testing
- Multiple format support (Markdown, HTML, reStructuredText)
- Inline code documentation (JSDoc, Sphinx, etc.)

**Output:** `.myaidev-method/sparc/documentation/`

**Documentation Standards:**
- Clarity: Simple language, clear examples, visual aids
- Completeness: All public APIs documented
- Accuracy: Tested code examples, synchronized with code
- Accessibility: Multiple formats, searchable, well-organized

## 📝 Content & Publishing Skills

### content-writer
**Skill:** `skills/content-writer/SKILL.md`

Professional content creation orchestrator with multi-agent pipeline for research, planning, writing, SEO optimization, and visual generation.

**Capabilities:**
- SEO-optimized article creation
- Research and fact-checking
- Markdown formatting with frontmatter
- WordPress-ready content structure
- Multiple tone and audience support
- Keyword optimization

### wordpress-publisher
**Skill:** `skills/wordpress-publisher/SKILL.md`

WordPress publishing and administration for site management, content publishing, and health analysis.

**Capabilities:**
- Security: Vulnerability scanning, malware detection, user auditing
- Performance: Speed optimization, database cleanup, caching setup
- Health: Site monitoring, error analysis, backup verification
- Administration: User/plugin/theme management, content cleanup

#### payloadcms-publisher
**Skill:** `skills/payloadcms-publisher/SKILL.md`

Publish markdown content to PayloadCMS headless CMS with Lexical rich text conversion.

**Capabilities:**
- Markdown to Lexical conversion
- JWT authentication
- Draft and published workflows
- Custom collections support
- Document updates

#### docusaurus-publisher
**Skill:** `skills/docusaurus-publisher/SKILL.md`

Git-based publishing for Docusaurus documentation sites.

**Capabilities:**
- Docs, blog, and pages support
- Automatic frontmatter transformation
- Sidebar configuration
- Git commit and push automation

#### mintlify-publisher
**Skill:** `skills/mintlify-publisher/SKILL.md`

Git-based publishing for Mintlify documentation with automatic navigation.

**Capabilities:**
- MDX transformation
- mint.json navigation updates
- Icon and metadata support
- Git workflow automation

#### astro-publisher
**Skill:** `skills/astro-publisher/SKILL.md`

Git-based publishing for Astro sites with content collections support.

**Capabilities:**
- Content collections publishing
- Schema-validated frontmatter
- pubDate transformation
- Draft/published workflow

### Deployment Skills

#### coolify-deployer
**Skill:** `skills/coolify-deployer/SKILL.md`

Self-hosted PaaS deployment for applications.

**Capabilities:**
- Application deployment
- Health monitoring
- Resource management
- Multi-environment support

### 📋 Content Production Coordinator

**New in v0.2.24-2!** Enterprise-grade content orchestration for batch verification and multi-platform publishing.

#### Quick Start

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

# Verify only, no publishing (dry run)
/content-production-coordinator ./content-queue/ --dry-run

# Full production run with all features
/content-production-coordinator ./content-queue/ \
  --verbose \
  --analytics \
  --webhook-url https://ci.example.com/webhook
```

#### Content Queue Format

Create markdown files in your content queue directory:

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

## Proprietary Content

[Your unique insights and original analysis here]
```

#### Key Features

**Multi-Platform Publishing:**
```bash
/content-production-coordinator ./content-queue/ --platform wordpress   # Default
/content-production-coordinator ./content-queue/ --platform payloadcms
/content-production-coordinator ./content-queue/ --platform docusaurus
/content-production-coordinator ./content-queue/ --platform static
```

**Scheduling:**
```bash
# WordPress native scheduling - delay 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

# Linux crontab integration
/content-production-coordinator ./content-queue/ --cron --force
```

**CI/CD Integration:**
```bash
/content-production-coordinator ./content-queue/ \
  --webhook-url https://ci.example.com/webhook \
  --webhook-events start,complete,error,published
```

**Queue Management:**
```bash
/content-production-coordinator ./new-articles/ --add-to-queue
/content-production-coordinator --queue-stats
/content-production-coordinator --clear-completed
```

For comprehensive documentation, see **[USER_GUIDE.md](USER_GUIDE.md#batch-content-coordination)**

## 🎨 Visual Content Generation

**Updated in v0.2.22!** Generate AI-powered images and videos using state-of-the-art models.

### Recommended SOTA Models

- **Google Gemini 3.0 Pro Image ("Nano Banana")**: Fast, cost-effective at $0.02/image - great for high volume
- **OpenAI GPT Image 1.5**: Best quality, best text rendering, $0.02-$0.19/image depending on quality tier

### Features

- **Image Generation**: Gemini "Nano Banana" ($0.02), OpenAI GPT Image 1.5 ($0.02-$0.19), Imagen 3 ($0.03), FLUX 2 ($0.025-$0.05)
- **Video Generation**: Google Veo 3 ($0.40/second - latest video generation)
- **Multi-Platform**: Works with Claude Code, Gemini CLI, and Codex CLI
- **Budget Management**: Daily/monthly limits, cost tracking, and warnings
- **Smart Organization**: Automatic file storage by date in `content-assets/`
- **Content Integration**: Generate images during content creation with `--with-images` flag

### Setup

1. **Configure Visual APIs** (one-time setup):
   ```bash
   # Claude Code
   /configure visual

   # Gemini CLI / Codex CLI
   npm run configure:visual
   ```

2. **Follow the interactive wizard** to set up:
   - Google AI API key (for Gemini, Imagen, Veo)
   - OpenAI API key (for GPT Image 1.5)
   - Fal.ai API key (for FLUX 2)
   - Default service preference
   - Daily and monthly budget limits

### Usage

#### Claude Code
```bash
# Generate a hero image
/myai-visual-generator "Modern developer workspace with dual monitors"

# Generate with specific service
/myai-visual-generator "AI concept illustration" --service dalle --type illustration

# Generate diagram
/myai-visual-generator "Microservices architecture" --type diagram --service gemini

# Create content with images
/content-writer "Best Practices for Remote Work" --with-images
```

#### Gemini CLI / Codex CLI
```bash
# Generate a hero image
npm run generate-visual "Modern developer workspace"

# Generate with options
npm run generate-visual "System architecture" -- --type=diagram --service=gemini

# Configure visual APIs
npm run configure:visual
```

### Service Comparison

| Service | Speed | Cost | Quality | Best For |
|---------|-------|------|---------|----------|
| **Gemini "Nano Banana"** ⭐ | ⚡⚡⚡ | $0.02 | Good | Quick hero images, diagrams, high volume (SOTA) |
| **OpenAI GPT Image 1.5** ⭐ | ⚡⚡ | $0.02-$0.19 | Outstanding | Best text rendering, highest quality (SOTA) |
| **Imagen 3** | ⚡⚡ | $0.03 | Excellent | Premium hero images, photorealistic |
| **FLUX 2 Pro** | ⚡⚡⚡ | $0.05 | Outstanding | Fast quality, typography, multi-reference |
| **FLUX 2 Flex** | ⚡⚡ | $0.04 | Outstanding | Developer control, custom parameters |
| **FLUX 2 Dev** | ⚡⚡⚡ | $0.025 | Excellent | Cost-effective, 32B open-weight model |
| **Veo 3** | ⚡ | $0.40/sec | Outstanding | Premium video content, latest features |

⭐ = Recommended SOTA (State-of-the-Art) models

### Image Types

- `hero` - Article header images (recommended: 1792x1024)
- `illustration` - Abstract concepts and metaphors
- `diagram` - Technical workflows and architecture
- `screenshot` - UI mockups and interface designs
- `video` - Product demos and tutorials (Veo 2 only)

### Budget Management

The system automatically tracks costs and enforces budget limits:
- **Daily Budget**: Configurable limit (default: $5.00)
- **Monthly Budget**: Configurable limit (default: $50.00)
- **Warning Threshold**: Alert at 80% usage
- **Usage Tracking**: Stored in `.visual-usage-stats.json`

### File Organization

Generated files are automatically organized by date:
```
content-assets/
├── images/
│   └── 2025-11-19/
│       ├── hero-workspace-123456.png
│       └── diagram-architecture-234567.png
└── videos/
    └── 2025-11-19/
        └── video-demo-345678.mp4
```

### Documentation

For comprehensive documentation, see:
- **CONTENT_CREATION_GUIDE.md** - Content workflow integration

## 🌩️ OpenStack Integration

**New in v0.2.22!** Complete OpenStack cloud management for spinning up VMs, managing infrastructure, and orchestrating deployments.

### Features

- **VM Lifecycle Management**: Create, start, stop, reboot, delete virtual machines
- **Resource Discovery**: List available images, flavors, networks, security groups, keypairs
- **Network Configuration**: Create and assign floating IPs, manage security groups
- **Storage Management**: Create volumes and attach to servers
- **Cloud-Init Support**: Automatic VM provisioning with cloud-init scripts
- **Session Management**: Track operations and maintain session state

### Setup

1. **Configure OpenStack credentials**:
   ```bash
   /configure openstack
   ```

2. **Follow the interactive wizard** to:
   - Parse existing openrc file (recommended), or
   - Enter credentials manually
   - Test connection
   - Set default cloud-init URL (optional)

### Usage

```bash
# Check connectivity
/openstack-manager health

# Discover available resources
/openstack-manager images
/openstack-manager flavors
/openstack-manager networks
/openstack-manager keypairs

# Create a VM
/openstack-manager create myvm --image "Ubuntu 22.04" --flavor m1.small --keypair mykey

# Create VM with cloud-init
/openstack-manager create myvm --image "Ubuntu 22.04" --flavor m1.small --use-default-cloud-init

# Create VM with custom cloud-init URL
/openstack-manager create myvm --image "Ubuntu 22.04" --flavor m1.small --cloud-init-url "https://gist.github.com/user/abc123"

# List all VMs
/openstack-manager list

# Show VM details
/openstack-manager show myvm

# Manage VM lifecycle
/openstack-manager start myvm
/openstack-manager stop myvm
/openstack-manager reboot myvm
/openstack-manager delete myvm

# Assign floating IP
/openstack-manager floating-ip create external-network
/openstack-manager floating-ip add myvm 203.0.113.10

# Cloud-init management
/openstack-manager cloud-init info
/openstack-manager cloud-init preview
```

### Cloud-Init Support

Cloud-init enables automatic VM provisioning. Sources (in priority order):

1. **Inline content** (`--user-data`): Direct YAML content
2. **URL** (`--cloud-init-url`): Fetch from any URL (GitHub Gist supported)
3. **File** (`--cloud-init-file`): Local file path
4. **Default** (`--use-default-cloud-init`): Uses `CLOUD_INIT` from `.env`

**Example cloud-init script:**
```yaml
#cloud-config
package_update: true
packages:
  - docker.io
  - nodejs
users:
  - name: developer
    groups: [sudo, docker]
    ssh_authorized_keys:
      - ssh-rsa AAAA... your-key
runcmd:
  - systemctl enable docker
```

### Environment Variables

```bash
# Required OpenStack credentials
OS_AUTH_URL=https://cloud.example.com:5000/v3
OS_USERNAME=your-username
OS_PASSWORD=your-password
OS_PROJECT_ID=your-project-id
OS_REGION_NAME=RegionOne

# Optional
OS_USER_DOMAIN_ID=default
OS_PROJECT_DOMAIN_ID=default
OS_IDENTITY_API_VERSION=3
CLOUD_INIT=https://gist.github.com/user/cloud-init-script
```

### Use Cases

- **Content Deployment**: Spin up VMs for content testing and preview
- **Development Environments**: Create dev/test infrastructure on demand
- **CI/CD Runners**: Deploy CI/CD runners and test infrastructure
- **Production Deployments**: Provision production application servers

## 🎯 Skills Reference

### `/content-writer`
Create professional, SEO-optimized content with optional AI-generated visuals.

```bash
/content-writer "Best Practices for Remote Work"
/content-writer "AI in Healthcare" --word-count=1500 --tone=technical
/content-writer "Microservices Guide" --with-images
```

### `/myai-visual-generator`
Generate AI-powered images and videos for content.

```bash
/myai-visual-generator "Modern developer workspace with dual monitors"
/myai-visual-generator "AI concept illustration" --service=dalle --type=illustration
/myai-visual-generator "Product demo walkthrough" --type=video --service=veo
```

### `/wordpress-publisher`
Publish markdown content to WordPress.

```bash
/wordpress-publisher "article.md" --status draft
```

### `/payloadcms-publisher`
Publish markdown content to PayloadCMS.

```bash
/payloadcms-publisher "article.md" --collection posts
```

### `/docusaurus-publisher`, `/mintlify-publisher`, `/astro-publisher`
Publish to static site generators.

```bash
/docusaurus-publisher "guide.md"
/mintlify-publisher "guide.mdx"
/astro-publisher "article.md" --collection blog
```

### `/coolify-deployer`
Deploy applications to Coolify.

### `/openstack-manager`
Manage OpenStack VMs and infrastructure.

### `/configure`
Configure MyAIDev Method settings (CMS connections, visual APIs, etc).

### `/content-production-coordinator`
Batch content orchestration and multi-platform publishing.

### `/security-tester`, `/security-auditor`
Security penetration testing (PTES) and compliance auditing.

### Comprehensive Guide

For detailed publishing workflows and platform-specific guides, see **[PUBLISHING_GUIDE.md](PUBLISHING_GUIDE.md)**

## 🔧 MCP Server Integration

MyAIDev Method includes three optional MCP (Model Context Protocol) servers for advanced orchestration, testing, and WordPress integration.

### Available MCP Servers

**1. SPARC Orchestrator** - Workflow automation for the 5-phase SPARC methodology
- `sparc_orchestrate` - Orchestrate complete 5-phase workflows
- `sparc_status` - Get workflow execution status
- `sparc_phase_execute` - Execute single SPARC phases
- `sparc_workflow_history` - View workflow history
- `sparc_task_results` - Get detailed workflow results

**2. Chrome DevTools MCP** - Browser automation and testing ([chrome-devtools-mcp](https://github.com/ChromeDevTools/chrome-devtools-mcp))
- `cdp_connect` - Connect to Chrome DevTools Protocol
- `cdp_navigate` - Browser navigation
- `cdp_screenshot` - Visual testing with screenshots
- `cdp_evaluate` - Execute JavaScript in browser
- `cdp_network_monitor` - Monitor network requests
- `cdp_console_logs` - Capture console logs

**3. WordPress MCP** - Enhanced WordPress operations with session management
- Session management and memory persistence
- Health monitoring and site statistics
- Batch publishing operations
- Enhanced WordPress REST API integration

### Setup MCP Servers

Add to Claude Code MCP settings:

```bash
# SPARC Orchestrator
claude mcp add myaidev-sparc npx myaidev-sparc-orchestrator

# Chrome DevTools (requires separate installation)
npm install -g chrome-devtools-mcp
claude mcp add chrome-devtools npx chrome-devtools-mcp

# WordPress MCP
claude mcp add myaidev-wordpress npx myaidev-mcp-server
```

### Usage Example

```javascript
// Orchestrate complete SPARC workflow
mcp__myaidev_sparc__sparc_orchestrate({
  task: "Build user authentication system",
  strategy: "sequential",
  phases: ["architecture", "implementation", "testing", "review", "documentation"],
  options: {
    techStack: "nextjs,payloadcms,mongodb",
    testFramework: "jest",
    focusSecurity: true
  }
})
```

For detailed MCP setup and usage, see **[MCP_INTEGRATION.md](MCP_INTEGRATION.md)**

## ⚙️ Configuration

When installed as a **plugin**, skills are loaded automatically from the plugin's `skills/` directory.

When installed via **NPX**, skills are copied to your project:

```
.claude/
├── skills/            # Skills (SKILL.md files)
│   ├── content-writer/
│   ├── myaidev-architect/
│   └── ...
└── CLAUDE.md         # Project configuration file
```

## 🔌 WordPress Integration

### Setup WordPress Connection

1. **Create Application Password** in WordPress:
   - Go to WordPress Admin → Users → Your Profile
   - Find "Application Passwords" section
   - Enter a name for the application and click "Add New"
   - Copy the generated password

2. **Configure environment variables**:
   ```bash
   WORDPRESS_URL=https://your-wordpress-site.com
   WORDPRESS_USERNAME=your-username
   WORDPRESS_APP_PASSWORD=generated-password
   ```

3. **Test the connection**:
   ```bash
   /wordpress-publisher health-check
   ```

### WordPress MCP Features

- **Content Publishing**: Direct post creation and updates
- **Media Management**: Upload and organize media files
- **User Administration**: Manage users and roles
- **Plugin/Theme Management**: Install, update, activate/deactivate
- **Database Operations**: Optimization and cleanup
- **Security Scanning**: Vulnerability and malware detection

## 💻 SSH Integration

SSH integration enables advanced server-level WordPress administration. Claude Code can seamlessly use your existing SSH configuration.

### SSH Setup Options

#### Option 1: Use Existing SSH Keys (Recommended)
If you already have SSH keys configured:

```bash
# Claude Code will automatically use your SSH configuration
ssh user@your-server  # If this works, you're ready!

# Use in commands
/wordpress-publisher security-scan  # Will use SSH when available
```

#### Option 2: Specify SSH Details
For specific configurations, set environment variables:

```bash
SSH_HOST=your-server-ip
SSH_USERNAME=your-ssh-username
SSH_KEY_PATH=/home/user/.ssh/id_rsa  # Optional: specific key path
WORDPRESS_PATH=/var/www/html         # Optional: WordPress installation path
```

#### 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 use: `SSH_HOST=wordpress-server`

### SSH-Enabled Operations

When SSH access is available, the WordPress admin agent can perform:

- **File System Analysis**: Permission audits, malware scanning
- **Server Monitoring**: Resource usage, log analysis
- **Database Direct Access**: Advanced optimization operations  
- **Backup Operations**: Full site and database backups
- **Security Hardening**: File permission fixes, configuration updates
- **Performance Tuning**: Web server configuration, caching setup

### Security Considerations

- Use SSH keys instead of passwords when possible
- Limit SSH access to trusted IP addresses
- Regular audit of SSH access logs
- Use dedicated SSH users with minimal required permissions
- Keep SSH keys secure and rotated regularly

## 🎨 Customizing Skills

You can customize skill behavior by editing their SKILL.md files after installation.

### Content Writer Custom Rules (Recommended)

The content-writer skill supports custom content generation rules via a `content-rules.md` file. This is the **recommended approach** for customizing content creation without modifying the skill itself.

**Quick Start:**
```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:**
- Brand voice and tone
- Writing style preferences
- Formatting guidelines
- SEO requirements
- Required/optional content elements
- Topics to avoid
- Company-specific terminology

**Example content-rules.md:**
```markdown
# Content Generation Rules

## Brand Voice
- Use conversational, friendly tone
- Avoid jargon unless explaining technical concepts

## Formatting Preferences
- Keep paragraphs under 3 sentences
- Use numbered lists for sequential steps

## SEO Guidelines
- Target keyword density: 1-2%
- Include FAQ section for articles over 1000 words

## Required Elements
- Author bio at the end
- Call-to-action in conclusion
```

**Benefits:**
- ✅ No skill modification required
- ✅ Preserves skill updates when upgrading
- ✅ Easy to version control
- ✅ Project-specific customization
- ✅ Skill continues working if file doesn't exist

### Editing Skill Prompts

For deeper customization, edit SKILL.md files directly:

1. **Locate the skill file**:
   ```bash
   # If installed via plugin - edit in the plugin source
   skills/content-writer/SKILL.md

   # If installed via NPX - edit in your project
   .claude/skills/content-writer/SKILL.md
   ```

2. **Edit the skill configuration**:
   ```markdown
   ---
   name: content-writer
   description: Your custom description
   allowed-tools: [Read, Write, Edit, WebSearch, WebFetch, Task]
   ---

   Your custom skill prompt goes here...

   ## Custom Instructions
   - Add your specific requirements
   - Modify the writing style
   - Add industry-specific knowledge
   ```

3. **Restart Claude Code** to load the changes

### Skill File Structure

Each skill follows the SKILL.md standard:

```markdown
---
name: skill-name
description: Brief description of skill capabilities
allowed-tools: [Tool1, Tool2, Tool3]
argument-hint: "[args] [--flags]"
---

# Skill prompt content in Markdown

## Role Definition
Clear description of the skill's role and expertise.

## Process Workflow
Step-by-step process the skill should follow.

## Output Format
Specification of expected output format.
```

### Best Practices for Skill Customization

1. **Preserve YAML frontmatter**: Always keep the header configuration intact
2. **Test thoroughly**: Test customizations in a development environment first
3. **Version control**: Keep track of your customizations using git
4. **Backup originals**: Keep copies of original skill files before modification

## 🛒 Marketplace & Skill Tiers

MyAIDev Method provides two tiers of skills — open source community skills and premium cloud-hosted capabilities.

### Tier 1: Open Source Community Skills

Free, community-contributed skills distributed via the [MyAIDev Marketplace](https://github.com/myaione/myaidev-marketplace). Every skill is stringently curated, tested, and vetted for malware and quality through automated CI checks and manual maintainer review before it reaches users.

```bash
# Browse available skills
myaidev-method addon list
myaidev-method addon list --category security
myaidev-method addon list --sort downloads

# Search for skills
myaidev-method addon search "wordpress"

# Install a skill from the marketplace
myaidev-method addon install <skill-name>
myaidev-method addon install <skill-name> --project   # Install to project only
myaidev-method addon install <skill-name> --global     # Install globally

# Remove an installed skill
myaidev-method addon remove <skill-name>
```

Skills installed via the marketplace are placed in `.claude/skills/` (project) or `~/.claude/skills/` (global), making them immediately available to Claude Code.

### Tier 2: Premium Cloud-Hosted Skills

Advanced skills and tools provided by the MyAIDev platform via authenticated API calls. These are cloud-hosted, managed by the MyAIDev team, and offer premium capabilities beyond what open source skills provide.

Premium skills require authentication:

```bash
# Login to the MyAIDev platform (opens browser for OAuth)
myaidev-method login

# Check current authentication status
myaidev-method whoami

# Log out
myaidev-method logout
```

Once authenticated, premium skills are accessed via the platform API at `dev.myai1.ai` using your auth token.

### Tier Comparison

| | Open Source (Tier 1) | Premium Cloud (Tier 2) |
|---|---|---|
| **Cost** | Free | Subscription |
| **Source** | Community contributed | MyAIDev team |
| **Execution** | Local (your machine) | Cloud-hosted (server-side) |
| **Security** | Vetted via PR review + CI | Internal QA |
| **Offline** | Yes | No |
| **Customizable** | Yes (edit SKILL.md) | No (managed service) |
| **Updates** | Manual reinstall | Automatic via API |

## 📁 Project Structure

### Plugin Structure (source repository)

```
myaidev-method/
├── .claude-plugin/
│   └── plugin.json              # Plugin manifest
├── agents/                      # Publishing agents (invoked via Task tool)
│   ├── wordpress-publisher.md
│   ├── payloadcms-publisher.md
│   ├── astro-publisher.md
│   ├── docusaurus-publisher.md
│   └── mintlify-publisher.md
├── skills/                      # Discoverable skills
│   ├── company-config/
│   │   └── SKILL.md
│   ├── content-rules-config/
│   │   └── SKILL.md
│   ├── content-writer/
│   │   └── SKILL.md
│   ├── myaidev-architect/
│   │   └── SKILL.md
│   ├── myai-visual-generator/
│   │   └── SKILL.md
│   └── ...
├── src/
│   ├── mcp/                     # MCP servers (WordPress, OpenStack)
│   ├── lib/                     # Shared libraries
│   └── scripts/                 # CLI scripts
└── package.json
```

### Installed Structure (via NPX)

```
.claude/
├── skills/                      # Skills copied from plugin
│   ├── content-writer/
│   │   └── SKILL.md
│   ├── myaidev-architect/
│   │   └── SKILL.md
│   └── ...
└── CLAUDE.md                    # Project configuration
```

## 🔧 Environment Variables

### Required for WordPress Features

```bash
# WordPress Connection (Required)
WORDPRESS_URL=https://your-wordpress-site.com
WORDPRESS_USERNAME=your-admin-username  
WORDPRESS_APP_PASSWORD=your-application-password
```

### Optional SSH Configuration

```bash
# SSH Access (Optional - use existing SSH config if not specified)
SSH_HOST=your-server-ip-or-hostname
SSH_USERNAME=your-ssh-username
SSH_KEY_PATH=/path/to/private/key
SSH_PORT=22

# WordPress Server Configuration (Optional)
WORDPRESS_PATH=/var/www/html
```

### Optional Content Defaults

```bash
# Content Writer Defaults (Optional)
DEFAULT_WORD_COUNT=800
DEFAULT_POST_STATUS=draft
DEFAULT_TONE=professional
DEFAULT_AUDIENCE=general
```

### Environment File Setup

1. **Copy the example file**:
   ```bash
   cp .env.example .env
   ```

2. **Edit with your values**:
   ```bash
   nano .env  # or your preferred editor
   ```

3. **Secure the file**:
   ```bash
   chmod 600 .env  # Restrict access to owner only
   ```

## 💡 Examples

### Content Creation Workflow

```bash
# Create SEO-optimized blog post
/content-writer "10 Essential WordPress Security Tips" --word_count 1200 --seo_keywords "wordpress security,website protection,wp security tips"

# Create technical documentation  
/content-writer "API Integration Guide" --tone technical --audience developers --word_count 1500

# Create and publish to WordPress
/content-writer "Summer Marketing Strategies" --publish_to_wordpress true --tone professional
```

### WordPress Administration Workflow

```bash
# Daily health check routine
/wordpress-publisher health-check --comprehensive

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

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

# Maintenance workflow
/wordpress-publisher update-check
/wordpress-publisher plugin-manage --update-all --check-security
/wordpress-publisher content-cleanup --remove-spam
/wordpress-publisher backup-verify
```

### Content Publishing Workflow

```bash
# Create content locally
/content-writer "Guide to Remote Team Management" --word_count 1000

# Review and edit the generated content
# (Content is saved as markdown file)

# Publish to WordPress
/wordpress-publisher "guide-to-remote-team-management.md" --status draft

# Or publish immediately
/wordpress-publisher "guide-to-remote-team-management.md" --status publish
```

## 🔍 Troubleshooting

### Common Issues and Solutions

#### Skills Not Appearing in Claude Code

**Problem**: Skills don't appear in the `/` menu.

**Solutions**:
1. Ensure SKILL.md files are in `skills/<name>/SKILL.md` (plugin) or `.claude/skills/<name>/SKILL.md` (project)
2. Verify YAML frontmatter is valid
3. Restart Claude Code
4. If using plugin, ensure `plugin.json` has correct `"skills": "./skills/"` path

#### WordPress Connection Issues

**Problem**: Cannot connect to WordPress site.

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

2. **Check WordPress settings**:
   - Ensure REST API is enabled
   - Verify Application Password is created correctly
   - Check if site has HTTPS enabled

3. **Firewall/Security**:
   - Whitelist your IP address
   - Temporarily disable security plugins for testing
   - Check hosting provider restrictions

#### SSH Connection Problems

**Problem**: SSH operations fail or timeout.

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

2. **Check SSH configuration**:
   ```bash
   # Verify SSH config
   cat ~/.ssh/config
   
   # Check key permissions
   chmod 600 ~/.ssh/id_rsa
   chmod 644 ~/.ssh/id_rsa.pub
   ```

3. **Server-side checks**:
   - Verify SSH daemon is running
   - Check firewall rules (port 22)
   - Confirm user has necessary permissions

#### Skill Not Working as Expected

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

**Solutions**:
1. **Check skill file**:
   ```bash
   # Verify skill file exists and has correct format
   cat skills/content-writer/SKILL.md
   ```

2. **Validate YAML frontmatter**:
   - Ensure proper YAML syntax with `name` and `description`
   - Verify `allowed-tools` includes needed tools

3. **Restart Claude Code** to reload skill definitions

#### Performance Issues

**Problem**: Operations are slow or timeout.

**Solutions**:
1. **Optimize WordPress database**:
   ```bash
   /wordpress-publisher database-optimize
   ```

2. **Check server resources**:
   ```bash
   /wordpress-publisher resource-monitor
   ```

3. **Review error logs**:
   ```bash
   /wordpress-publisher error-analysis
   ```

### Debug Mode

Enable debug mode for detailed error information:

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

### Getting Help

1. **Check the logs**: Look for error messages in Claude Code output
2. **Test components individually**: Verify WordPress, SSH, and MCP connections separately
3. **Consult documentation**: Review Claude Code official documentation
4. **Community support**: Join Claude Code community forums
5. **GitHub issues**: Report bugs and request features on the repository

## 🤝 Contributing

We welcome contributions to improve MyAIDev Method!

### Contributing Skills to the Marketplace

The community is encouraged to contribute **Tier 1 open source skills** to the marketplace. All submissions are stringently curated — automated CI validates structure, scans for malware and security issues, and maintainers manually review for quality before any skill reaches users.

#### Quick Start: Using the Skill Contributor

Inside Claude Code, use the `/skill-contributor` skill for guided creation and submission:

```bash
# Interactive menu (choose create, submit, or status)
/skill-contributor

# Create a new skill from template
/skill-contributor create

# Validate and submit an existing skill
/skill-contributor submit

# Check submission status
/skill-contributor status
```

#### Manual Workflow: CLI Commands

```bash
# Step 1: Authenticate with the marketplace
npx myaidev-method login

# Step 2: Create a skill (interactive scaffolding)
npx myaidev-method addon submit
# If no SKILL.md exists, you'll be guided through creation

# Step 3: Validate your skill locally
npx myaidev-method addon validate --dir .claude/skills/my-skill

# Step 4: Submit for review (creates PR to marketplace)
npx myaidev-method addon submit --dir .claude/skills/my-skill

# Step 5: Check submission status
npx myaidev-method addon status
```

#### Skill Quality Requirements

Your skill must pass validation:
- **Frontmatter**: `name` (lowercase, hyphens), `description` (with "when to use" clause), `allowed-tools`
- **Content**: Start with H1, include workflow documentation, keep under 50KB
- **Security**: No credential paths, no destructive commands, no dynamic code execution

#### What Happens After Submission

1. **PR Created**: Your skill is submitted as a PR to [myaidev-marketplace](https://github.com/myaione/myaidev-marketplace)
2. **CI Validation**: Automated checks run on your SKILL.md
3. **Review**: Maintainers review for quality and security
4. **Merge & Publish**: Once approved, your skill is ingested into the marketplace
5. **Available**: Users can install via `npx myaidev-method addon install your-skill`

### How to Contribute (Code)

1. **Fork the repository**
2. **Create a feature branch**: `git checkout -b feature/new-agent`
3. **Make your changes**
4. **Test thoroughly**
5. **Submit a pull request**

### Contribution Ideas

- **New skills**: Create skills for different domains (code review, documentation, etc.)
- **Additional CLI support**: Add support for more AI CLI tools
- **Enhanced integrations**: Add support for other CMSs or platforms
- **Documentation improvements**: Help improve guides and examples
- **Bug fixes**: Fix issues and improve reliability

### Development Setup

```bash
# Clone the repository
git clone https://github.com/myaione/myaidev-method.git
cd myaidev-method

# Install dependencies
npm install

# Test locally without publishing
npm pack
cd /path/to/test-project
npm install /path/to/myaidev-method-0.0.1.tgz
npx myaidev-method@latest init --claude

# Or link for development
npm link
cd /path/to/test-project
npm link myaidev-method
npx myaidev-method@latest init --claude
```

## 📄 License

MIT License - see [LICENSE](LICENSE) file for details.

## 🙏 Acknowledgments

- **Anthropic** for Claude Code and the standards we follow
- **WordPress** for the robust REST API
- **Community contributors** who help improve this package

---

**Author**: Samuel Mukoti <samuelm@openmy.ai>

For questions, issues, or feature requests, please visit the [GitHub repository](https://github.com/myaione/myaidev-method).
