From 35ceda351a521df1a71fb3896ab62e56c1e94fcd Mon Sep 17 00:00:00 2001 From: ruvnet Date: Wed, 15 Jul 2026 11:57:40 -0400 Subject: [PATCH] feat(init): auto-register ruflo with skills.sh for cross-agent skill catalog MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds a post-init step (maybeInstallSkillsSh) that runs `npx --yes skills add ruvnet/ruflo` at the end of every `ruflo init`, exposing ruflo's 134 skills to whatever agent the project uses (Claude Code, Cursor, Copilot, Gemini, Cline, ...). Best-effort — never fails the primary init; on any error prints a soft retry line. Uses windowsHide to avoid Windows console-flash on the spawn. - New: skills.sh.json at repo root with 34 groupings (one per plugin), 134 skills total, controlling how ruflo displays on skills.sh - New: --no-skills-sh flag (also honors RUFLO_NO_SKILLS_SH=1) to opt out - Skipped under --skip-claude and --format json, matching the existing maybeAutoDetectCodex sibling pattern Bumps @claude-flow/cli, claude-flow, and ruflo to 3.31.0 (MINOR — new flag + new default behavior, backward-compatible addition per CLAUDE.md semver policy). All 400 commands-deep tests pass. Co-Authored-By: RuFlo --- package.json | 2 +- ruflo/package.json | 2 +- skills.sh.json | 344 +++++++++++++++++++++++ v3/@claude-flow/cli/package-lock.json | 4 +- v3/@claude-flow/cli/package.json | 2 +- v3/@claude-flow/cli/src/commands/init.ts | 49 ++++ 6 files changed, 398 insertions(+), 5 deletions(-) create mode 100644 skills.sh.json diff --git a/package.json b/package.json index 023561ec81..deb45c2326 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "claude-flow", - "version": "3.30.5", + "version": "3.31.0", "description": "Ruflo - Enterprise AI agent orchestration for Claude Code. Deploy 60+ specialized agents in coordinated swarms with self-learning, fault-tolerant consensus, vector memory, and MCP integration", "main": "dist/index.js", "type": "module", diff --git a/ruflo/package.json b/ruflo/package.json index 81a9fcf54b..ada0ae2c05 100644 --- a/ruflo/package.json +++ b/ruflo/package.json @@ -1,6 +1,6 @@ { "name": "ruflo", - "version": "3.30.5", + "version": "3.31.0", "description": "Ruflo - Enterprise AI agent orchestration platform. Deploy 60+ specialized agents in coordinated swarms with self-learning, fault-tolerant consensus, vector memory, and MCP integration", "main": "bin/ruflo.js", "type": "module", diff --git a/skills.sh.json b/skills.sh.json new file mode 100644 index 0000000000..3174364fcf --- /dev/null +++ b/skills.sh.json @@ -0,0 +1,344 @@ +{ + "$schema": "https://www.skills.sh/schema/skills.sh.json", + "notGrouped": false, + "groupings": [ + { + "title": "ADR", + "description": "Architecture Decision Records with lifecycle and dependency tracking", + "skills": [ + "adr-create", + "adr-index", + "adr-reindex", + "adr-review", + "adr-verify" + ] + }, + { + "title": "Agents", + "description": "Managed cloud agents, WASM sandboxed agents, and nested subagent trees", + "skills": [ + "managed-agent", + "nested-subagents", + "wasm-agent", + "wasm-gallery" + ] + }, + { + "title": "AgentDB", + "description": "Semantic routing, HNSW vector search, and hierarchical recall", + "skills": [ + "agentdb-query", + "vector-search" + ] + }, + { + "title": "AI Defense", + "description": "PII detection and prompt-injection scanning", + "skills": [ + "pii-detect", + "safety-scan" + ] + }, + { + "title": "Autopilot", + "description": "Autonomous task loops with learned-pattern prediction", + "skills": [ + "autopilot-loop", + "autopilot-predict" + ] + }, + { + "title": "Browser", + "description": "Session-recorded browser automation with RVF-backed replay", + "skills": [ + "browser-auth-flow", + "browser-extract", + "browser-form-fill", + "browser-intent", + "browser-login", + "browser-record", + "browser-replay", + "browser-scrape", + "browser-screenshot-diff", + "browser-test" + ] + }, + { + "title": "Business Pods", + "description": "Composable business-domain agent bundles", + "skills": [ + "pod-sales" + ] + }, + { + "title": "Core", + "description": "Project init, plugin discovery, doctor health checks, and witness signing", + "skills": [ + "discover-plugins", + "init-project", + "ruflo-doctor", + "witness" + ] + }, + { + "title": "Cost Tracker", + "description": "Session cost telemetry, budgets, anomaly detection, and burn tracking", + "skills": [ + "cost-anomaly", + "cost-benchmark", + "cost-booster-edit", + "cost-booster-route", + "cost-budget-check", + "cost-burn", + "cost-compact-context", + "cost-conversation", + "cost-counterfactual", + "cost-diff", + "cost-export", + "cost-federation", + "cost-health", + "cost-optimize", + "cost-projection", + "cost-report", + "cost-session", + "cost-summary", + "cost-track", + "cost-trend" + ] + }, + { + "title": "Dynamic Agent Architecture", + "description": "Cognitive-pattern agents that adapt across tasks", + "skills": [ + "cognitive-pattern", + "daa-agent" + ] + }, + { + "title": "Domain-Driven Design", + "description": "Bounded-context scaffolding and aggregate validation", + "skills": [ + "ddd-aggregate", + "ddd-context", + "ddd-validate" + ] + }, + { + "title": "Documentation", + "description": "API doc generation with drift detection", + "skills": [ + "api-docs", + "doc-gen" + ] + }, + { + "title": "Federation", + "description": "Cross-installation zero-trust agent federation", + "skills": [ + "federation-audit", + "federation-init", + "federation-status" + ] + }, + { + "title": "Goals", + "description": "Deep research, dossier collection, and goal-oriented action planning", + "skills": [ + "deep-research", + "dossier-collect", + "goal-plan", + "horizon-track", + "research-synthesize" + ] + }, + { + "title": "Intelligence", + "description": "Learned model routing, IPFS pattern transfer, neural training", + "skills": [ + "intelligence-route", + "intelligence-transfer", + "neural-train" + ] + }, + { + "title": "IoT (Cognitum)", + "description": "ESP32 device fleet management with anomaly detection", + "skills": [ + "iot-anomalies", + "iot-firmware", + "iot-fleet", + "iot-register", + "iot-witness-verify" + ] + }, + { + "title": "Git Analysis", + "description": "Diff risk analysis and PR-lifecycle git workflows", + "skills": [ + "diff-analyze", + "git-workflow" + ] + }, + { + "title": "Knowledge Graph", + "description": "Entity/relation extraction with pathfinder traversal", + "skills": [ + "kg-extract", + "kg-traverse" + ] + }, + { + "title": "Loop Workers", + "description": "Recurring background workers via cron and interval scheduling", + "skills": [ + "cron-schedule", + "loop-worker" + ] + }, + { + "title": "Market Data", + "description": "OHLCV ingest with HNSW-indexed candlestick pattern matching", + "skills": [ + "market-ingest", + "market-pattern" + ] + }, + { + "title": "MetaHarness", + "description": "Harness scoring, MCP security scanning, drift detection, and adversarial red/blue testing", + "skills": [ + "harness-bench", + "harness-drift-from-history", + "harness-evolve", + "harness-genome", + "harness-gepa", + "harness-learn", + "harness-mcp-scan", + "harness-mint", + "harness-oia-audit", + "harness-score", + "harness-security-bench", + "harness-similarity", + "harness-threat-model" + ] + }, + { + "title": "Database Migrations", + "description": "Sequential migration generation with validation", + "skills": [ + "migrate-create", + "migrate-validate" + ] + }, + { + "title": "Neural Trader", + "description": "LSTM/Transformer strategy backtesting and portfolio optimization", + "skills": [ + "trader-backtest", + "trader-cloud-backtest", + "trader-explain", + "trader-portfolio", + "trader-portfolio-cg", + "trader-regime", + "trader-risk", + "trader-signal", + "trader-train" + ] + }, + { + "title": "Observability", + "description": "Distributed tracing and metrics aggregation with anomaly detection", + "skills": [ + "observe-metrics", + "observe-trace" + ] + }, + { + "title": "Plugin Creator", + "description": "Scaffold and validate new Claude Code plugins", + "skills": [ + "create-plugin", + "validate-plugin" + ] + }, + { + "title": "RAG Memory", + "description": "Hybrid search, Graph RAG, MMR reranking, memory bridging", + "skills": [ + "memory-bridge", + "memory-search" + ] + }, + { + "title": "RuVector", + "description": "HNSW embeddings, RVF cognitive containers, GNN clustering", + "skills": [ + "vector-cluster", + "vector-embed", + "vector-hyperbolic", + "vector-setup" + ] + }, + { + "title": "RuVLLM", + "description": "Local inference with MicroLoRA fine-tuning and multi-provider routing", + "skills": [ + "chat-format", + "llm-config" + ] + }, + { + "title": "RVF", + "description": "Portable session persistence across conversations", + "skills": [ + "rvf-manage", + "session-persist" + ] + }, + { + "title": "Security Audit", + "description": "Codebase security scanning and CVE dependency checks", + "skills": [ + "dependency-check", + "security-scan" + ] + }, + { + "title": "SPARC", + "description": "Specification-Pseudocode-Architecture-Refinement-Completion methodology", + "skills": [ + "sparc-implement", + "sparc-refine", + "sparc-spec" + ] + }, + { + "title": "Swarm", + "description": "Multi-agent swarm initialization and live event monitoring", + "skills": [ + "monitor-stream", + "swarm-init" + ] + }, + { + "title": "Test Generation", + "description": "TDD London School test generation with coverage gap detection", + "skills": [ + "tdd-repair", + "tdd-workflow", + "test-gaps" + ] + }, + { + "title": "Workflows", + "description": "GAIA benchmark runs and native workflow orchestration", + "skills": [ + "gaia-architecture-comparison", + "gaia-debugging", + "gaia-submission", + "workflow-create", + "workflow-run" + ] + } + ] +} diff --git a/v3/@claude-flow/cli/package-lock.json b/v3/@claude-flow/cli/package-lock.json index e9b157565d..3946ff53fb 100644 --- a/v3/@claude-flow/cli/package-lock.json +++ b/v3/@claude-flow/cli/package-lock.json @@ -1,12 +1,12 @@ { "name": "@claude-flow/cli", - "version": "3.30.5", + "version": "3.31.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@claude-flow/cli", - "version": "3.30.5", + "version": "3.31.0", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/v3/@claude-flow/cli/package.json b/v3/@claude-flow/cli/package.json index 591889dce7..fece1844fe 100644 --- a/v3/@claude-flow/cli/package.json +++ b/v3/@claude-flow/cli/package.json @@ -1,6 +1,6 @@ { "name": "@claude-flow/cli", - "version": "3.30.5", + "version": "3.31.0", "type": "module", "description": "Ruflo CLI - Enterprise AI agent orchestration with 60+ specialized agents, swarm coordination, MCP server, self-learning hooks, and vector memory for Claude Code", "main": "dist/src/index.js", diff --git a/v3/@claude-flow/cli/src/commands/init.ts b/v3/@claude-flow/cli/src/commands/init.ts index 4c85709805..4b90a1e33a 100644 --- a/v3/@claude-flow/cli/src/commands/init.ts +++ b/v3/@claude-flow/cli/src/commands/init.ts @@ -155,6 +155,47 @@ async function maybeAutoDetectCodex( } } +// Cross-agent skill registration via skills.sh. Runs `npx --yes skills add +// ruvnet/ruflo` so ruflo's 134 skills reach whatever agent the project uses +// (Claude Code, Cursor, Copilot, Gemini, Cline, …). Best-effort — never fails +// init. Opt-out: --no-skills-sh flag OR RUFLO_NO_SKILLS_SH=1. Skipped under +// --skip-claude and scripted `--format json` output. +// +// windowsHide silences the console flash the npx child would otherwise produce +// (anthropics/claude-code#14828 spawn hazard applies to hook-fired spawns, +// but our own subprocess spawns should always set this). +async function maybeInstallSkillsSh(ctx: CommandContext): Promise { + try { + if (ctx.flags['no-skills-sh'] === true) return; + if (ctx.flags.format === 'json') return; + if (/^(1|true|on|yes)$/i.test(String(process.env.RUFLO_NO_SKILLS_SH || ''))) return; + + const npxCmd = process.platform === 'win32' ? 'npx.cmd' : 'npx'; + if (!commandExists('npx')) return; + + output.writeln(); + output.printInfo('Registering ruflo with skills.sh (cross-agent skill catalog)…'); + + const { spawnSync } = await import('child_process'); + const result = spawnSync( + npxCmd, + ['--yes', 'skills', 'add', 'ruvnet/ruflo'], + { cwd: ctx.cwd, stdio: 'pipe', timeout: 60_000, windowsHide: true, encoding: 'utf-8' }, + ); + + if (result.status === 0) { + output.writeln(output.success(' ✓ ruflo skills registered via skills.sh — available to any agent in this project')); + output.writeln(output.dim(' Opt out next time: --no-skills-sh or RUFLO_NO_SKILLS_SH=1')); + } else { + // Common non-fatal reasons: offline, npx cache miss, skills CLI version + // mismatch, unknown package. Log a soft note; users can retry manually. + output.writeln(output.dim(' skills.sh registration skipped (network or npx cache) — retry with: npx --yes skills add ruvnet/ruflo')); + } + } catch { + // Skills.sh registration is a bonus, never a requirement — swallow everything. + } +} + // Codex initialization action async function initCodexAction( ctx: CommandContext, @@ -487,6 +528,7 @@ const initAction = async (ctx: CommandContext): Promise => { // #2666-adjacent — auto-detect + configure OpenAI Codex CLI if present if (!skipClaude) { await maybeAutoDetectCodex(ctx, { force, minimal, full }); + await maybeInstallSkillsSh(ctx); } // Handle --start-all or --start-daemon @@ -1330,6 +1372,12 @@ export const initCommand: Command = { type: 'boolean', default: false, }, + { + name: 'no-skills-sh', + description: 'Skip the post-init `npx skills add ruvnet/ruflo` registration (also honored via RUFLO_NO_SKILLS_SH=1)', + type: 'boolean', + default: false, + }, { name: 'all-agents', description: 'Install all agent categories (ADR-128: default is ~24 substrate agents; this restores the full set of ~89)', @@ -1358,6 +1406,7 @@ export const initCommand: Command = { { command: 'claude-flow init --codex --full', description: 'Codex init with all 137+ skills' }, { command: 'claude-flow init --dual', description: 'Initialize for both Claude Code and Codex' }, { command: 'claude-flow init --no-codex-detect', description: 'Skip auto-configuring OpenAI Codex even if it is installed' }, + { command: 'claude-flow init --no-skills-sh', description: 'Skip the post-init skills.sh registration' }, { command: 'claude-flow init --all-agents', description: 'Install all agent categories (~89 agents; ADR-128 opt-in)' }, ], action: initAction,