[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6ESX5088R3T5AA77NAEVRQC":3,"skill-same:01M6ESX5088R3T5AA77NAEVRQC":86},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":43,"commitSha":44,"skillDirectory":45,"forksCount":46,"repositoryHtmlUrl":47,"repositoryHomepageUrl":48,"ownerHtmlUrl":49,"ownerBlogUrl":6,"ownerDescription":50,"updatedAt":51,"install":52,"resources":65},"01M6ESX5088R3T5AA77NAEVRQC","when-using-flow-nexus-platform-use-flow-nexus-platform",null,"Comprehensive Flow Nexus platform management covering authentication, sandboxes, storage, databases, app deployment, payments, and monitoring. This SOP provides end-to-end platform operations.","ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",67,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fdnyoussef\u002Fwhen-using-flow-nexus-platform-use-flow-nexus-platform\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"when using flow nexus platform use flow nexus platform","flow nexus platform","flow","platform","Nexus","use","sop","sandboxes","app","end","databases","storage","operations","management","payments","monitoring","authentication","deployment","app deployment","2026-11-10 10:12:30",false,"---\nname: when-using-flow-nexus-platform-use-flow-nexus-platform\ndescription: Comprehensive Flow Nexus platform management covering authentication, sandboxes, storage, databases, app deployment, payments, and monitoring. This SOP provides end-to-end platform operations.\n---\n\n# Flow Nexus Platform Management SOP\n\n```yaml\nmetadata:\n  skill_name: when-using-flow-nexus-platform-use-flow-nexus-platform\n  version: 1.0.0\n  category: platform-integration\n  difficulty: intermediate\n  estimated_duration: 30-60 minutes\n  trigger_patterns:\n    - \"flow nexus platform\"\n    - \"manage flow nexus\"\n    - \"flow nexus authentication\"\n    - \"deploy to flow nexus\"\n    - \"flow nexus sandboxes\"\n  dependencies:\n    - flow-nexus MCP server\n    - Valid email for registration\n    - Claude Flow hooks\n  agents:\n    - cicd-engineer (infrastructure orchestrator)\n    - backend-dev (service integrator)\n    - system-architect (platform designer)\n  success_criteria:\n    - Authentication successful\n    - Services configured and running\n    - Application deployed\n    - Monitoring active\n    - Payment system operational\n```\n\n## Overview\n\nComprehensive Flow Nexus platform management covering authentication, sandboxes, storage, databases, app deployment, payments, and monitoring. This SOP provides end-to-end platform operations.\n\n## Prerequisites\n\n**Required:**\n- Flow Nexus MCP server installed\n- Valid email address\n- Internet connectivity\n\n**Optional:**\n- E2B API key for enhanced features\n- Anthropic API key for Claude Code sandboxes\n- Payment method for credits\n\n**Verification:**\n```bash\n# Check Flow Nexus MCP availability\nclaude mcp list | grep flow-nexus\n\n# Test connection\nnpx flow-nexus@latest --version\n```\n\n## Agent Responsibilities\n\n### cicd-engineer (Infrastructure Orchestrator)\n**Role:** Manage infrastructure, sandboxes, deployments, and CI\u002FCD pipelines\n\n**Expertise:**\n- Cloud infrastructure management\n- Container orchestration\n- Deployment automation\n- Resource optimization\n\n**Output:** Infrastructure configuration, deployment pipelines, monitoring setup\n\n### backend-dev (Service Integrator)\n**Role:** Integrate platform services, APIs, and business logic\n\n**Expertise:**\n- API integration\n- Service architecture\n- Database design\n- Authentication flows\n\n**Output:** Service integration code, API endpoints, database schemas\n\n### system-architect (Platform Designer)\n**Role:** Design platform architecture, scalability patterns, and system integration\n\n**Expertise:**\n- System architecture\n- Scalability patterns\n- Performance optimization\n- Security design\n\n**Output:** Architecture diagrams, technical specifications, integration patterns\n\n## Phase 1: Authentication Setup\n\n**Objective:** Register user, authenticate, verify access to platform services\n\n**Evidence-Based Validation:**\n- User registered successfully\n- Authentication token obtained\n- Session active and verified\n- User profile accessible\n\n**cicd-engineer Actions:**\n```bash\n# Pre-task coordination\nnpx claude-flow@alpha hooks pre-task --description \"Setup Flow Nexus authentication\"\n\n# Restore session\nnpx claude-flow@alpha hooks session-restore --session-id \"flow-nexus-setup-$(date +%s)\"\n\n# Check current authentication status\nmcp__flow-nexus__auth_status { \"detailed\": true }\n\n# If not authenticated, register new user\nmcp__flow-nexus__user_register {\n  \"email\": \"user@example.com\",\n  \"password\": \"SecurePassword123!\",\n  \"username\": \"platform_user\",\n  \"full_name\": \"Platform User\"\n}\n\n# Login to create session\nmcp__flow-nexus__user_login {\n  \"email\": \"user@example.com\",\n  \"password\": \"SecurePassword123!\"\n}\n\n# Store user ID in memory\nUSER_ID=\"[returned_user_id]\"\nnpx claude-flow@alpha memory store --key \"flow-nexus\u002Fuser-id\" --value \"$USER_ID\"\n\n# Get user profile\nmcp__flow-nexus__user_profile { \"user_id\": \"$USER_ID\" }\n\n# Store profile in memory\nnpx claude-flow@alpha memory store \\\n  --key \"flow-nexus\u002Fuser-profile\" \\\n  --value \"{\\\"user_id\\\": \\\"$USER_ID\\\", \\\"tier\\\": \\\"free\\\", \\\"timestamp\\\": \\\"$(date -Iseconds)\\\"}\"\n```\n\n**backend-dev Actions:**\n```bash\n# Create platform configuration\nmkdir -p platform\u002F{config,services,scripts,docs}\n\ncat > platform\u002Fconfig\u002Fflow-nexus.json \u003C\u003C 'EOF'\n{\n  \"platform\": \"flow-nexus\",\n  \"version\": \"1.0.0\",\n  \"authentication\": {\n    \"type\": \"email_password\",\n    \"session_timeout\": 3600\n  },\n  \"services\": {\n    \"sandboxes\": { \"enabled\": true, \"max_concurrent\": 5 },\n    \"storage\": { \"enabled\": true, \"max_size_mb\": 1000 },\n    \"databases\": { \"enabled\": true, \"max_connections\": 10 },\n    \"workflows\": { \"enabled\": true, \"max_agents\": 8 }\n  },\n  \"limits\": {\n    \"requests_per_minute\": 60,\n    \"storage_mb\": 1000,\n    \"compute_hours\": 10\n  }\n}\nEOF\n\n# Post-edit hook\nnpx claude-flow@alpha hooks post-edit --file \"platform\u002Fconfig\u002Fflow-nexus.json\" --memory-key \"flow-nexus\u002Fconfig\"\n```\n\n**system-architect Actions:**\n```bash\n# Document authentication flow\ncat > platform\u002Fdocs\u002FAUTHENTICATION.md \u003C\u003C 'EOF'\n# Flow Nexus Authentication\n\n## Overview\n\nFlow Nexus uses email\u002Fpassword authentication with JWT tokens for session management.\n\n## Authentication Flow\n\n1. **Registration**: Create new user account\n   - Email validation required\n   - Password complexity enforced\n   - Username unique constraint\n\n2. **Login**: Obtain authentication token\n   - Returns JWT token\n   - Token expires after 1 hour\n   - Refresh token available\n\n3. **Session Management**: Maintain active session\n   - Auto-refresh before expiry\n   - Logout clears session\n   - Multi-device support\n\n## Security Best Practices\n\n- Use strong passwords (min 12 characters)\n- Enable 2FA when available\n- Rotate tokens regularly\n- Never commit credentials to git\n\n## API Examples\n\n### Register\n```bash\nmcp__flow-nexus__user_register {\n  \"email\": \"user@example.com\",\n  \"password\": \"secure_password\"\n}\n```\n\n### Login\n```bash\nmcp__flow-nexus__user_login {\n  \"email\": \"user@example.com\",\n  \"password\": \"secure_password\"\n}\n```\n\n### Logout\n```bash\nmcp__flow-nexus__user_logout\n```\nEOF\n\n# Post-edit hook\nnpx claude-flow@alpha hooks post-edit --file \"platform\u002Fdocs\u002FAUTHENTICATION.md\" --memory-key \"flow-nexus\u002Fauth-docs\"\n```\n\n**Success Criteria:**\n- [ ] User registered successfully\n- [ ] Authentication token obtained\n- [ ] Configuration created\n- [ ] Documentation generated\n\n**Memory Persistence:**\n```bash\nnpx claude-flow@alpha memory store \\\n  --key \"flow-nexus\u002Fphase1-complete\" \\\n  --value \"{\\\"status\\\": \\\"complete\\\", \\\"user_id\\\": \\\"$USER_ID\\\", \\\"authenticated\\\": true, \\\"timestamp\\\": \\\"$(date -Iseconds)\\\"}\"\n```\n\n## Phase 2: Configure Services\n\n**Objective:** Setup sandboxes, storage, databases, and other platform services\n\n**Evidence-Based Validation:**\n- Sandboxes created and running\n- Storage buckets configured\n- Database connections established\n- Real-time subscriptions active\n\n**cicd-engineer Actions:**\n```bash\n# Retrieve user ID\nUSER_ID=$(npx claude-flow@alpha memory retrieve --key \"flow-nexus\u002Fuser-id\" | jq -r '.value')\n\n# Create sandbox for development\nmcp__flow-nexus__sandbox_create {\n  \"template\": \"node\",\n  \"name\": \"dev-sandbox\",\n  \"timeout\": 3600,\n  \"env_vars\": {\n    \"NODE_ENV\": \"development\",\n    \"LOG_LEVEL\": \"debug\"\n  },\n  \"install_packages\": [\"express\", \"axios\", \"dotenv\"]\n}\n\n# Store sandbox ID\nSANDBOX_ID=\"[returned_sandbox_id]\"\nnpx claude-flow@alpha memory store --key \"flow-nexus\u002Fsandbox-id\" --value \"$SANDBOX_ID\"\n\n# Configure sandbox with additional settings\nmcp__flow-nexus__sandbox_configure {\n  \"sandbox_id\": \"$SANDBOX_ID\",\n  \"env_vars\": {\n    \"API_URL\": \"https:\u002F\u002Fapi.flow-nexus.ruv.io\",\n    \"MAX_RETRIES\": \"3\"\n  },\n  \"install_packages\": [\"typescript\", \"jest\"]\n}\n\n# Create storage bucket\nmcp__flow-nexus__storage_upload {\n  \"bucket\": \"platform-assets\",\n  \"path\": \".gitkeep\",\n  \"content\": \"\"\n}\n\n# Setup real-time subscriptions\nmcp__flow-nexus__realtime_subscribe {\n  \"table\": \"workflows\",\n  \"event\": \"*\"\n}\n\n# Store subscription ID\nSUBSCRIPTION_ID=\"[returned_subscription_id]\"\nnpx claude-flow@alpha memory store --key \"flow-nexus\u002Fsubscription-id\" --value \"$SUBSCRIPTION_ID\"\n\n# Notify completion\nnpx claude-flow@alpha hooks notify --message \"Services configured: sandbox, storage, real-time subscriptions\"\n```\n\n**backend-dev Actions:**\n```bash\n# Create service initialization script\ncat > platform\u002Fscripts\u002Finit-services.js \u003C\u003C 'EOF'\nconst { exec } = require('child_process');\nconst util = require('util');\nconst execPromise = util.promisify(exec);\n\nasync function initializeSandbox() {\n  console.log('Initializing sandbox...');\n  \u002F\u002F Sandbox initialization logic\n  return { status: 'success', sandbox_id: process.env.SANDBOX_ID };\n}\n\nasync function initializeStorage() {\n  console.log('Initializing storage...');\n  \u002F\u002F Storage setup logic\n  return { status: 'success', bucket: 'platform-assets' };\n}\n\nasync function initializeDatabase() {\n  console.log('Initializing database...');\n  \u002F\u002F Database connection logic\n  return { status: 'success', connected: true };\n}\n\nasync function main() {\n  try {\n    const sandbox = await initializeSandbox();\n    const storage = await initializeStorage();\n    const database = await initializeDatabase();\n\n    console.log('All services initialized successfully:', {\n      sandbox,\n      storage,\n      database\n    });\n  } catch (error) {\n    console.error('Service initialization failed:', error);\n    process.exit(1);\n  }\n}\n\nmain();\nEOF\n\n# Post-edit hook\nnpx claude-flow@alpha hooks post-edit --file \"platform\u002Fscripts\u002Finit-services.js\" --memory-key \"flow-nexus\u002Finit-script\"\n\n# Create database schema\ncat > platform\u002Fconfig\u002Fschema.sql \u003C\u003C 'EOF'\n-- Flow Nexus Platform Schema\n\nCREATE TABLE IF NOT EXISTS applications (\n  id UUID PRIMARY KEY DEFAULT gen_random_uuid(),\n  user_id UUID NOT NULL,\n  name VARCHAR(255) NOT NULL,\n  description TEXT,\n  status VARCHAR(50) DEFAULT 'active',\n  created_at TIMESTAMP DEFAULT NOW(),\n  updated_at TIMESTAMP DEFAULT NOW()\n);\n\nCREATE TABLE IF NOT EXISTS deployments (\n  id UUID PRIMARY KEY DEFAULT gen_random_uuid(),\n  application_id UUID REFERENCES applications(id),\n  version VARCHAR(50) NOT NULL,\n  sandbox_id VARCHAR(255),\n  status VARCHAR(50) DEFAULT 'pending',\n  created_at TIMESTAMP DEFAULT NOW()\n);\n\nCREATE TABLE IF NOT EXISTS metrics (\n  id UUID PRIMARY KEY DEFAULT gen_random_uuid(),\n  deployment_id UUID REFERENCES deployments(id),\n  metric_type VARCHAR(100),\n  metric_value JSONB,\n  recorded_at TIMESTAMP DEFAULT NOW()\n);\n\nCREATE INDEX idx_applications_user_id ON applications(user_id);\nCREATE INDEX idx_deployments_app_id ON deployments(application_id);\nCREATE INDEX idx_metrics_deployment_id ON metrics(deployment_id);\nEOF\n\n# Post-edit hook\nnpx claude-flow@alpha hooks post-edit --file \"platform\u002Fconfig\u002Fschema.sql\" --memory-key \"flow-nexus\u002Fschema\"\n```\n\n**system-architect Actions:**\n```bash\n# Document service architecture\ncat > platform\u002Fdocs\u002FARCHITECTURE.md \u003C\u003C 'EOF'\n# Flow Nexus Platform Architecture\n\n## System Components\n\n### 1. Sandboxes (E2B)\n- Isolated code execution environments\n- Multiple templates (Node.js, Python, React)\n- Resource limits enforced\n- Environment variable support\n\n### 2. Storage\n- Object storage for files\n- Bucket-based organization\n- Public URL generation\n- File upload\u002Fdownload APIs\n\n### 3. Databases\n- PostgreSQL with Supabase\n- Real-time subscriptions\n- Row-level security\n- Connection pooling\n\n### 4. Workflows\n- Event-driven processing\n- Agent coordination\n- Task orchestration\n- Message queue integration\n\n## Service Integration\n\n```\n┌─────────────────────────────────────────┐\n│         Flow Nexus Platform             │\n├─────────────────────────────────────────┤\n│                                         │\n│  ┌──────────┐  ┌──────────┐           │\n│  │ Sandboxes│  │ Storage  │           │\n│  │  (E2B)   │  │(Supabase)│           │\n│  └────┬─────┘  └────┬─────┘           │\n│       │             │                  │\n│  ┌────▼─────────────▼─────┐           │\n│  │    Event Bus            │           │\n│  │  (Real-time sync)       │           │\n│  └────┬────────────────────┘           │\n│       │                                │\n│  ┌────▼─────┐  ┌──────────┐           │\n│  │ Workflows│  │Databases │           │\n│  │ (Claude  │  │(Postgres)│           │\n│  │  Flow)   │  │          │           │\n│  └──────────┘  └──────────┘           │\n└─────────────────────────────────────────┘\n```\n\n## Scalability Patterns\n\n1. **Horizontal Scaling**: Add more sandboxes\n2. **Vertical Scaling**: Increase sandbox resources\n3. **Load Balancing**: Distribute across regions\n4. **Caching**: Redis for frequently accessed data\n5. **CDN**: Static asset delivery\n\n## Security Measures\n\n- Authentication required for all operations\n- API rate limiting enforced\n- Sandbox isolation with network controls\n- Encrypted data at rest and in transit\n- Audit logging for all actions\nEOF\n\n# Post-edit hook\nnpx claude-flow@alpha hooks post-edit --file \"platform\u002Fdocs\u002FARCHITECTURE.md\" --memory-key \"flow-nexus\u002Farchitecture\"\n```\n\n**Success Criteria:**\n- [ ] Sandbox created and configured\n- [ ] Storage bucket initialized\n- [ ] Database schema applied\n- [ ] Real-time subscriptions active\n\n**Memory Persistence:**\n```bash\nnpx claude-flow@alpha memory store \\\n  --key \"flow-nexus\u002Fphase2-complete\" \\\n  --value \"{\\\"status\\\": \\\"complete\\\", \\\"sandbox_id\\\": \\\"$SANDBOX_ID\\\", \\\"subscription_id\\\": \\\"$SUBSCRIPTION_ID\\\", \\\"timestamp\\\": \\\"$(date -Iseconds)\\\"}\"\n```\n\n## Phase 3: Deploy Applications\n\n**Objective:** Deploy applications using templates or custom configurations\n\n**Evidence-Based Validation:**\n- Application deployed successfully\n- Health checks passing\n- Metrics being collected\n- Public URL accessible\n\n**cicd-engineer Actions:**\n```bash\n# List available templates\nmcp__flow-nexus__template_list {\n  \"category\": \"web\",\n  \"limit\": 10\n}\n\n# Deploy from template\nmcp__flow-nexus__template_deploy {\n  \"template_name\": \"nextjs-starter\",\n  \"deployment_name\": \"my-nextjs-app\",\n  \"variables\": {\n    \"anthropic_api_key\": \"$ANTHROPIC_API_KEY\",\n    \"app_name\": \"My Next.js App\",\n    \"port\": \"3000\"\n  },\n  \"env_vars\": {\n    \"NODE_ENV\": \"production\",\n    \"DATABASE_URL\": \"$DATABASE_URL\"\n  }\n}\n\n# Store deployment ID\nDEPLOYMENT_ID=\"[returned_deployment_id]\"\nnpx claude-flow@alpha memory store --key \"flow-nexus\u002Fdeployment-id\" --value \"$DEPLOYMENT_ID\"\n\n# Subscribe to execution stream\nmcp__flow-nexus__execution_stream_subscribe {\n  \"deployment_id\": \"$DEPLOYMENT_ID\",\n  \"stream_type\": \"claude-code\"\n}\n\n# Monitor deployment status\nfor i in {1..10}; do\n  sleep 10\n  mcp__flow-nexus__execution_stream_status {\n    \"stream_id\": \"$DEPLOYMENT_ID\"\n  }\ndone\n\n# Notify deployment completion\nnpx claude-flow@alpha hooks notify --message \"Application deployed successfully: $DEPLOYMENT_ID\"\n```\n\n**backend-dev Actions:**\n```bash\n# Create custom application deployment script\ncat > platform\u002Fscripts\u002Fdeploy-app.sh \u003C\u003C 'EOF'\n#!\u002Fbin\u002Fbash\nset -e\n\nAPP_NAME=\"${1:-my-app}\"\nSANDBOX_ID=\"${2:-$SANDBOX_ID}\"\n\necho \"Deploying $APP_NAME to sandbox $SANDBOX_ID...\"\n\n# Upload application files\necho \"Uploading files...\"\nmcp__flow-nexus__sandbox_upload \\\n  --sandbox_id=\"$SANDBOX_ID\" \\\n  --file_path=\"app.js\" \\\n  --content=\"$(cat platform\u002Fservices\u002Fapp.js)\"\n\n# Execute startup script\necho \"Starting application...\"\nmcp__flow-nexus__sandbox_execute \\\n  --sandbox_id=\"$SANDBOX_ID\" \\\n  --code=\"npm start\" \\\n  --timeout=300\n\necho \"Application deployed successfully!\"\necho \"Access logs: mcp__flow-nexus__sandbox_logs --sandbox_id=$SANDBOX_ID\"\nEOF\n\nchmod +x platform\u002Fscripts\u002Fdeploy-app.sh\n\n# Create sample application\ncat > platform\u002Fservices\u002Fapp.js \u003C\u003C 'EOF'\nconst express = require('express');\nconst app = express();\nconst port = process.env.PORT || 3000;\n\napp.use(express.json());\n\napp.get('\u002Fhealth', (req, res) => {\n  res.json({\n    status: 'healthy',\n    timestamp: new Date().toISOString(),\n    uptime: process.uptime()\n  });\n});\n\napp.get('\u002Fapi\u002Finfo', (req, res) => {\n  res.json({\n    name: 'Flow Nexus Platform App',\n    version: '1.0.0',\n    environment: process.env.NODE_ENV\n  });\n});\n\napp.listen(port, () => {\n  console.log(`Server running on port ${port}`);\n});\nEOF\n\n# Post-edit hooks\nnpx claude-flow@alpha hooks post-edit --file \"platform\u002Fscripts\u002Fdeploy-app.sh\" --memory-key \"flow-nexus\u002Fdeploy-script\"\nnpx claude-flow@alpha hooks post-edit --file \"platform\u002Fservices\u002Fapp.js\" --memory-key \"flow-nexus\u002Fapp\"\n```\n\n**system-architect Actions:**\n```bash\n# Document deployment process\ncat > platform\u002Fdocs\u002FDEPLOYMENT.md \u003C\u003C 'EOF'\n# Application Deployment Guide\n\n## Deployment Methods\n\n### 1. Template Deployment\nUse pre-built templates for quick setup:\n```bash\nmcp__flow-nexus__template_deploy {\n  \"template_name\": \"nextjs-starter\",\n  \"deployment_name\": \"my-app\"\n}\n```\n\n### 2. Custom Deployment\nDeploy custom applications:\n```bash\n.\u002Fplatform\u002Fscripts\u002Fdeploy-app.sh my-app $SANDBOX_ID\n```\n\n## Deployment Workflow\n\n1. **Prepare**: Build and test locally\n2. **Upload**: Transfer files to sandbox\n3. **Configure**: Set environment variables\n4. **Execute**: Start application\n5. **Monitor**: Track health and metrics\n6. **Scale**: Adjust resources as needed\n\n## Health Monitoring\n\nCheck application health:\n```bash\ncurl http:\u002F\u002Flocalhost:3000\u002Fhealth\n```\n\nExpected response:\n```json\n{\n  \"status\": \"healthy\",\n  \"timestamp\": \"2025-10-30T12:00:00Z\",\n  \"uptime\": 3600\n}\n```\n\n## Troubleshooting\n\n### Application Not Starting\n- Check sandbox logs\n- Verify environment variables\n- Ensure dependencies installed\n- Check port availability\n\n### Health Check Failing\n- Verify application is running\n- Check network connectivity\n- Review error logs\n- Test locally first\n\n### Performance Issues\n- Monitor resource usage\n- Check database connections\n- Review application logs\n- Consider scaling up\nEOF\n\n# Post-edit hook\nnpx claude-flow@alpha hooks post-edit --file \"platform\u002Fdocs\u002FDEPLOYMENT.md\" --memory-key \"flow-nexus\u002Fdeployment-docs\"\n```\n\n**Success Criteria:**\n- [ ] Application deployed from template\n- [ ] Custom deployment script created\n- [ ] Health checks configured\n- [ ] Documentation completed\n\n**Memory Persistence:**\n```bash\nnpx claude-flow@alpha memory store \\\n  --key \"flow-nexus\u002Fphase3-complete\" \\\n  --value \"{\\\"status\\\": \\\"complete\\\", \\\"deployment_id\\\": \\\"$DEPLOYMENT_ID\\\", \\\"app_running\\\": true, \\\"timestamp\\\": \\\"$(date -Iseconds)\\\"}\"\n```\n\n## Phase 4: Manage Operations\n\n**Objective:** Monitor applications, manage resources, handle scaling and updates\n\n**Evidence-Based Validation:**\n- Monitoring dashboards active\n- Metrics being collected\n- Alerts configured\n- Scaling policies defined\n\n**cicd-engineer Actions:**\n```bash\n# Get system health\nmcp__flow-nexus__system_health\n\n# Check sandbox status\nSANDBOX_ID=$(npx claude-flow@alpha memory retrieve --key \"flow-nexus\u002Fsandbox-id\" | jq -r '.value')\nmcp__flow-nexus__sandbox_status { \"sandbox_id\": \"$SANDBOX_ID\" }\n\n# Get sandbox logs\nmcp__flow-nexus__sandbox_logs {\n  \"sandbox_id\": \"$SANDBOX_ID\",\n  \"lines\": 100\n}\n\n# List execution files\nDEPLOYMENT_ID=$(npx claude-flow@alpha memory retrieve --key \"flow-nexus\u002Fdeployment-id\" | jq -r '.value')\nmcp__flow-nexus__execution_files_list {\n  \"stream_id\": \"$DEPLOYMENT_ID\",\n  \"created_by\": \"claude-code\"\n}\n\n# Get audit log\nUSER_ID=$(npx claude-flow@alpha memory retrieve --key \"flow-nexus\u002Fuser-id\" | jq -r '.value')\nmcp__flow-nexus__audit_log {\n  \"user_id\": \"$USER_ID\",\n  \"limit\": 50\n}\n\n# Store monitoring data\nnpx claude-flow@alpha memory store \\\n  --key \"flow-nexus\u002Fmonitoring\" \\\n  --value \"{\\\"health\\\": \\\"good\\\", \\\"sandbox_status\\\": \\\"running\\\", \\\"log_lines\\\": 100, \\\"timestamp\\\": \\\"$(date -Iseconds)\\\"}\"\n```\n\n**backend-dev Actions:**\n```bash\n# Create monitoring dashboard configuration\ncat > platform\u002Fconfig\u002Fmonitoring.json \u003C\u003C 'EOF'\n{\n  \"dashboards\": {\n    \"main\": {\n      \"panels\": [\n        {\n          \"title\": \"Application Health\",\n          \"type\": \"status\",\n          \"metrics\": [\"uptime\", \"response_time\", \"error_rate\"]\n        },\n        {\n          \"title\": \"Resource Usage\",\n          \"type\": \"timeseries\",\n          \"metrics\": [\"cpu_usage\", \"memory_usage\", \"disk_usage\"]\n        },\n        {\n          \"title\": \"Request Metrics\",\n          \"type\": \"counter\",\n          \"metrics\": [\"requests_total\", \"requests_per_second\"]\n        }\n      ]\n    }\n  },\n  \"alerts\": {\n    \"high_error_rate\": {\n      \"threshold\": 0.05,\n      \"window\": \"5m\",\n      \"severity\": \"critical\"\n    },\n    \"high_latency\": {\n      \"threshold\": 1000,\n      \"window\": \"5m\",\n      \"severity\": \"warning\"\n    },\n    \"resource_exhaustion\": {\n      \"threshold\": 0.9,\n      \"window\": \"10m\",\n      \"severity\": \"critical\"\n    }\n  }\n}\nEOF\n\n# Create operations utility script\ncat > platform\u002Fscripts\u002Fops-util.sh \u003C\u003C 'EOF'\n#!\u002Fbin\u002Fbash\n\nCMD=\"${1:-help}\"\nSANDBOX_ID=\"${SANDBOX_ID:-$(npx claude-flow@alpha memory retrieve --key flow-nexus\u002Fsandbox-id | jq -r '.value')}\"\n\ncase \"$CMD\" in\n  status)\n    echo \"Getting system status...\"\n    mcp__flow-nexus__system_health\n    ;;\n  logs)\n    echo \"Fetching logs for sandbox $SANDBOX_ID...\"\n    mcp__flow-nexus__sandbox_logs --sandbox_id=\"$SANDBOX_ID\" --lines=50\n    ;;\n  restart)\n    echo \"Restarting sandbox $SANDBOX_ID...\"\n    mcp__flow-nexus__sandbox_stop --sandbox_id=\"$SANDBOX_ID\"\n    sleep 5\n    .\u002Fplatform\u002Fscripts\u002Fdeploy-app.sh\n    ;;\n  scale)\n    REPLICAS=\"${2:-2}\"\n    echo \"Scaling to $REPLICAS replicas...\"\n    # Scaling logic here\n    ;;\n  help)\n    echo \"Usage: $0 {status|logs|restart|scale}\"\n    ;;\n  *)\n    echo \"Unknown command: $CMD\"\n    exit 1\n    ;;\nesac\nEOF\n\nchmod +x platform\u002Fscripts\u002Fops-util.sh\n\n# Post-edit hooks\nnpx claude-flow@alpha hooks post-edit --file \"platform\u002Fconfig\u002Fmonitoring.json\" --memory-key \"flow-nexus\u002Fmonitoring-config\"\nnpx claude-flow@alpha hooks post-edit --file \"platform\u002Fscripts\u002Fops-util.sh\" --memory-key \"flow-nexus\u002Fops-util\"\n```\n\n**system-architect Actions:**\n```bash\n# Document operations procedures\ncat > platform\u002Fdocs\u002FOPERATIONS.md \u003C\u003C 'EOF'\n# Operations Guide\n\n## Monitoring\n\n### Health Checks\n```bash\n# System health\nmcp__flow-nexus__system_health\n\n# Sandbox status\nmcp__flow-nexus__sandbox_status --sandbox_id=$SANDBOX_ID\n\n# Application health\ncurl http:\u002F\u002Flocalhost:3000\u002Fhealth\n```\n\n### Logs\n```bash\n# View sandbox logs\nmcp__flow-nexus__sandbox_logs --sandbox_id=$SANDBOX_ID --lines=100\n\n# Stream logs in real-time\n.\u002Fplatform\u002Fscripts\u002Fops-util.sh logs\n```\n\n### Metrics\n- **CPU Usage**: Track compute utilization\n- **Memory Usage**: Monitor memory consumption\n- **Request Rate**: Requests per second\n- **Error Rate**: Failed requests percentage\n- **Latency**: Response time (p50, p95, p99)\n\n## Scaling\n\n### Manual Scaling\n```bash\n# Scale up\n.\u002Fplatform\u002Fscripts\u002Fops-util.sh scale 3\n\n# Scale down\n.\u002Fplatform\u002Fscripts\u002Fops-util.sh scale 1\n```\n\n### Auto-scaling Policies\n- Scale up when CPU >80% for 5 minutes\n- Scale down when CPU \u003C20% for 10 minutes\n- Min replicas: 1\n- Max replicas: 10\n\n## Incident Response\n\n### High Error Rate\n1. Check application logs\n2. Review recent deployments\n3. Verify external dependencies\n4. Rollback if necessary\n\n### Performance Degradation\n1. Check resource usage\n2. Review database queries\n3. Analyze slow endpoints\n4. Scale resources if needed\n\n### Service Outage\n1. Check system health\n2. Verify sandbox status\n3. Restart application\n4. Escalate if persists\n\n## Maintenance\n\n### Updates\n```bash\n# Update dependencies\nmcp__flow-nexus__sandbox_configure \\\n  --sandbox_id=$SANDBOX_ID \\\n  --install_packages=[\"package@latest\"]\n\n# Restart application\n.\u002Fplatform\u002Fscripts\u002Fops-util.sh restart\n```\n\n### Backups\n- Automated daily backups\n- 30-day retention\n- Point-in-time recovery available\nEOF\n\n# Post-edit hook\nnpx claude-flow@alpha hooks post-edit --file \"platform\u002Fdocs\u002FOPERATIONS.md\" --memory-key \"flow-nexus\u002Fops-docs\"\n```\n\n**Success Criteria:**\n- [ ] Monitoring configured\n- [ ] Logs accessible\n- [ ] Operations utilities created\n- [ ] Incident procedures documented\n\n**Memory Persistence:**\n```bash\nnpx claude-flow@alpha memory store \\\n  --key \"flow-nexus\u002Fphase4-complete\" \\\n  --value \"{\\\"status\\\": \\\"complete\\\", \\\"monitoring\\\": \\\"active\\\", \\\"ops_tools\\\": \\\"ready\\\", \\\"timestamp\\\": \\\"$(date -Iseconds)\\\"}\"\n```\n\n## Phase 5: Handle Payments\n\n**Objective:** Manage credits, configure auto-refill, track usage and billing\n\n**Evidence-Based Validation:**\n- Credit balance retrieved\n- Payment history accessible\n- Auto-refill configured\n- Usage tracking active\n\n**cicd-engineer Actions:**\n```bash\n# Check credit balance\nmcp__flow-nexus__check_balance\n\n# Store balance\nBALANCE=\"[returned_balance]\"\nnpx claude-flow@alpha memory store --key \"flow-nexus\u002Fbalance\" --value \"$BALANCE\"\n\n# Get payment history\nmcp__flow-nexus__get_payment_history { \"limit\": 20 }\n\n# Configure auto-refill\nmcp__flow-nexus__configure_auto_refill {\n  \"enabled\": true,\n  \"threshold\": 10,\n  \"amount\": 50\n}\n\n# Get user statistics\nUSER_ID=$(npx claude-flow@alpha memory retrieve --key \"flow-nexus\u002Fuser-id\" | jq -r '.value')\nmcp__flow-nexus__user_stats { \"user_id\": \"$USER_ID\" }\n\n# Notify configuration complete\nnpx claude-flow@alpha hooks notify --message \"Payment system configured with auto-refill\"\n```\n\n**backend-dev Actions:**\n```bash\n# Create billing utility script\ncat > platform\u002Fscripts\u002Fbilling-util.sh \u003C\u003C 'EOF'\n#!\u002Fbin\u002Fbash\n\nCMD=\"${1:-balance}\"\n\ncase \"$CMD\" in\n  balance)\n    echo \"Checking credit balance...\"\n    mcp__flow-nexus__check_balance\n    ;;\n  history)\n    LIMIT=\"${2:-10}\"\n    echo \"Fetching payment history (last $LIMIT transactions)...\"\n    mcp__flow-nexus__get_payment_history --limit=$LIMIT\n    ;;\n  refill)\n    AMOUNT=\"${2:-50}\"\n    echo \"Creating payment link for $$AMOUNT...\"\n    mcp__flow-nexus__create_payment_link --amount=$AMOUNT\n    ;;\n  auto-refill)\n    ACTION=\"${2:-status}\"\n    if [ \"$ACTION\" = \"enable\" ]; then\n      THRESHOLD=\"${3:-10}\"\n      AMOUNT=\"${4:-50}\"\n      mcp__flow-nexus__configure_auto_refill \\\n        --enabled=true \\\n        --threshold=$THRESHOLD \\\n        --amount=$AMOUNT\n    elif [ \"$ACTION\" = \"disable\" ]; then\n      mcp__flow-nexus__configure_auto_refill --enabled=false\n    else\n      echo \"Current auto-refill status:\"\n      mcp__flow-nexus__check_balance | jq '.auto_refill'\n    fi\n    ;;\n  help)\n    echo \"Usage: $0 {balance|history|refill|auto-refill}\"\n    ;;\n  *)\n    echo \"Unknown command: $CMD\"\n    exit 1\n    ;;\nesac\nEOF\n\nchmod +x platform\u002Fscripts\u002Fbilling-util.sh\n\n# Post-edit hook\nnpx claude-flow@alpha hooks post-edit --file \"platform\u002Fscripts\u002Fbilling-util.sh\" --memory-key \"flow-nexus\u002Fbilling-util\"\n\n# Post-task hook\nnpx claude-flow@alpha hooks post-task --task-id \"flow-nexus-platform-setup\"\n```\n\n**system-architect Actions:**\n```bash\n# Document billing and payments\ncat > platform\u002Fdocs\u002FBILLING.md \u003C\u003C 'EOF'\n# Billing and Payments Guide\n\n## Credits System\n\nFlow Nexus uses a credit-based billing system:\n- Credits deducted for resource usage\n- Minimum purchase: $10\n- Auto-refill available\n\n## Usage Costs\n\n### Sandboxes\n- $0.01 per minute (Node.js, Python)\n- $0.02 per minute (React, Next.js)\n- Free tier: 100 minutes\u002Fmonth\n\n### Storage\n- $0.10 per GB\u002Fmonth\n- Free tier: 1 GB\n\n### Workflows\n- $0.001 per task execution\n- Free tier: 1000 tasks\u002Fmonth\n\n### Neural Training\n- Nano: $0.05\u002Fhour\n- Small: $0.15\u002Fhour\n- Medium: $0.50\u002Fhour\n- Large: $2.00\u002Fhour\n\n## Managing Credits\n\n### Check Balance\n```bash\n.\u002Fplatform\u002Fscripts\u002Fbilling-util.sh balance\n```\n\n### View History\n```bash\n.\u002Fplatform\u002Fscripts\u002Fbilling-util.sh history 20\n```\n\n### Add Credits\n```bash\n.\u002Fplatform\u002Fscripts\u002Fbilling-util.sh refill 50\n```\n\n### Auto-Refill\n\nEnable automatic credit refills:\n```bash\n.\u002Fplatform\u002Fscripts\u002Fbilling-util.sh auto-refill enable 10 50\n```\n\nThis will automatically add $50 credits when balance falls below $10.\n\nDisable auto-refill:\n```bash\n.\u002Fplatform\u002Fscripts\u002Fbilling-util.sh auto-refill disable\n```\n\n## Cost Optimization\n\n1. **Stop Unused Sandboxes**: Reduce compute costs\n2. **Clean Up Storage**: Remove old files\n3. **Optimize Workflows**: Reduce task executions\n4. **Use Free Tier**: Stay within limits when possible\n5. **Monitor Usage**: Track spending regularly\n\n## Billing Alerts\n\nConfigure alerts for:\n- Low balance warnings\n- High usage notifications\n- Monthly spending limits\n- Budget thresholds\n\n## Payment Methods\n\nSupported payment methods:\n- Credit\u002FDebit Cards\n- PayPal\n- Wire Transfer (enterprise)\n\n## Invoices\n\nAccess invoices:\n```bash\nmcp__flow-nexus__get_payment_history --limit=12\n```\n\nInvoices include:\n- Transaction date\n- Amount charged\n- Credits purchased\n- Usage details\nEOF\n\n# Post-edit hook\nnpx claude-flow@alpha hooks post-edit --file \"platform\u002Fdocs\u002FBILLING.md\" --memory-key \"flow-nexus\u002Fbilling-docs\"\n\n# Session end hook\nnpx claude-flow@alpha hooks session-end --export-metrics true\n```\n\n**Success Criteria:**\n- [ ] Credit balance checked\n- [ ] Payment history retrieved\n- [ ] Auto-refill configured\n- [ ] Billing utilities created\n- [ ] Documentation completed\n\n**Memory Persistence:**\n```bash\nnpx claude-flow@alpha memory store \\\n  --key \"flow-nexus\u002Fphase5-complete\" \\\n  --value \"{\\\"status\\\": \\\"complete\\\", \\\"balance\\\": $BALANCE, \\\"auto_refill\\\": true, \\\"timestamp\\\": \\\"$(date -Iseconds)\\\"}\"\n\n# Final workflow summary\nnpx claude-flow@alpha memory store \\\n  --key \"flow-nexus\u002Fworkflow-complete\" \\\n  --value \"{\\\"status\\\": \\\"success\\\", \\\"authenticated\\\": true, \\\"deployed\\\": true, \\\"monitored\\\": true, \\\"billing\\\": \\\"configured\\\", \\\"timestamp\\\": \\\"$(date -Iseconds)\\\"}\"\n```\n\n## Workflow Summary\n\n**Total Estimated Duration:** 30-60 minutes\n\n**Phase Breakdown:**\n1. Authentication Setup: 5-10 minutes\n2. Configure Services: 10-15 minutes\n3. Deploy Applications: 10-15 minutes\n4. Manage Operations: 5-10 minutes\n5. Handle Payments: 5-10 minutes\n\n**Key Deliverables:**\n- Authenticated user account\n- Configured platform services\n- Deployed application\n- Operations utilities\n- Billing management\n- Complete documentation\n\n## Evidence-Based Success Metrics\n\n**Authentication:**\n- User registered and verified\n- Session token obtained\n- Profile accessible\n\n**Services:**\n- Sandbox running\n- Storage configured\n- Database connected\n- Real-time subscriptions active\n\n**Deployment:**\n- Application deployed\n- Health checks passing\n- Logs accessible\n\n**Operations:**\n- Monitoring active\n- Metrics collected\n- Utilities functional\n\n**Billing:**\n- Balance checked\n- Auto-refill configured\n- Usage tracked\n\n## Troubleshooting\n\n**Authentication Failures:**\n- Verify email and password\n- Check network connectivity\n- Clear browser cache\n- Try password reset\n\n**Sandbox Issues:**\n- Check sandbox status\n- Review logs for errors\n- Verify environment variables\n- Ensure sufficient credits\n\n**Deployment Failures:**\n- Validate template configuration\n- Check file permissions\n- Verify dependencies\n- Review error messages\n\n**Payment Problems:**\n- Verify payment method\n- Check credit balance\n- Review transaction history\n- Contact support if needed\n\n## Best Practices\n\n1. **Security**: Never commit credentials\n2. **Monitoring**: Enable comprehensive logging\n3. **Backups**: Regular data backups\n4. **Updates**: Keep dependencies current\n5. **Testing**: Test before production\n6. **Documentation**: Maintain up-to-date docs\n7. **Optimization**: Monitor and optimize costs\n8. **Support**: Use audit logs for debugging\n\n## References\n\n- Flow Nexus Platform: https:\u002F\u002Fflow-nexus.ruv.io\n- API Documentation: https:\u002F\u002Fflow-nexus.ruv.io\u002Fdocs\n- Pricing: https:\u002F\u002Fflow-nexus.ruv.io\u002Fpricing\n- Support: https:\u002F\u002Fflow-nexus.ruv.io\u002Fsupport\n","# Flow Nexus Platform Management SOP\n\n```yaml\nmetadata:\n  skill_name: when-using-flow-nexus-platform-use-flow-nexus-platform\n  version: 1.0.0\n  category: platform-integration\n  difficulty: intermediate\n  estimated_duration: 30-60 minutes\n  trigger_patterns:\n    - \"flow nexus platform\"\n    - \"manage flow nexus\"\n    - \"flow nexus authentication\"\n    - \"deploy to flow nexus\"\n    - \"flow nexus sandboxes\"\n  dependencies:\n    - flow-nexus MCP server\n    - Valid email for registration\n    - Claude Flow hooks\n  agents:\n    - cicd-engineer (infrastructure orchestrator)\n    - backend-dev (service integrator)\n    - system-architect (platform designer)\n  success_criteria:\n    - Authentication successful\n    - Services configured and running\n    - Application deployed\n    - Monitoring active\n    - Payment system operational\n```\n\n## Overview\n\nComprehensive Flow Nexus platform management covering authentication, sandboxes, storage, databases, app deployment, payments, and monitoring. This SOP provides end-to-end platform operations.\n\n## Prerequisites\n\n**Required:**\n- Flow Nexus MCP server installed\n- Valid email address\n- Internet connectivity\n\n**Optional:**\n- E2B API key for enhanced features\n- Anthropic API key for Claude Code sandboxes\n- Payment method for credits\n\n**Verification:**\n```bash\n# Check Flow Nexus MCP availability\nclaude mcp list | grep flow-nexus\n\n# Test connection\nnpx flow-nexus@latest --version\n```\n\n## Agent Responsibilities\n\n### cicd-engineer (Infrastructure Orchestrator)\n**Role:** Manage infrastructure, sandboxes, deployments, and CI\u002FCD pipelines\n\n**Expertise:**\n- Cloud infrastructure management\n- Container orchestration\n- Deployment automation\n- Resource optimization\n\n**Output:** Infrastructure configuration, deployment pipelines, monitoring setup\n\n### backend-dev (Service Integrator)\n**Role:** Integrate platform services, APIs, and business logic\n\n**Expertise:**\n- API integration\n- Service architecture\n- Database design\n- Authentication flows\n\n**Output:** Service integration code, API endpoints, database schemas\n\n### system-architect (Platform Designer)\n**Role:** Design platform architecture, scalability patterns, and system integration\n\n**Expertise:**\n- System architecture\n- Scalability patterns\n- Performance optimization\n- Security design\n\n**Output:** Architecture diagrams, technical specifications, integration patterns\n\n## Phase 1: Authentication Setup\n\n**Objective:** Register user, authenticate, verify access to platform services\n\n**Evidence-Based Validation:**\n- User registered successfully\n- Authentication token obtained\n- Session active and verified\n- User profile accessible\n\n**cicd-engineer Actions:**\n```bash\n# Pre-task coordination\nnpx claude-flow@alpha hooks pre-task --description \"Setup Flow Nexus authentication\"\n\n# Restore session\nnpx claude-flow@alpha hooks session-restore --session-id \"flow-nexus-setup-$(date +%s)\"\n\n# Check current authentication status\nmcp__flow-nexus__auth_status { \"detailed\": true }\n\n# If not authenticated, register new user\nmcp__flow-nexus__user_register {\n  \"email\": \"user@example.com\",\n  \"password\": \"SecurePassword123!\",\n  \"username\": \"platform_user\",\n  \"full_name\": \"Platform User\"\n}\n\n# Login to create session\nmcp__flow-nexus__user_login {\n  \"email\": \"user@example.com\",\n  \"password\": \"SecurePassword123!\"\n}\n\n# Store user ID in memory\nUSER_ID=\"[returned_user_id]\"\nnpx claude-flow@alpha memory store --key \"flow-nexus\u002Fuser-id\" --value \"$USER_ID\"\n\n# Get user profile\nmcp__flow-nexus__user_profile { \"user_id\": \"$USER_ID\" }\n\n# Store profile in memory\nnpx claude-flow@alpha memory store \\\n  --key \"flow-nexus\u002Fuser-profile\" \\\n  --value \"{\\\"user_id\\\": \\\"$USER_ID\\\", \\\"tier\\\": \\\"free\\\", \\\"timestamp\\\": \\\"$(date -Iseconds)\\\"}\"\n```\n\n**backend-dev Actions:**\n```bash\n# Create platform configuration\nmkdir -p platform\u002F{config,services,scripts,docs}\n\ncat > platform\u002Fconfig\u002Fflow-nexus.json \u003C\u003C 'EOF'\n{\n  \"platform\": \"flow-nexus\",\n  \"version\": \"1.0.0\",\n  \"authentication\": {\n    \"type\": \"email_password\",\n    \"session_timeout\": 3600\n  },\n  \"services\": {\n    \"sandboxes\": { \"enabled\": true, \"max_concurrent\": 5 },\n    \"storage\": { \"enabled\": true, \"max_size_mb\": 1000 },\n    \"databases\": { \"enabled\": true, \"max_connections\": 10 },\n    \"workflows\": { \"enabled\": true, \"max_agents\": 8 }\n  },\n  \"limits\": {\n    \"requests_per_minute\": 60,\n    \"storage_mb\": 1000,\n    \"compute_hours\": 10\n  }\n}\nEOF\n\n# Post-edit hook\nnpx claude-flow@alpha hooks post-edit --file \"platform\u002Fconfig\u002Fflow-nexus.json\" --memory-key \"flow-nexus\u002Fconfig\"\n```\n\n**system-architect Actions:**\n```bash\n# Document authentication flow\ncat > platform\u002Fdocs\u002FAUTHENTICATION.md \u003C\u003C 'EOF'\n# Flow Nexus Authentication\n\n## Overview\n\nFlow Nexus uses email\u002Fpassword authentication with JWT tokens for session management.\n\n## Authentication Flow\n\n1. **Registration**: Create new user account\n   - Email validation required\n   - Password complexity enforced\n   - Username unique constraint\n\n2. **Login**: Obtain authentication token\n   - Returns JWT token\n   - Token expires after 1 hour\n   - Refresh token available\n\n3. **Session Management**: Maintain active session\n   - Auto-refresh before expiry\n   - Logout clears session\n   - Multi-device support\n\n## Security Best Practices\n\n- Use strong passwords (min 12 characters)\n- Enable 2FA when available\n- Rotate tokens regularly\n- Never commit credentials to git\n\n## API Examples\n\n### Register\n```bash\nmcp__flow-nexus__user_register {\n  \"email\": \"user@example.com\",\n  \"password\": \"secure_password\"\n}\n```\n\n### Login\n```bash\nmcp__flow-nexus__user_login {\n  \"email\": \"user@example.com\",\n  \"password\": \"secure_password\"\n}\n```\n\n### Logout\n```bash\nmcp__flow-nexus__user_logout\n```\nEOF\n\n# Post-edit hook\nnpx claude-flow@alpha hooks post-edit --file \"platform\u002Fdocs\u002FAUTHENTICATION.md\" --memory-key \"flow-nexus\u002Fauth-docs\"\n```\n\n**Success Criteria:**\n- [ ] User registered successfully\n- [ ] Authentication token obtained\n- [ ] Configuration created\n- [ ] Documentation generated\n\n**Memory Persistence:**\n```bash\nnpx claude-flow@alpha memory store \\\n  --key \"flow-nexus\u002Fphase1-complete\" \\\n  --value \"{\\\"status\\\": \\\"complete\\\", \\\"user_id\\\": \\\"$USER_ID\\\", \\\"authenticated\\\": true, \\\"timestamp\\\": \\\"$(date -Iseconds)\\\"}\"\n```\n\n## Phase 2: Configure Services\n\n**Objective:** Setup sandboxes, storage, databases, and other platform services\n\n**Evidence-Based Validation:**\n- Sandboxes created and running\n- Storage buckets configured\n- Database connections established\n- Real-time subscriptions active\n\n**cicd-engineer Actions:**\n```bash\n# Retrieve user ID\nUSER_ID=$(npx claude-flow@alpha memory retrieve --key \"flow-nexus\u002Fuser-id\" | jq -r '.value')\n\n# Create sandbox for development\nmcp__flow-nexus__sandbox_create {\n  \"template\": \"node\",\n  \"name\": \"dev-sandbox\",\n  \"timeout\": 3600,\n  \"env_vars\": {\n    \"NODE_ENV\": \"development\",\n    \"LOG_LEVEL\": \"debug\"\n  },\n  \"install_packages\": [\"express\", \"axios\", \"dotenv\"]\n}\n\n# Store sandbox ID\nSANDBOX_ID=\"[returned_sandbox_id]\"\nnpx claude-flow@alpha memory store --key \"flow-nexus\u002Fsandbox-id\" --value \"$SANDBOX_ID\"\n\n# Configure sandbox with additional settings\nmcp__flow-nexus__sandbox_configure {\n  \"sandbox_id\": \"$SANDBOX_ID\",\n  \"env_vars\": {\n    \"API_URL\": \"https:\u002F\u002Fapi.flow-nexus.ruv.io\",\n    \"MAX_RETRIES\": \"3\"\n  },\n  \"install_packages\": [\"typescript\", \"jest\"]\n}\n\n# Create storage bucket\nmcp__flow-nexus__storage_upload {\n  \"bucket\": \"platform-assets\",\n  \"path\": \".gitkeep\",\n  \"content\": \"\"\n}\n\n# Setup real-time subscriptions\nmcp__flow-nexus__realtime_subscribe {\n  \"table\": \"workflows\",\n  \"event\": \"*\"\n}\n\n# Store subscription ID\nSUBSCRIPTION_ID=\"[returned_subscription_id]\"\nnpx claude-flow@alpha memory store --key \"flow-nexus\u002Fsubscription-id\" --value \"$SUBSCRIPTION_ID\"\n\n# Notify completion\nnpx claude-flow@alpha hooks notify --message \"Services configured: sandbox, storage, real-time subscriptions\"\n```\n\n**backend-dev Actions:**\n```bash\n# Create service initialization script\ncat > platform\u002Fscripts\u002Finit-services.js \u003C\u003C 'EOF'\nconst { exec } = require('child_process');\nconst util = require('util');\nconst execPromise = util.promisify(exec);\n\nasync function initializeSandbox() {\n  console.log('Initializing sandbox...');\n  \u002F\u002F Sandbox initialization logic\n  return { status: 'success', sandbox_id: process.env.SANDBOX_ID };\n}\n\nasync function initializeStorage() {\n  console.log('Initializing storage...');\n  \u002F\u002F Storage setup logic\n  return { status: 'success', bucket: 'platform-assets' };\n}\n\nasync function initializeDatabase() {\n  console.log('Initializing database...');\n  \u002F\u002F Database connection logic\n  return { status: 'success', connected: true };\n}\n\nasync function main() {\n  try {\n    const sandbox = await initializeSandbox();\n    const storage = await initializeStorage();\n    const database = await initializeDatabase();\n\n    console.log('All services initialized successfully:', {\n      sandbox,\n      storage,\n      database\n    });\n  } catch (error) {\n    console.error('Service initialization failed:', error);\n    process.exit(1);\n  }\n}\n\nmain();\nEOF\n\n# Post-edit hook\nnpx claude-flow@alpha hooks post-edit --file \"platform\u002Fscripts\u002Finit-services.js\" --memory-key \"flow-nexus\u002Finit-script\"\n\n# Create database schema\ncat > platform\u002Fconfig\u002Fschema.sql \u003C\u003C 'EOF'\n-- Flow Nexus Platform Schema\n\nCREATE TABLE IF NOT EXISTS applications (\n  id UUID PRIMARY KEY DEFAULT gen_random_uuid(),\n  user_id UUID NOT NULL,\n  name VARCHAR(255) NOT NULL,\n  description TEXT,\n  status VARCHAR(50) DEFAULT 'active',\n  created_at TIMESTAMP DEFAULT NOW(),\n  updated_at TIMESTAMP DEFAULT NOW()\n);\n\nCREATE TABLE IF NOT EXISTS deployments (\n  id UUID PRIMARY KEY DEFAULT gen_random_uuid(),\n  application_id UUID REFERENCES applications(id),\n  version VARCHAR(50) NOT NULL,\n  sandbox_id VARCHAR(255),\n  status VARCHAR(50) DEFAULT 'pending',\n  created_at TIMESTAMP DEFAULT NOW()\n);\n\nCREATE TABLE IF NOT EXISTS metrics (\n  id UUID PRIMARY KEY DEFAULT gen_random_uuid(),\n  deployment_id UUID REFERENCES deployments(id),\n  metric_type VARCHAR(100),\n  metric_value JSONB,\n  recorded_at TIMESTAMP DEFAULT NOW()\n);\n\nCREATE INDEX idx_applications_user_id ON applications(user_id);\nCREATE INDEX idx_deployments_app_id ON deployments(application_id);\nCREATE INDEX idx_metrics_deployment_id ON metrics(deployment_id);\nEOF\n\n# Post-edit hook\nnpx claude-flow@alpha hooks post-edit --file \"platform\u002Fconfig\u002Fschema.sql\" --memory-key \"flow-nexus\u002Fschema\"\n```\n\n**system-architect Actions:**\n```bash\n# Document service architecture\ncat > platform\u002Fdocs\u002FARCHITECTURE.md \u003C\u003C 'EOF'\n# Flow Nexus Platform Architecture\n\n## System Components\n\n### 1. Sandboxes (E2B)\n- Isolated code execution environments\n- Multiple templates (Node.js, Python, React)\n- Resource limits enforced\n- Environment variable support\n\n### 2. Storage\n- Object storage for files\n- Bucket-based organization\n- Public URL generation\n- File upload\u002Fdownload APIs\n\n### 3. Databases\n- PostgreSQL with Supabase\n- Real-time subscriptions\n- Row-level security\n- Connection pooling\n\n### 4. Workflows\n- Event-driven processing\n- Agent coordination\n- Task orchestration\n- Message queue integration\n\n## Service Integration\n\n```\n┌─────────────────────────────────────────┐\n│         Flow Nexus Platform             │\n├─────────────────────────────────────────┤\n│                                         │\n│  ┌──────────┐  ┌──────────┐           │\n│  │ Sandboxes│  │ Storage  │           │\n│  │  (E2B)   │  │(Supabase)│           │\n│  └────┬─────┘  └────┬─────┘           │\n│       │             │                  │\n│  ┌────▼─────────────▼─────┐           │\n│  │    Event Bus            │           │\n│  │  (Real-time sync)       │           │\n│  └────┬────────────────────┘           │\n│       │                                │\n│  ┌────▼─────┐  ┌──────────┐           │\n│  │ Workflows│  │Databases │           │\n│  │ (Claude  │  │(Postgres)│           │\n│  │  Flow)   │  │          │           │\n│  └──────────┘  └──────────┘           │\n└─────────────────────────────────────────┘\n```\n\n## Scalability Patterns\n\n1. **Horizontal Scaling**: Add more sandboxes\n2. **Vertical Scaling**: Increase sandbox resources\n3. **Load Balancing**: Distribute across regions\n4. **Caching**: Redis for frequently accessed data\n5. **CDN**: Static asset delivery\n\n## Security Measures\n\n- Authentication required for all operations\n- API rate limiting enforced\n- Sandbox isolation with network controls\n- Encrypted data at rest and in transit\n- Audit logging for all actions\nEOF\n\n# Post-edit hook\nnpx claude-flow@alpha hooks post-edit --file \"platform\u002Fdocs\u002FARCHITECTURE.md\" --memory-key \"flow-nexus\u002Farchitecture\"\n```\n\n**Success Criteria:**\n- [ ] Sandbox created and configured\n- [ ] Storage bucket initialized\n- [ ] Database schema applied\n- [ ] Real-time subscriptions active\n\n**Memory Persistence:**\n```bash\nnpx claude-flow@alpha memory store \\\n  --key \"flow-nexus\u002Fphase2-complete\" \\\n  --value \"{\\\"status\\\": \\\"complete\\\", \\\"sandbox_id\\\": \\\"$SANDBOX_ID\\\", \\\"subscription_id\\\": \\\"$SUBSCRIPTION_ID\\\", \\\"timestamp\\\": \\\"$(date -Iseconds)\\\"}\"\n```\n\n## Phase 3: Deploy Applications\n\n**Objective:** Deploy applications using templates or custom configurations\n\n**Evidence-Based Validation:**\n- Application deployed successfully\n- Health checks passing\n- Metrics being collected\n- Public URL accessible\n\n**cicd-engineer Actions:**\n```bash\n# List available templates\nmcp__flow-nexus__template_list {\n  \"category\": \"web\",\n  \"limit\": 10\n}\n\n# Deploy from template\nmcp__flow-nexus__template_deploy {\n  \"template_name\": \"nextjs-starter\",\n  \"deployment_name\": \"my-nextjs-app\",\n  \"variables\": {\n    \"anthropic_api_key\": \"$ANTHROPIC_API_KEY\",\n    \"app_name\": \"My Next.js App\",\n    \"port\": \"3000\"\n  },\n  \"env_vars\": {\n    \"NODE_ENV\": \"production\",\n    \"DATABASE_URL\": \"$DATABASE_URL\"\n  }\n}\n\n# Store deployment ID\nDEPLOYMENT_ID=\"[returned_deployment_id]\"\nnpx claude-flow@alpha memory store --key \"flow-nexus\u002Fdeployment-id\" --value \"$DEPLOYMENT_ID\"\n\n# Subscribe to execution stream\nmcp__flow-nexus__execution_stream_subscribe {\n  \"deployment_id\": \"$DEPLOYMENT_ID\",\n  \"stream_type\": \"claude-code\"\n}\n\n# Monitor deployment status\nfor i in {1..10}; do\n  sleep 10\n  mcp__flow-nexus__execution_stream_status {\n    \"stream_id\": \"$DEPLOYMENT_ID\"\n  }\ndone\n\n# Notify deployment completion\nnpx claude-flow@alpha hooks notify --message \"Application deployed successfully: $DEPLOYMENT_ID\"\n```\n\n**backend-dev Actions:**\n```bash\n# Create custom application deployment script\ncat > platform\u002Fscripts\u002Fdeploy-app.sh \u003C\u003C 'EOF'\n#!\u002Fbin\u002Fbash\nset -e\n\nAPP_NAME=\"${1:-my-app}\"\nSANDBOX_ID=\"${2:-$SANDBOX_ID}\"\n\necho \"Deploying $APP_NAME to sandbox $SANDBOX_ID...\"\n\n# Upload application files\necho \"Uploading files...\"\nmcp__flow-nexus__sandbox_upload \\\n  --sandbox_id=\"$SANDBOX_ID\" \\\n  --file_path=\"app.js\" \\\n  --content=\"$(cat platform\u002Fservices\u002Fapp.js)\"\n\n# Execute startup script\necho \"Starting application...\"\nmcp__flow-nexus__sandbox_execute \\\n  --sandbox_id=\"$SANDBOX_ID\" \\\n  --code=\"npm start\" \\\n  --timeout=300\n\necho \"Application deployed successfully!\"\necho \"Access logs: mcp__flow-nexus__sandbox_logs --sandbox_id=$SANDBOX_ID\"\nEOF\n\nchmod +x platform\u002Fscripts\u002Fdeploy-app.sh\n\n# Create sample application\ncat > platform\u002Fservices\u002Fapp.js \u003C\u003C 'EOF'\nconst express = require('express');\nconst app = express();\nconst port = process.env.PORT || 3000;\n\napp.use(express.json());\n\napp.get('\u002Fhealth', (req, res) => {\n  res.json({\n    status: 'healthy',\n    timestamp: new Date().toISOString(),\n    uptime: process.uptime()\n  });\n});\n\napp.get('\u002Fapi\u002Finfo', (req, res) => {\n  res.json({\n    name: 'Flow Nexus Platform App',\n    version: '1.0.0',\n    environment: process.env.NODE_ENV\n  });\n});\n\napp.listen(port, () => {\n  console.log(`Server running on port ${port}`);\n});\nEOF\n\n# Post-edit hooks\nnpx claude-flow@alpha hooks post-edit --file \"platform\u002Fscripts\u002Fdeploy-app.sh\" --memory-key \"flow-nexus\u002Fdeploy-script\"\nnpx claude-flow@alpha hooks post-edit --file \"platform\u002Fservices\u002Fapp.js\" --memory-key \"flow-nexus\u002Fapp\"\n```\n\n**system-architect Actions:**\n```bash\n# Document deployment process\ncat > platform\u002Fdocs\u002FDEPLOYMENT.md \u003C\u003C 'EOF'\n# Application Deployment Guide\n\n## Deployment Methods\n\n### 1. Template Deployment\nUse pre-built templates for quick setup:\n```bash\nmcp__flow-nexus__template_deploy {\n  \"template_name\": \"nextjs-starter\",\n  \"deployment_name\": \"my-app\"\n}\n```\n\n### 2. Custom Deployment\nDeploy custom applications:\n```bash\n.\u002Fplatform\u002Fscripts\u002Fdeploy-app.sh my-app $SANDBOX_ID\n```\n\n## Deployment Workflow\n\n1. **Prepare**: Build and test locally\n2. **Upload**: Transfer files to sandbox\n3. **Configure**: Set environment variables\n4. **Execute**: Start application\n5. **Monitor**: Track health and metrics\n6. **Scale**: Adjust resources as needed\n\n## Health Monitoring\n\nCheck application health:\n```bash\ncurl http:\u002F\u002Flocalhost:3000\u002Fhealth\n```\n\nExpected response:\n```json\n{\n  \"status\": \"healthy\",\n  \"timestamp\": \"2025-10-30T12:00:00Z\",\n  \"uptime\": 3600\n}\n```\n\n## Troubleshooting\n\n### Application Not Starting\n- Check sandbox logs\n- Verify environment variables\n- Ensure dependencies installed\n- Check port availability\n\n### Health Check Failing\n- Verify application is running\n- Check network connectivity\n- Review error logs\n- Test locally first\n\n### Performance Issues\n- Monitor resource usage\n- Check database connections\n- Review application logs\n- Consider scaling up\nEOF\n\n# Post-edit hook\nnpx claude-flow@alpha hooks post-edit --file \"platform\u002Fdocs\u002FDEPLOYMENT.md\" --memory-key \"flow-nexus\u002Fdeployment-docs\"\n```\n\n**Success Criteria:**\n- [ ] Application deployed from template\n- [ ] Custom deployment script created\n- [ ] Health checks configured\n- [ ] Documentation completed\n\n**Memory Persistence:**\n```bash\nnpx claude-flow@alpha memory store \\\n  --key \"flow-nexus\u002Fphase3-complete\" \\\n  --value \"{\\\"status\\\": \\\"complete\\\", \\\"deployment_id\\\": \\\"$DEPLOYMENT_ID\\\", \\\"app_running\\\": true, \\\"timestamp\\\": \\\"$(date -Iseconds)\\\"}\"\n```\n\n## Phase 4: Manage Operations\n\n**Objective:** Monitor applications, manage resources, handle scaling and updates\n\n**Evidence-Based Validation:**\n- Monitoring dashboards active\n- Metrics being collected\n- Alerts configured\n- Scaling policies defined\n\n**cicd-engineer Actions:**\n```bash\n# Get system health\nmcp__flow-nexus__system_health\n\n# Check sandbox status\nSANDBOX_ID=$(npx claude-flow@alpha memory retrieve --key \"flow-nexus\u002Fsandbox-id\" | jq -r '.value')\nmcp__flow-nexus__sandbox_status { \"sandbox_id\": \"$SANDBOX_ID\" }\n\n# Get sandbox logs\nmcp__flow-nexus__sandbox_logs {\n  \"sandbox_id\": \"$SANDBOX_ID\",\n  \"lines\": 100\n}\n\n# List execution files\nDEPLOYMENT_ID=$(npx claude-flow@alpha memory retrieve --key \"flow-nexus\u002Fdeployment-id\" | jq -r '.value')\nmcp__flow-nexus__execution_files_list {\n  \"stream_id\": \"$DEPLOYMENT_ID\",\n  \"created_by\": \"claude-code\"\n}\n\n# Get audit log\nUSER_ID=$(npx claude-flow@alpha memory retrieve --key \"flow-nexus\u002Fuser-id\" | jq -r '.value')\nmcp__flow-nexus__audit_log {\n  \"user_id\": \"$USER_ID\",\n  \"limit\": 50\n}\n\n# Store monitoring data\nnpx claude-flow@alpha memory store \\\n  --key \"flow-nexus\u002Fmonitoring\" \\\n  --value \"{\\\"health\\\": \\\"good\\\", \\\"sandbox_status\\\": \\\"running\\\", \\\"log_lines\\\": 100, \\\"timestamp\\\": \\\"$(date -Iseconds)\\\"}\"\n```\n\n**backend-dev Actions:**\n```bash\n# Create monitoring dashboard configuration\ncat > platform\u002Fconfig\u002Fmonitoring.json \u003C\u003C 'EOF'\n{\n  \"dashboards\": {\n    \"main\": {\n      \"panels\": [\n        {\n          \"title\": \"Application Health\",\n          \"type\": \"status\",\n          \"metrics\": [\"uptime\", \"response_time\", \"error_rate\"]\n        },\n        {\n          \"title\": \"Resource Usage\",\n          \"type\": \"timeseries\",\n          \"metrics\": [\"cpu_usage\", \"memory_usage\", \"disk_usage\"]\n        },\n        {\n          \"title\": \"Request Metrics\",\n          \"type\": \"counter\",\n          \"metrics\": [\"requests_total\", \"requests_per_second\"]\n        }\n      ]\n    }\n  },\n  \"alerts\": {\n    \"high_error_rate\": {\n      \"threshold\": 0.05,\n      \"window\": \"5m\",\n      \"severity\": \"critical\"\n    },\n    \"high_latency\": {\n      \"threshold\": 1000,\n      \"window\": \"5m\",\n      \"severity\": \"warning\"\n    },\n    \"resource_exhaustion\": {\n      \"threshold\": 0.9,\n      \"window\": \"10m\",\n      \"severity\": \"critical\"\n    }\n  }\n}\nEOF\n\n# Create operations utility script\ncat > platform\u002Fscripts\u002Fops-util.sh \u003C\u003C 'EOF'\n#!\u002Fbin\u002Fbash\n\nCMD=\"${1:-help}\"\nSANDBOX_ID=\"${SANDBOX_ID:-$(npx claude-flow@alpha memory retrieve --key flow-nexus\u002Fsandbox-id | jq -r '.value')}\"\n\ncase \"$CMD\" in\n  status)\n    echo \"Getting system status...\"\n    mcp__flow-nexus__system_health\n    ;;\n  logs)\n    echo \"Fetching logs for sandbox $SANDBOX_ID...\"\n    mcp__flow-nexus__sandbox_logs --sandbox_id=\"$SANDBOX_ID\" --lines=50\n    ;;\n  restart)\n    echo \"Restarting sandbox $SANDBOX_ID...\"\n    mcp__flow-nexus__sandbox_stop --sandbox_id=\"$SANDBOX_ID\"\n    sleep 5\n    .\u002Fplatform\u002Fscripts\u002Fdeploy-app.sh\n    ;;\n  scale)\n    REPLICAS=\"${2:-2}\"\n    echo \"Scaling to $REPLICAS replicas...\"\n    # Scaling logic here\n    ;;\n  help)\n    echo \"Usage: $0 {status|logs|restart|scale}\"\n    ;;\n  *)\n    echo \"Unknown command: $CMD\"\n    exit 1\n    ;;\nesac\nEOF\n\nchmod +x platform\u002Fscripts\u002Fops-util.sh\n\n# Post-edit hooks\nnpx claude-flow@alpha hooks post-edit --file \"platform\u002Fconfig\u002Fmonitoring.json\" --memory-key \"flow-nexus\u002Fmonitoring-config\"\nnpx claude-flow@alpha hooks post-edit --file \"platform\u002Fscripts\u002Fops-util.sh\" --memory-key \"flow-nexus\u002Fops-util\"\n```\n\n**system-architect Actions:**\n```bash\n# Document operations procedures\ncat > platform\u002Fdocs\u002FOPERATIONS.md \u003C\u003C 'EOF'\n# Operations Guide\n\n## Monitoring\n\n### Health Checks\n```bash\n# System health\nmcp__flow-nexus__system_health\n\n# Sandbox status\nmcp__flow-nexus__sandbox_status --sandbox_id=$SANDBOX_ID\n\n# Application health\ncurl http:\u002F\u002Flocalhost:3000\u002Fhealth\n```\n\n### Logs\n```bash\n# View sandbox logs\nmcp__flow-nexus__sandbox_logs --sandbox_id=$SANDBOX_ID --lines=100\n\n# Stream logs in real-time\n.\u002Fplatform\u002Fscripts\u002Fops-util.sh logs\n```\n\n### Metrics\n- **CPU Usage**: Track compute utilization\n- **Memory Usage**: Monitor memory consumption\n- **Request Rate**: Requests per second\n- **Error Rate**: Failed requests percentage\n- **Latency**: Response time (p50, p95, p99)\n\n## Scaling\n\n### Manual Scaling\n```bash\n# Scale up\n.\u002Fplatform\u002Fscripts\u002Fops-util.sh scale 3\n\n# Scale down\n.\u002Fplatform\u002Fscripts\u002Fops-util.sh scale 1\n```\n\n### Auto-scaling Policies\n- Scale up when CPU >80% for 5 minutes\n- Scale down when CPU \u003C20% for 10 minutes\n- Min replicas: 1\n- Max replicas: 10\n\n## Incident Response\n\n### High Error Rate\n1. Check application logs\n2. Review recent deployments\n3. Verify external dependencies\n4. Rollback if necessary\n\n### Performance Degradation\n1. Check resource usage\n2. Review database queries\n3. Analyze slow endpoints\n4. Scale resources if needed\n\n### Service Outage\n1. Check system health\n2. Verify sandbox status\n3. Restart application\n4. Escalate if persists\n\n## Maintenance\n\n### Updates\n```bash\n# Update dependencies\nmcp__flow-nexus__sandbox_configure \\\n  --sandbox_id=$SANDBOX_ID \\\n  --install_packages=[\"package@latest\"]\n\n# Restart application\n.\u002Fplatform\u002Fscripts\u002Fops-util.sh restart\n```\n\n### Backups\n- Automated daily backups\n- 30-day retention\n- Point-in-time recovery available\nEOF\n\n# Post-edit hook\nnpx claude-flow@alpha hooks post-edit --file \"platform\u002Fdocs\u002FOPERATIONS.md\" --memory-key \"flow-nexus\u002Fops-docs\"\n```\n\n**Success Criteria:**\n- [ ] Monitoring configured\n- [ ] Logs accessible\n- [ ] Operations utilities created\n- [ ] Incident procedures documented\n\n**Memory Persistence:**\n```bash\nnpx claude-flow@alpha memory store \\\n  --key \"flow-nexus\u002Fphase4-complete\" \\\n  --value \"{\\\"status\\\": \\\"complete\\\", \\\"monitoring\\\": \\\"active\\\", \\\"ops_tools\\\": \\\"ready\\\", \\\"timestamp\\\": \\\"$(date -Iseconds)\\\"}\"\n```\n\n## Phase 5: Handle Payments\n\n**Objective:** Manage credits, configure auto-refill, track usage and billing\n\n**Evidence-Based Validation:**\n- Credit balance retrieved\n- Payment history accessible\n- Auto-refill configured\n- Usage tracking active\n\n**cicd-engineer Actions:**\n```bash\n# Check credit balance\nmcp__flow-nexus__check_balance\n\n# Store balance\nBALANCE=\"[returned_balance]\"\nnpx claude-flow@alpha memory store --key \"flow-nexus\u002Fbalance\" --value \"$BALANCE\"\n\n# Get payment history\nmcp__flow-nexus__get_payment_history { \"limit\": 20 }\n\n# Configure auto-refill\nmcp__flow-nexus__configure_auto_refill {\n  \"enabled\": true,\n  \"threshold\": 10,\n  \"amount\": 50\n}\n\n# Get user statistics\nUSER_ID=$(npx claude-flow@alpha memory retrieve --key \"flow-nexus\u002Fuser-id\" | jq -r '.value')\nmcp__flow-nexus__user_stats { \"user_id\": \"$USER_ID\" }\n\n# Notify configuration complete\nnpx claude-flow@alpha hooks notify --message \"Payment system configured with auto-refill\"\n```\n\n**backend-dev Actions:**\n```bash\n# Create billing utility script\ncat > platform\u002Fscripts\u002Fbilling-util.sh \u003C\u003C 'EOF'\n#!\u002Fbin\u002Fbash\n\nCMD=\"${1:-balance}\"\n\ncase \"$CMD\" in\n  balance)\n    echo \"Checking credit balance...\"\n    mcp__flow-nexus__check_balance\n    ;;\n  history)\n    LIMIT=\"${2:-10}\"\n    echo \"Fetching payment history (last $LIMIT transactions)...\"\n    mcp__flow-nexus__get_payment_history --limit=$LIMIT\n    ;;\n  refill)\n    AMOUNT=\"${2:-50}\"\n    echo \"Creating payment link for $$AMOUNT...\"\n    mcp__flow-nexus__create_payment_link --amount=$AMOUNT\n    ;;\n  auto-refill)\n    ACTION=\"${2:-status}\"\n    if [ \"$ACTION\" = \"enable\" ]; then\n      THRESHOLD=\"${3:-10}\"\n      AMOUNT=\"${4:-50}\"\n      mcp__flow-nexus__configure_auto_refill \\\n        --enabled=true \\\n        --threshold=$THRESHOLD \\\n        --amount=$AMOUNT\n    elif [ \"$ACTION\" = \"disable\" ]; then\n      mcp__flow-nexus__configure_auto_refill --enabled=false\n    else\n      echo \"Current auto-refill status:\"\n      mcp__flow-nexus__check_balance | jq '.auto_refill'\n    fi\n    ;;\n  help)\n    echo \"Usage: $0 {balance|history|refill|auto-refill}\"\n    ;;\n  *)\n    echo \"Unknown command: $CMD\"\n    exit 1\n    ;;\nesac\nEOF\n\nchmod +x platform\u002Fscripts\u002Fbilling-util.sh\n\n# Post-edit hook\nnpx claude-flow@alpha hooks post-edit --file \"platform\u002Fscripts\u002Fbilling-util.sh\" --memory-key \"flow-nexus\u002Fbilling-util\"\n\n# Post-task hook\nnpx claude-flow@alpha hooks post-task --task-id \"flow-nexus-platform-setup\"\n```\n\n**system-architect Actions:**\n```bash\n# Document billing and payments\ncat > platform\u002Fdocs\u002FBILLING.md \u003C\u003C 'EOF'\n# Billing and Payments Guide\n\n## Credits System\n\nFlow Nexus uses a credit-based billing system:\n- Credits deducted for resource usage\n- Minimum purchase: $10\n- Auto-refill available\n\n## Usage Costs\n\n### Sandboxes\n- $0.01 per minute (Node.js, Python)\n- $0.02 per minute (React, Next.js)\n- Free tier: 100 minutes\u002Fmonth\n\n### Storage\n- $0.10 per GB\u002Fmonth\n- Free tier: 1 GB\n\n### Workflows\n- $0.001 per task execution\n- Free tier: 1000 tasks\u002Fmonth\n\n### Neural Training\n- Nano: $0.05\u002Fhour\n- Small: $0.15\u002Fhour\n- Medium: $0.50\u002Fhour\n- Large: $2.00\u002Fhour\n\n## Managing Credits\n\n### Check Balance\n```bash\n.\u002Fplatform\u002Fscripts\u002Fbilling-util.sh balance\n```\n\n### View History\n```bash\n.\u002Fplatform\u002Fscripts\u002Fbilling-util.sh history 20\n```\n\n### Add Credits\n```bash\n.\u002Fplatform\u002Fscripts\u002Fbilling-util.sh refill 50\n```\n\n### Auto-Refill\n\nEnable automatic credit refills:\n```bash\n.\u002Fplatform\u002Fscripts\u002Fbilling-util.sh auto-refill enable 10 50\n```\n\nThis will automatically add $50 credits when balance falls below $10.\n\nDisable auto-refill:\n```bash\n.\u002Fplatform\u002Fscripts\u002Fbilling-util.sh auto-refill disable\n```\n\n## Cost Optimization\n\n1. **Stop Unused Sandboxes**: Reduce compute costs\n2. **Clean Up Storage**: Remove old files\n3. **Optimize Workflows**: Reduce task executions\n4. **Use Free Tier**: Stay within limits when possible\n5. **Monitor Usage**: Track spending regularly\n\n## Billing Alerts\n\nConfigure alerts for:\n- Low balance warnings\n- High usage notifications\n- Monthly spending limits\n- Budget thresholds\n\n## Payment Methods\n\nSupported payment methods:\n- Credit\u002FDebit Cards\n- PayPal\n- Wire Transfer (enterprise)\n\n## Invoices\n\nAccess invoices:\n```bash\nmcp__flow-nexus__get_payment_history --limit=12\n```\n\nInvoices include:\n- Transaction date\n- Amount charged\n- Credits purchased\n- Usage details\nEOF\n\n# Post-edit hook\nnpx claude-flow@alpha hooks post-edit --file \"platform\u002Fdocs\u002FBILLING.md\" --memory-key \"flow-nexus\u002Fbilling-docs\"\n\n# Session end hook\nnpx claude-flow@alpha hooks session-end --export-metrics true\n```\n\n**Success Criteria:**\n- [ ] Credit balance checked\n- [ ] Payment history retrieved\n- [ ] Auto-refill configured\n- [ ] Billing utilities created\n- [ ] Documentation completed\n\n**Memory Persistence:**\n```bash\nnpx claude-flow@alpha memory store \\\n  --key \"flow-nexus\u002Fphase5-complete\" \\\n  --value \"{\\\"status\\\": \\\"complete\\\", \\\"balance\\\": $BALANCE, \\\"auto_refill\\\": true, \\\"timestamp\\\": \\\"$(date -Iseconds)\\\"}\"\n\n# Final workflow summary\nnpx claude-flow@alpha memory store \\\n  --key \"flow-nexus\u002Fworkflow-complete\" \\\n  --value \"{\\\"status\\\": \\\"success\\\", \\\"authenticated\\\": true, \\\"deployed\\\": true, \\\"monitored\\\": true, \\\"billing\\\": \\\"configured\\\", \\\"timestamp\\\": \\\"$(date -Iseconds)\\\"}\"\n```\n\n## Workflow Summary\n\n**Total Estimated Duration:** 30-60 minutes\n\n**Phase Breakdown:**\n1. Authentication Setup: 5-10 minutes\n2. Configure Services: 10-15 minutes\n3. Deploy Applications: 10-15 minutes\n4. Manage Operations: 5-10 minutes\n5. Handle Payments: 5-10 minutes\n\n**Key Deliverables:**\n- Authenticated user account\n- Configured platform services\n- Deployed application\n- Operations utilities\n- Billing management\n- Complete documentation\n\n## Evidence-Based Success Metrics\n\n**Authentication:**\n- User registered and verified\n- Session token obtained\n- Profile accessible\n\n**Services:**\n- Sandbox running\n- Storage configured\n- Database connected\n- Real-time subscriptions active\n\n**Deployment:**\n- Application deployed\n- Health checks passing\n- Logs accessible\n\n**Operations:**\n- Monitoring active\n- Metrics collected\n- Utilities functional\n\n**Billing:**\n- Balance checked\n- Auto-refill configured\n- Usage tracked\n\n## Troubleshooting\n\n**Authentication Failures:**\n- Verify email and password\n- Check network connectivity\n- Clear browser cache\n- Try password reset\n\n**Sandbox Issues:**\n- Check sandbox status\n- Review logs for errors\n- Verify environment variables\n- Ensure sufficient credits\n\n**Deployment Failures:**\n- Validate template configuration\n- Check file permissions\n- Verify dependencies\n- Review error messages\n\n**Payment Problems:**\n- Verify payment method\n- Check credit balance\n- Review transaction history\n- Contact support if needed\n\n## Best Practices\n\n1. **Security**: Never commit credentials\n2. **Monitoring**: Enable comprehensive logging\n3. **Backups**: Regular data backups\n4. **Updates**: Keep dependencies current\n5. **Testing**: Test before production\n6. **Documentation**: Maintain up-to-date docs\n7. **Optimization**: Monitor and optimize costs\n8. **Support**: Use audit logs for debugging\n\n## References\n\n- Flow Nexus Platform: https:\u002F\u002Fflow-nexus.ruv.io\n- API Documentation: https:\u002F\u002Fflow-nexus.ruv.io\u002Fdocs\n- Pricing: https:\u002F\u002Fflow-nexus.ruv.io\u002Fpricing\n- Support: https:\u002F\u002Fflow-nexus.ruv.io\u002Fsupport\n",{"name":5,"description":7},"main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002Faiskillstore\u002Fmarketplace\u002Fdnyoussef\u002Fwhen-using-flow-nexus-platform-use-flow-nexus-platform",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":8,"skillName":5,"commands":53,"prompt":63,"zipAvailable":64},[54,57,60],{"tool":55,"command":56},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill when-using-flow-nexus-platform-use-flow-nexus-platform",{"tool":58,"command":59},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill when-using-flow-nexus-platform-use-flow-nexus-platform",{"tool":61,"command":62},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill when-using-flow-nexus-platform-use-flow-nexus-platform","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fdnyoussef\u002Fwhen-using-flow-nexus-platform-use-flow-nexus-platform\u002FSKILL.md",true,[66,72,78,82],{"path":67,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":70,"sourceHtmlUrl":71},"process-diagram.gv","OTHER","其他",5586,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fdnyoussef\u002Fwhen-using-flow-nexus-platform-use-flow-nexus-platform\u002Fprocess-diagram.gv",{"path":73,"resourceType":74,"resourceTypeDesc":75,"sizeBytes":76,"sourceHtmlUrl":77},"PROCESS.md","REFERENCE","参考文档",10500,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fdnyoussef\u002Fwhen-using-flow-nexus-platform-use-flow-nexus-platform\u002FPROCESS.md",{"path":79,"resourceType":74,"resourceTypeDesc":75,"sizeBytes":80,"sourceHtmlUrl":81},"README.md",1566,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fdnyoussef\u002Fwhen-using-flow-nexus-platform-use-flow-nexus-platform\u002FREADME.md",{"path":83,"resourceType":74,"resourceTypeDesc":75,"sizeBytes":84,"sourceHtmlUrl":85},"skill-report.json",9175,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fdnyoussef\u002Fwhen-using-flow-nexus-platform-use-flow-nexus-platform\u002Fskill-report.json",[87,96,105,114,120,126],{"skillNo":88,"name":89,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":38},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[],[93,94,95],"model","model hierarchy","model hierarchy skill",{"skillNo":97,"name":98,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":38},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[],[102,103,104],"MCP","zoom","zoom mcp",{"skillNo":106,"name":107,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":108,"categories":109,"keywords":110,"publishedAt":38},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[111,112,113,103],"sdk","zoom apps sdk","apps",{"skillNo":115,"name":116,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":117,"categories":118,"keywords":119,"publishedAt":38},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[116],{"skillNo":121,"name":122,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":123,"categories":124,"keywords":125,"publishedAt":38},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[],[122],{"skillNo":127,"name":128,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":129,"categories":130,"keywords":131,"publishedAt":38},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[128]]