when-training-neural-networks-use-flow-nexus-neural
This SOP provides a systematic workflow for training and deploying neural networks using Flow Nexus platform with distributed E2B sandboxes. It covers architecture selection, distributed training, ...
What this skill does
# Flow Nexus Neural Network Training SOP
```yaml
metadata:
skill_name: when-training-neural-networks-use-flow-nexus-neural
version: 1.0.0
category: platform-integration
difficulty: advanced
estimated_duration: 45-90 minutes
trigger_patterns:
- "train neural network"
- "machine learning model"
- "distributed training"
- "flow nexus neural"
- "E2B sandbox training"
dependencies:
- flow-nexus MCP server
- E2B account (optional for cloud)
- Claude Flow hooks
agents:
- ml-developer (primary model architect)
- flow-nexus-neural (platform coordinator)
- cicd-engineer (deployment specialist)
success_criteria:
- Model training completes successfully
- Validation accuracy meets requirements (>85%)
- Performance benchmarks within thresholds
- Cloud deployment verified
- Documentation generated
```
## Overview
This SOP provides a systematic workflow for training and deploying neural networks using Flow Nexus platform with distributed E2B sandboxes. It covers architecture selection, distributed training, validation, and production deployment.
## Prerequisites
**Required:**
- Flow Nexus MCP server installed
- Basic understanding of neural network architectures
- Authentication credentials (if using cloud features)
**Optional:**
- E2B account for cloud sandboxes
- GPU resources for training
- Pre-trained model weights
**Verification:**
```bash
# Check Flow Nexus availability
npx flow-nexus@latest --version
# Verify MCP connection
claude mcp list | grep flow-nexus
```
## Agent Responsibilities
### ml-developer (Primary Model Architect)
**Role:** Design neural network architecture, select hyperparameters, optimize model performance
**Expertise:**
- Neural network architectures (Transformer, CNN, RNN, GAN, etc.)
- Training optimization and hyperparameter tuning
- Model evaluation and validation strategies
- Transfer learning and fine-tuning
**Output:** Model architecture design, training configuration, performance analysis
### flow-nexus-neural (Platform Coordinator)
**Role:** Coordinate distributed training across cloud infrastructure, manage resources
**Expertise:**
- Flow Nexus platform APIs and capabilities
- Distributed training coordination
- E2B sandbox management
- Resource optimization
**Output:** Training orchestration, resource allocation, deployment configuration
### cicd-engineer (Deployment Specialist)
**Role:** Deploy trained models to production, setup monitoring and scaling
**Expertise:**
- Model serving infrastructure
- Docker containerization
- CI/CD pipelines
- Monitoring and observability
**Output:** Deployment scripts, monitoring dashboards, production configuration
## Phase 1: Setup Flow Nexus
**Objective:** Authenticate with Flow Nexus platform and initialize neural training environment
**Evidence-Based Validation:**
- Authentication token obtained and verified
- MCP tools responding correctly
- Training environment initialized
**ml-developer Actions:**
```bash
# Pre-task coordination hook
npx claude-flow@alpha hooks pre-task --description "Setup Flow Nexus for neural training"
# Restore session context
npx claude-flow@alpha hooks session-restore --session-id "neural-training-$(date +%s)"
```
**flow-nexus-neural Actions:**
```bash
# Check authentication status
mcp__flow-nexus__auth_status { "detailed": true }
# If not authenticated, register/login
# mcp__flow-nexus__user_register { "email": "[email protected]", "password": "secure_pass" }
# mcp__flow-nexus__user_login { "email": "[email protected]", "password": "secure_pass" }
# Initialize neural training cluster
mcp__flow-nexus__neural_cluster_init {
"name": "neural-training-cluster",
"architecture": "transformer",
"topology": "mesh",
"daaEnabled": true,
"wasmOptimization": true,
"consensus": "proof-of-learning"
}
# Store cluster ID in memory
npx claude-flow@alpha memory store --key "neural/cluster-id" --value "[cluster_id]"
```
**cicd-engineer Actions:**
```bash
# Prepare deployment environment
mkdir -p neural/{models,configs,scripts,tests}
# Initialize configuration
cat > neural/configs/training.json << 'EOF'
{
"cluster": {
"topology": "mesh",
"maxNodes": 8,
"autoScale": true
},
"training": {
"batchSize": 32,
"epochs": 100,
"learningRate": 0.001,
"optimizer": "adam"
},
"validation": {
"splitRatio": 0.2,
"minAccuracy": 0.85
}
}
EOF
# Post-edit hook
npx claude-flow@alpha hooks post-edit --file "neural/configs/training.json" --memory-key "neural/config"
```
**Success Criteria:**
- [ ] Flow Nexus authenticated successfully
- [ ] Neural cluster initialized
- [ ] Configuration files created
- [ ] Memory context established
**Memory Persistence:**
```bash
# Store phase completion
npx claude-flow@alpha memory store \
--key "neural/phase1-complete" \
--value "{\"status\": \"complete\", \"cluster_id\": \"[id]\", \"timestamp\": \"$(date -Iseconds)\"}"
```
## Phase 2: Configure Neural Network
**Objective:** Design network architecture, select hyperparameters, prepare training configuration
**Evidence-Based Validation:**
- Architecture validated against task requirements
- Hyperparameters optimized for dataset
- Configuration tested with sample data
**ml-developer Actions:**
```bash
# Retrieve cluster information
CLUSTER_ID=$(npx claude-flow@alpha memory retrieve --key "neural/cluster-id" | jq -r '.value')
# List available templates for reference
mcp__flow-nexus__neural_list_templates {
"category": "classification",
"limit": 10
}
# Design custom architecture
cat > neural/configs/architecture.json << 'EOF'
{
"type": "transformer",
"layers": [
{
"type": "embedding",
"inputDim": 10000,
"outputDim": 512
},
{
"type": "transformer-encoder",
"numHeads": 8,
"dimModel": 512,
"dimFeedforward": 2048,
"numLayers": 6,
"dropout": 0.1
},
{
"type": "dense",
"units": 256,
"activation": "relu"
},
{
"type": "dropout",
"rate": 0.3
},
{
"type": "dense",
"units": 10,
"activation": "softmax"
}
],
"optimizer": {
"type": "adam",
"learningRate": 0.001,
"beta1": 0.9,
"beta2": 0.999
},
"loss": "categorical_crossentropy",
"metrics": ["accuracy", "precision", "recall"]
}
EOF
# Post-edit hook
npx claude-flow@alpha hooks post-edit --file "neural/configs/architecture.json" --memory-key "neural/architecture"
# Notify coordination
npx claude-flow@alpha hooks notify --message "Neural architecture configured: Transformer with 6 encoder layers"
```
**flow-nexus-neural Actions:**
```bash
# Deploy neural nodes to cluster
mcp__flow-nexus__neural_node_deploy {
"cluster_id": "$CLUSTER_ID",
"node_type": "worker",
"model": "large",
"template": "nodejs",
"autonomy": 0.8,
"capabilities": ["training", "inference", "validation"]
}
# Deploy parameter server
mcp__flow-nexus__neural_node_deploy {
"cluster_id": "$CLUSTER_ID",
"node_type": "parameter_server",
"model": "xl",
"template": "nodejs",
"autonomy": 0.9,
"capabilities": ["parameter_sync", "gradient_aggregation"]
}
# Deploy validator nodes
for i in {1..2}; do
mcp__flow-nexus__neural_node_deploy {
"cluster_id": "$CLUSTER_ID",
"node_type": "validator",
"model": "base",
"template": "nodejs",
"autonomy": 0.7,
"capabilities": ["validation", "benchmarking"]
}
done
# Connect nodes based on mesh topology
mcp__flow-nexus__neural_cluster_connect {
"cluster_id": "$CLUSTER_ID",
"topology": "mesh"
}
# Store node information
npx claude-flow@alpha memory store --key "neural/nodes-deployed" --value "4"
```
**cicd-engineer Actions:**
```bash
# Create training script
cat > neural/scripts/train.py << 'EOF'
#!/usr/bin/env python3
import json
import sys
from datetime import datetime
def load_config(path):
with open(path, 'r') as f:
return json.load(f)
def prepare_dataset(config):
# DataRelated in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.