关于 flow-nexus-platform
flow-nexus-platform 是用于管理 Flow Nexus 的技能,涵盖账户、沙箱、应用发布与部署、积分和编程挑战,并通过指定的 MCP 工具操作平台。
主要功能
- 01管理账户和个人资料
- 02创建沙箱并运行代码
- 03浏览、发布和部署应用
- 04查看和管理积分
- 05浏览编程挑战并提交解答
适用场景
- 01在配置好的沙箱中运行代码
- 02发布应用或部署模板
- 03提交编程挑战的解答
MCP 相关
该技能通过 mcp__flow-nexus__ 工具操作 Flow Nexus,涵盖身份验证、沙箱执行、应用管理、积分、挑战及其他平台功能。
安装
复制下面的命令,在终端中运行。
npx skills add https:/ / github.com/ ruvnet/ ruflo --skill flow-nexus-platform安装后在 Claude Code 中输入/flow-nexus-platform确认已加载。
详细介绍
Flow Nexus 平台管理
全面管理 Flow Nexus 平台,涵盖身份验证、沙箱执行、应用部署、积分管理和编码挑战。
目录
身份验证与用户管理
注册与登录
注册新账户
mcp__flow-nexus__user_register({
email: "[email protected]",
password: "secure_password",
full_name: "Your Name",
username: "unique_username" // optional
})
登录
mcp__flow-nexus__user_login({
email: "[email protected]",
password: "your_password"
})
检查身份验证状态
mcp__flow-nexus__auth_status({ detailed: true })
登出
mcp__flow-nexus__user_logout()
密码管理
请求重置密码
mcp__flow-nexus__user_reset_password({
email: "[email protected]"
})
使用令牌更新密码
mcp__flow-nexus__user_update_password({
token: "reset_token_from_email",
new_password: "new_secure_password"
})
验证电子邮件
mcp__flow-nexus__user_verify_email({
token: "verification_token_from_email"
})
个人资料管理
获取用户个人资料
mcp__flow-nexus__user_profile({
user_id: "your_user_id"
})
更新个人资料
mcp__flow-nexus__user_update_profile({
user_id: "your_user_id",
updates: {
full_name: "Updated Name",
bio: "AI Developer and researcher",
github_username: "yourusername",
twitter_handle: "@yourhandle"
}
})
获取用户统计信息
mcp__flow-nexus__user_stats({
user_id: "your_user_id"
})
升级用户等级
mcp__flow-nexus__user_upgrade({
user_id: "your_user_id",
tier: "pro" // pro, enterprise
})
沙箱管理
创建与配置沙箱
创建沙箱
mcp__flow-nexus__sandbox_create({
template: "node", // node, python, react, nextjs, vanilla, base, claude-code
name: "my-sandbox",
env_vars: {
API_KEY: "your_api_key",
NODE_ENV: "development",
DATABASE_URL: "postgres://..."
},
install_packages: ["express", "cors", "dotenv"],
startup_script: "npm run dev",
timeout: 3600, // seconds
metadata: {
project: "my-project",
environment: "staging"
}
})
配置现有沙箱
mcp__flow-nexus__sandbox_configure({
sandbox_id: "sandbox_id",
env_vars: {
NEW_VAR: "value"
},
install_packages: ["axios", "lodash"],
run_commands: ["npm run migrate", "npm run seed"],
anthropic_key: "sk-ant-..." // For Claude Code integration
})
执行代码
在沙箱中运行代码
mcp__flow-nexus__sandbox_execute({
sandbox_id: "sandbox_id",
code: `
console.log('Hello from sandbox!');
const result = await fetch('https:/$api.example.com$data');
const data = await result.json();
return data;
`,
language: "javascript",
capture_output: true,
timeout: 60, // seconds
working_dir: "$app",
env_vars: {
TEMP_VAR: "override"
}
})
管理沙箱
列出沙箱
mcp__flow-nexus__sandbox_list({
status: "running" // running, stopped, all
})
获取沙箱状态
mcp__flow-nexus__sandbox_status({
sandbox_id: "sandbox_id"
})
向沙箱上传文件
mcp__flow-nexus__sandbox_upload({
sandbox_id: "sandbox_id",
file_path: "$app$config$database.json",
content: JSON.stringify(databaseConfig, null, 2)
})
获取沙箱日志
mcp__flow-nexus__sandbox_logs({
sandbox_id: "sandbox_id",
lines: 100 // max 1000
})
停止沙箱
mcp__flow-nexus__sandbox_stop({
sandbox_id: "sandbox_id"
})
删除沙箱
mcp__flow-nexus__sandbox_delete({
sandbox_id: "sandbox_id"
})
沙箱模板
- node:包含 npm 的 Node.js 环境
- python:包含 pip 的 Python 3.x 环境
- react:React 开发环境
- nextjs:Next.js 全栈框架
- vanilla:基础 HTML/CSS/JS
- base:精简的 Linux 环境
- claude-code:集成 Claude Code 的环境
常见沙箱模式
API 开发沙箱
mcp__flow-nexus__sandbox_create({
template: "node",
name: "api-development",
install_packages: [
"express",
"cors",
"helmet",
"dotenv",
"jsonwebtoken",
"bcrypt"
],
env_vars: {
PORT: "3000",
NODE_ENV: "development"
},
startup_script: "npm run dev"
})
机器学习沙箱
mcp__flow-nexus__sandbox_create({
template: "python",
name: "ml-training",
install_packages: [
"numpy",
"pandas",
"scikit-learn",
"matplotlib",
"tensorflow"
],
env_vars: {
CUDA_VISIBLE_DEVICES: "0"
}
})
全栈开发
mcp__flow-nexus__sandbox_create({
template: "nextjs",
name: "fullstack-app",
install_packages: [
"prisma",
"@prisma$client",
"next-auth",
"zod"
],
env_vars: {
DATABASE_URL: "postgresql://...",
NEXTAUTH_SECRET: "secret"
}
})
应用商店与部署
浏览与搜索
搜索应用
mcp__flow-nexus__app_search({
search: "authentication api",
category: "backend",
featured: true,
limit: 20
})
获取应用详情
mcp__flow-nexus__app_get({
app_id: "app_id"
})
列出模板
mcp__flow-nexus__app_store_list_templates({
category: "web-api",
tags: ["express", "jwt", "typescript"],
limit: 20
})
获取模板详情
mcp__flow-nexus__template_get({
template_name: "express-api-starter",
template_id: "template_id" // alternative
})
列出所有可用模板
mcp__flow-nexus__template_list({
category: "backend",
template_type: "starter",
featured: true,
limit: 50
})
发布应用
将应用发布到商店
mcp__flow-nexus__app_store_publish_app({
name: "JWT Authentication Service",
description: "Production-ready JWT authentication microservice with refresh tokens",
category: "backend",
version: "1.0.0",
source_code: sourceCodeString,
tags: ["auth", "jwt", "express", "typescript", "security"],
metadata: {
author: "Your Name",
license: "MIT",
repository: "github.com$username$repo",
homepage: "https:/$yourapp.com",
documentation: "https:/$docs.yourapp.com"
}
})
更新应用
mcp__flow-nexus__app_update({
app_id: "app_id",
updates: {
version: "1.1.0",
description: "Added OAuth2 support",
tags: ["auth", "jwt", "oauth2", "express"],
source_code: updatedSourceCode
}
})
部署模板
部署模板
mcp__flow-nexus__template_deploy({
template_name: "express-api-starter",
deployment_name: "my-production-api",
variables: {
api_key: "your_api_key",
database_url: "postgres:/$user:pass@host:5432$db",
redis_url: "redis:/$localhost:6379"
},
env_vars: {
NODE_ENV: "production",
PORT: "8080",
LOG_LEVEL: "info"
}
})
分析与管理
获取应用分析数据
mcp__flow-nexus__app_analytics({
app_id: "your_app_id",
timeframe: "30d" // 24h, 7d, 30d, 90d
})
查看已安装的应用
mcp__flow-nexus__app_installed({
user_id: "your_user_id"
})
获取市场统计信息
mcp__flow-nexus__market_data()
应用类别
- web-api:RESTful API 和微服务
- frontend:React、Vue、Angular 应用
- full-stack:完整的端到端应用
- cli-tools:命令行实用工具
- data-processing:ETL 流水线和分析
- ml-models:预训练机器学习模型
- blockchain:Web3 和区块链应用
- mobile:React Native 和移动应用
发布最佳实践
- 文档:提供完整的 README,包含设置说明
- 示例:提供用法示例和示例配置
- 测试:包含测试套件和 CI/CD 配置
- 版本管理:使用语义化版本(MAJOR.MINOR.PATCH)
- 许可:添加明确的许可证信息(MIT、Apache 等)
- 部署:包含 Docker$docker-compose 配置
- 迁移:提供版本更新的升级指南
- 安全性:记录安全注意事项和最佳实践
收益分成
- 其他人部署你的模板时,可赚取 rUv 积分
- 设置价格(0 表示免费,或设置积分价格)
- 通过分析数据跟踪使用情况和收益
- 提取积分,或用于 Flow Nexus 服务
支付与积分
余额与积分
检查积分余额
mcp__flow-nexus__check_balance()
检查 rUv 余额
mcp__flow-nexus__ruv_balance({
user_id: "your_user_id"
})
查看交易记录
mcp__flow-nexus__ruv_history({
user_id: "your_user_id",
limit: 100
})
获取支付记录
mcp__flow-nexus__get_payment_history({
limit: 50
})
购买积分
创建支付链接
mcp__flow-nexus__create_payment_link({
amount: 50 // USD, minimum $10
})
// Returns secure Stripe payment URL
自动充值配置
启用自动充值
mcp__flow-nexus__configure_auto_refill({
enabled: true,
threshold: 100, // Refill when credits drop below 100
amount: 50 // Purchase $50 worth of credits
})
禁用自动充值
mcp__flow-nexus__configure_auto_refill({
enabled: false
})
积分定价
服务费用:
- Swarm Operations:1-10 积分$小时
- Sandbox Execution:0.5-5 积分$小时
- Neural Training:5-50 积分$任务
- Workflow Runs:0.1-1 积分$次执行
- 存储:0.01 积分/GB$天
- API 调用:0.001-0.01 积分$请求
获取积分
获取方式:
- 完成挑战:每项挑战可获 10-500 积分
- 发布模板:其他人部署时即可获得收益(定价由你设置)
- 推荐计划:邀请用户可获奖励积分
- 每日登录:每日可获少量奖励(5-10 积分)
- 成就:解锁里程碑奖励(50-1000 积分)
- 应用商店销售:从付费模板中获得收入分成
以编程方式获取积分
mcp__flow-nexus__app_store_earn_ruv({
user_id: "your_user_id",
amount: 100,
reason: "Completed expert algorithm challenge",
source: "challenge" // challenge, app_usage, referral, etc.
})
订阅等级
免费等级
- 每月 100 个免费积分
- 基础沙盒访问权限(最多 2 个并发任务)
- Swarm Agent 数量有限(最多 3 个)
- 社区支持
- 1GB 存储空间
专业版($29$月)
- 每月 1000 个积分
- 优先沙盒访问权限(最多 10 个并发任务)
- Swarm Agent 数量不限
- 高级工作流
- 电子邮件支持
- 10GB 存储空间
- 提前体验新功能
企业版(定制定价)
- 积分不限
- 专用计算资源
- 定制神经网络模型
- 99.9% SLA 保证
- 全天候优先支持
- 存储空间不限
- 白标选项
- 本地部署
成本优化技巧
- 使用更小的沙盒:选择合适的模板(基础版或全栈版)
- 优化神经网络训练:调整超参数,减少训练轮数
- 批量操作:将工作流执行合并处理
- 清理资源:删除未使用的沙盒和存储
- 监控用量:定期查看
user_stats - 使用免费模板:利用社区模板
- 避开高峰时段:在低成本时段运行繁重任务
挑战与成就
浏览挑战
列出可用挑战
mcp__flow-nexus__challenges_list({
difficulty: "intermediate", // beginner, intermediate, advanced, expert
category: "algorithms",
status: "active", // active, completed, locked
limit: 20
})
获取挑战详情
mcp__flow-nexus__challenge_get({
challenge_id: "two-sum-problem"
})
提交解决方案
提交挑战解决方案
mcp__flow-nexus__challenge_submit({
challenge_id: "challenge_id",
user_id: "your_user_id",
solution_code: `
function twoSum(nums, target) {
const map = new Map();
for (let i = 0; i < nums.length; i++) {
const complement = target - nums[i];
if (map.has(complement)) {
return [map.get(complement), i];
}
map.set(nums[i], i);
}
return [];
}
`,
language: "javascript",
execution_time: 45 // milliseconds (optional)
})
将挑战标记为已完成
mcp__flow-nexus__app_store_complete_challenge({
challenge_id: "challenge_id",
user_id: "your_user_id",
submission_data: {
passed_tests: 10,
total_tests: 10,
execution_time: 45,
memory_usage: 2048 // KB
}
})
排行榜
全球排行榜
mcp__flow-nexus__leaderboard_get({
type: "global", // global, weekly, monthly, challenge
limit: 100
})
挑战专属排行榜
mcp__flow-nexus__leaderboard_get({
type: "challenge",
challenge_id: "specific_challenge_id",
limit: 50
})
成就与徽章
列出用户成就
mcp__flow-nexus__achievements_list({
user_id: "your_user_id",
category: "speed_demon" // Optional filter
})
挑战类别
- algorithms:经典算法问题(排序、搜索、图)
- data-structures:数据结构实现(树、堆、字典树)
- system-design:架构与可扩展性挑战
- optimization:性能与效率问题
- security:以安全为重点的漏洞与修复
- ml-basics:机器学习基础
- distributed-systems:并发与分布式计算
- databases:查询优化与架构设计
挑战难度奖励
- 入门:10-25 积分
- 中级:50-100 积分
- 高级:150-300 积分
- 专家:400-500 积分
- 大师:600-1000 积分
成就类型
- 速度达人:以创纪录的速度完成挑战
- 代码高尔夫:尽可能缩短代码长度
- 完美得分:测试通过率达到 100%
- 连胜大师:连续 N 天完成挑战
- 多语言通才:使用多种语言解题
- 调试员:修复有问题的代码挑战
- 优化大师:达到顶级性能基准
成功技巧
- 从简单开始:先完成入门挑战,建立信心
- 查看解决方案:完成挑战后学习优秀的解决方案
- 优化:兼顾正确性和性能
- 每日练习:完成每日挑战以获取奖励积分
- 参与社区:参与讨论并向他人学习
- 跟踪进度:查看成就和排行榜名次
- 积极尝试:尝试多种解题方法
存储与实时功能
文件存储
上传文件
mcp__flow-nexus__storage_upload({
bucket: "my-bucket", // public, private, shared, temp
path: "data$users.json",
content: JSON.stringify(userData, null, 2),
content_type: "application$json"
})
列出文件
mcp__flow-nexus__storage_list({
bucket: "my-bucket",
path: "data/", // prefix filter
limit: 100
})
获取公开 URL
mcp__flow-nexus__storage_get_url({
bucket: "my-bucket",
path: "data$report.pdf",
expires_in: 3600 // seconds (default: 1 hour)
})
删除文件
mcp__flow-nexus__storage_delete({
bucket: "my-bucket",
path: "data$old-file.json"
})
存储桶
- public:公开访问的文件(由 CDN 提供支持)
- private:通过身份验证仅供用户访问
- shared:通过 ACL 进行团队协作
- temp:24 小时后自动删除
实时订阅
订阅数据库变更
mcp__flow-nexus__realtime_subscribe({
table: "tasks",
event: "INSERT", // INSERT, UPDATE, DELETE, *
filter: "status=eq.pending AND priority=eq.high"
})
列出活动订阅
mcp__flow-nexus__realtime_list()
取消订阅
mcp__flow-nexus__realtime_unsubscribe({
subscription_id: "subscription_id"
})
执行监控
订阅执行流
mcp__flow-nexus__execution_stream_subscribe({
stream_type: "claude-flow-swarm", // claude-code, claude-flow-swarm, claude-flow-hive-mind, github-integration
deployment_id: "deployment_id",
sandbox_id: "sandbox_id" // alternative
})
获取流状态
mcp__flow-nexus__execution_stream_status({
stream_id: "stream_id"
})
列出生成的文件
mcp__flow-nexus__execution_files_list({
stream_id: "stream_id",
created_by: "claude-flow", // claude-code, claude-flow, git-clone, user
file_type: "javascript" // filter by extension
})
获取执行中的文件内容
mcp__flow-nexus__execution_file_get({
file_id: "file_id",
file_path: "$path$to$file.js" // alternative
})
系统实用工具
Queen Seraphina AI 助手
向 Seraphina 寻求指导
mcp__flow-nexus__seraphina_chat({
message: "How should I architect a distributed microservices system?",
enable_tools: true, // Allow her to create swarms, deploy code, etc.
conversation_history: [
{ role: "user", content: "I need help with system architecture" },
{ role: "assistant", content: "I can help you design that. What are your requirements?" }
]
})
Queen Seraphina 是一款先进的 AI 助手,具备以下能力:
- 精通分布式系统
- 能够创建蜂群并协调 Agent
- 代码部署和架构设计
- 支持保留上下文的多轮对话
- 使用工具提供实际帮助
系统健康与监控
检查系统健康状况
mcp__flow-nexus__system_health()
查看审计日志
mcp__flow-nexus__audit_log({
user_id: "your_user_id", // optional filter
limit: 100
})
身份验证管理
初始化身份验证
mcp__flow-nexus__auth_init({
mode: "user" // user, service
})
快速入门指南
步骤 1:注册并登录
// Register
mcp__flow-nexus__user_register({
email: "[email protected]",
password: "SecurePass123!",
full_name: "Developer Name"
})
// Login
mcp__flow-nexus__user_login({
email: "[email protected]",
password: "SecurePass123!"
})
// Check auth status
mcp__flow-nexus__auth_status({ detailed: true })
步骤 2:配置计费
// Check current balance
mcp__flow-nexus__check_balance()
// Add credits
const paymentLink = mcp__flow-nexus__create_payment_link({
amount: 50 // $50
})
// Setup auto-refill
mcp__flow-nexus__configure_auto_refill({
enabled: true,
threshold: 100,
amount: 50
})
步骤 3:创建第一个沙盒
// Create development sandbox
const sandbox = mcp__flow-nexus__sandbox_create({
template: "node",
name: "dev-environment",
install_packages: ["express", "dotenv"],
env_vars: {
NODE_ENV: "development"
}
})
// Execute code
mcp__flow-nexus__sandbox_execute({
sandbox_id: sandbox.id,
code: 'console.log("Hello Flow Nexus!")',
language: "javascript"
})
步骤 4:部署应用
// Browse templates
mcp__flow-nexus__template_list({
category: "backend",
featured: true
})
// Deploy template
mcp__flow-nexus__template_deploy({
template_name: "express-api-starter",
deployment_name: "my-api",
variables: {
database_url: "postgres://..."
}
})
步骤 5:完成挑战
// Find challenges
mcp__flow-nexus__challenges_list({
difficulty: "beginner",
category: "algorithms"
})
// Submit solution
mcp__flow-nexus__challenge_submit({
challenge_id: "fizzbuzz",
user_id: "your_id",
solution_code: "...",
language: "javascript"
})
最佳实践
安全
- 切勿将 API 密钥硬编码在代码中——请使用环境变量
- 在可用时启用 2FA
- 定期轮换密码和令牌
- 对敏感数据使用私有存储桶
- 定期查看审计日志
- 设置合适的文件过期时间
性能
- 清理未使用的沙盒以节省额度
- 尽可能使用较小的沙盒模板
- 删除旧文件以优化存储
- 批量执行操作以减少 API 调用
- 通过
user_stats监控用量 - 对临时数据使用临时存储桶
开发
- 部署前先在沙盒中测试
- 按语义化版本为应用编号
- 充分记录所有模板
- 在已发布的应用中加入测试
- 使用执行监控进行调试
- 利用实时订阅获取即时更新
成本管理
- 谨慎设置自动充值阈值
- 定期监控额度使用情况
- 完成每日挑战以获取奖励额度
- 发布模板以赚取被动额度
- 适当使用免费层资源
- 在非高峰时段安排高负载作业
故障排除
身份验证问题
- 登录失败:检查邮箱和密码,先验证邮箱
- 令牌过期:重新登录以获取新令牌
- 权限被拒绝:检查套餐限制,必要时升级
沙盒问题
- 沙盒无法启动:检查模板兼容性,并确认额度充足
- 执行超时:增加超时参数或优化代码
- 内存不足:使用更大的模板或优化内存用量
- 软件包安装失败:检查软件包名称,并确认 npm 和 pip 可用
付款问题
- 付款失败:检查付款方式和资金是否充足
- 额度未到账:等待 5-10 分钟以完成处理
- 自动充值无法使用:确认账户中已登记付款方式
挑战问题
- 提交被拒绝:检查代码语法,并确保所有测试通过
- 答案错误:查看测试用例,检查边界情况
- 性能过慢:优化算法复杂度
支持与资源
- 文档:https:/$docs.flow-nexus.ruv.io
- API 参考:https:/$api.flow-nexus.ruv.io$docs
- 状态页面:https:/$status.flow-nexus.ruv.io
- 社区论坛:https:/$community.flow-nexus.ruv.io
- GitHub 问题:https:/$github.com$ruvnet$flow-nexus$issues
- Discord:https:/$discord.gg$flow-nexus
- 电子邮件支持:[email protected](仅限 Pro/Enterprise)
渐进式披露
高级沙盒配置
自定义 Docker 镜像
mcp__flow-nexus__sandbox_create({
template: "base",
name: "custom-environment",
startup_script: `
apt-get update
apt-get install -y custom-package
git clone https:/$github.com$user$repo
cd repo && npm install
`
})
// Stage 2: Run mcp__flow-nexus__sandbox_execute({ sandbox_id: "id", code: "npm start", working_dir: "$app$dist" })
<$details>
<details>
<summary><strong>高级存储模式<$strong><$summary>
### 大文件上传(分块)
```javascript
const chunkSize = 5 * 1024 * 1024 // 5MB chunks
for (let i = 0; i < chunks.length; i++) {
await mcp__flow-nexus__storage_upload({
bucket: "private",
path: `large-file.bin.part${i}`,
content: chunks[i]
})
}
存储生命周期
// Upload to temp for processing
mcp__flow-nexus__storage_upload({
bucket: "temp",
path: "processing$data.json",
content: data
})
// Move to permanent storage after processing
mcp__flow-nexus__storage_upload({
bucket: "private",
path: "archive$processed-data.json",
content: processedData
})
<$details>
高级实时模式<$strong><$summary>
多表同步
const tables = ["users", "tasks", "notifications"]
tables.forEach(table => {
mcp__flow-nexus__realtime_subscribe({
table,
event: "*",
filter: `user_id=eq.${userId}`
})
})
事件驱动工作流
// Subscribe to task completion
mcp__flow-nexus__realtime_subscribe({
table: "tasks",
event: "UPDATE",
filter: "status=eq.completed"
})
// Trigger notification workflow on event
// (handled by your application logic)
版本历史
- v1.0.0(2025-10-19):初始综合平台技能
- 身份验证与用户管理
- 沙盒创建与执行
- 应用商店与部署
- 支付与积分
- 挑战与成就
- 存储与实时功能
- 系统工具与 Queen Seraphina 集成
此技能将 6 个 Flow Nexus 命令模块整合为一个综合平台管理界面。
const tables = ["users", "tasks", "notifications"]
tables.forEach(table => {
mcp__flow-nexus__realtime_subscribe({
table,
event: "*",
filter: `user_id=eq.${userId}`
})
})
// Subscribe to task completion
mcp__flow-nexus__realtime_subscribe({
table: "tasks",
event: "UPDATE",
filter: "status=eq.completed"
})
// Trigger notification workflow on event
// (handled by your application logic)
- 身份验证与用户管理
- 沙盒创建与执行
- 应用商店与部署
- 支付与积分
- 挑战与成就
- 存储与实时功能
- 系统工具与 Queen Seraphina 集成