Agent skill

Agent Topology Optimizer

by ruvnet in ruvnet/ruflo

Agent skill for topology-optimizer - invoke with $agent-topology-optimizer

MITAuto-check passed

Install Agent Topology Optimizer

skills CLI
$ npx skills add ruvnet/ruflo --skill agent-topology-optimizer -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ruvnet/ruflo agent-topology-optimizer --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ruvnet/ruflo.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/agent-topology-optimizer .claude/skills/agent-topology-optimizer && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
agent-topology-optimizer
GitHub stars
74k
Used in
2 other repos
Token cost
~6.2k tokens
SKILL.md length
178 words
Files
1
Skills in repo
264
Repo updated
First seen
Licence
MIT

At a glance

Agent skill for topology-optimizer - invoke with $agent-topology-optimizer

  • Works in 6 steps: Dynamic Topology Reconfiguration → Network Latency Optimization → Agent Placement Strategies → …
  • SKILL.md covers Agent Profile, Core Capabilities, MCP Integration Hooks and Advanced Optimization Algorithms, plus 3 more sections
  • Calls npx

What it does

Agent Topology Optimizer is an agent skill from ruvnet/ruflo. Agent skill for topology-optimizer - invoke with $agent-topology-optimizer

Its SKILL.md is about 6.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: 🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory…. The licence is MIT.

Example prompts

  • “/agent-topology-optimizer”

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Dynamic Topology Reconfiguration
  2. Network Latency Optimization
  3. Agent Placement Strategies
  4. Communication Pattern Optimization
  5. Genetic Algorithm for Topology Evolution
  6. Simulated Annealing for Topology Optimization

What it can do on your machine

Read from SKILL.md and the folder at commit 58e0ae7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npx

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npx, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Agent Topology Optimizer loads about 6.2k tokens when it runs. Until then it costs about 25 tokens; SKILL.md has 178 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~25
When it runs · the whole SKILL.md, loaded when a task matches
~6.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from ruvnet/ruflo at commit 58e0ae7, republished under its MIT licence (© ruvnet). 178 words, ~6,167 tokens.

Download SKILL.mdSave it as .claude/skills/agent-topology-optimizer/SKILL.md (or your agent's skills folder).
name
agent-topology-optimizer
description
Agent skill for topology-optimizer - invoke with $agent-topology-optimizer

name: Topology Optimizer type: agent category: optimization description: Dynamic swarm topology reconfiguration and communication pattern optimization

Topology Optimizer Agent

Agent Profile

  • Name: Topology Optimizer
  • Type: Performance Optimization Agent
  • Specialization: Dynamic swarm topology reconfiguration and network optimization
  • Performance Focus: Communication pattern optimization and adaptive network structures

Core Capabilities

1. Dynamic Topology Reconfiguration
javascript
// Advanced topology optimization system
class TopologyOptimizer {
  constructor() {
    this.topologies = {
      hierarchical: new HierarchicalTopology(),
      mesh: new MeshTopology(),
      ring: new RingTopology(),
      star: new StarTopology(),
      hybrid: new HybridTopology(),
      adaptive: new AdaptiveTopology()
    };
    
    this.optimizer = new NetworkOptimizer();
    this.analyzer = new TopologyAnalyzer();
    this.predictor = new TopologyPredictor();
  }
  
  // Intelligent topology selection and optimization
  async optimizeTopology(swarm, workloadProfile, constraints = {}) {
    // Analyze current topology performance
    const currentAnalysis = await this.analyzer.analyze(swarm.topology);
    
    // Generate topology candidates based on workload
    const candidates = await this.generateCandidates(workloadProfile, constraints);
    
    // Evaluate each candidate topology
    const evaluations = await Promise.all(
      candidates.map(candidate => this.evaluateTopology(candidate, workloadProfile))
    );
    
    // Select optimal topology using multi-objective optimization
    const optimal = this.selectOptimalTopology(evaluations, constraints);
    
    // Plan migration strategy if topology change is beneficial
    if (optimal.improvement > constraints.minImprovement || 0.1) {
      const migrationPlan = await this.planMigration(swarm.topology, optimal.topology);
      return {
        recommended: optimal.topology,
        improvement: optimal.improvement,
        migrationPlan,
        estimatedDowntime: migrationPlan.estimatedDowntime,
        benefits: optimal.benefits
      };
    }
    
    return { recommended: null, reason: 'No significant improvement found' };
  }
  
  // Generate topology candidates
  async generateCandidates(workloadProfile, constraints) {
    const candidates = [];
    
    // Base topology variations
    for (const [type, topology] of Object.entries(this.topologies)) {
      if (this.isCompatible(type, workloadProfile, constraints)) {
        const variations = await topology.generateVariations(workloadProfile);
        candidates.push(...variations);
      }
    }
    
    // Hybrid topology generation
    const hybrids = await this.generateHybridTopologies(workloadProfile, constraints);
    candidates.push(...hybrids);
    
    // AI-generated novel topologies
    const aiGenerated = await this.generateAITopologies(workloadProfile);
    candidates.push(...aiGenerated);
    
    return candidates;
  }
  
  // Multi-objective topology evaluation
  async evaluateTopology(topology, workloadProfile) {
    const metrics = await this.calculateTopologyMetrics(topology, workloadProfile);
    
    return {
      topology,
      metrics,
      score: this.calculateOverallScore(metrics),
      strengths: this.identifyStrengths(metrics),
      weaknesses: this.identifyWeaknesses(metrics),
      suitability: this.calculateSuitability(metrics, workloadProfile)
    };
  }
}
2. Network Latency Optimization
javascript
// Advanced network latency optimization
class NetworkLatencyOptimizer {
  constructor() {
    this.latencyAnalyzer = new LatencyAnalyzer();
    this.routingOptimizer = new RoutingOptimizer();
    this.bandwidthManager = new BandwidthManager();
  }
  
  // Comprehensive latency optimization
  async optimizeLatency(network, communicationPatterns) {
    const optimization = {
      // Physical network optimization
      physical: await this.optimizePhysicalNetwork(network),
      
      // Logical routing optimization
      routing: await this.optimizeRouting(network, communicationPatterns),
      
      // Protocol optimization
      protocol: await this.optimizeProtocols(network),
      
      // Caching strategies
      caching: await this.optimizeCaching(communicationPatterns),
      
      // Compression optimization
      compression: await this.optimizeCompression(communicationPatterns)
    };
    
    return optimization;
  }
  
  // Physical network topology optimization
  async optimizePhysicalNetwork(network) {
    // Calculate optimal agent placement
    const placement = await this.calculateOptimalPlacement(network.agents);
    
    // Minimize communication distance
    const distanceOptimization = this.optimizeCommunicationDistance(placement);
    
    // Bandwidth allocation optimization
    const bandwidthOptimization = await this.optimizeBandwidthAllocation(network);
    
    return {
      placement,
      distanceOptimization,
      bandwidthOptimization,
      expectedLatencyReduction: this.calculateExpectedReduction(
        distanceOptimization, 
        bandwidthOptimization
      )
    };
  }
  
  // Intelligent routing optimization
  async optimizeRouting(network, patterns) {
    // Analyze communication patterns
    const patternAnalysis = this.analyzeCommunicationPatterns(patterns);
    
    // Generate optimal routing tables
    const routingTables = await this.generateOptimalRouting(network, patternAnalysis);
    
    // Implement adaptive routing
    const adaptiveRouting = new AdaptiveRoutingSystem(routingTables);
    
    // Load balancing across routes
    const loadBalancing = new RouteLoadBalancer(routingTables);
    
    return {
      routingTables,
      adaptiveRouting,
      loadBalancing,
      patternAnalysis
    };
  }
}
3. Agent Placement Strategies
javascript
// Sophisticated agent placement optimization
class AgentPlacementOptimizer {
  constructor() {
    this.algorithms = {
      genetic: new GeneticPlacementAlgorithm(),
      simulated_annealing: new SimulatedAnnealingPlacement(),
      particle_swarm: new ParticleSwarmPlacement(),
      graph_partitioning: new GraphPartitioningPlacement(),
      machine_learning: new MLBasedPlacement()
    };
  }
  
  // Multi-algorithm agent placement optimization
  async optimizePlacement(agents, constraints, objectives) {
    const results = new Map();
    
    // Run multiple algorithms in parallel
    const algorithmPromises = Object.entries(this.algorithms).map(
      async ([name, algorithm]) => {
        const result = await algorithm.optimize(agents, constraints, objectives);
        return [name, result];
      }
    );
    
    const algorithmResults = await Promise.all(algorithmPromises);
    
    for (const [name, result] of algorithmResults) {
      results.set(name, result);
    }
    
    // Ensemble optimization - combine best results
    const ensembleResult = await this.ensembleOptimization(results, objectives);
    
    return {
      bestPlacement: ensembleResult.placement,
      algorithm: ensembleResult.algorithm,
      score: ensembleResult.score,
      individualResults: results,
      improvementPotential: ensembleResult.improvement
    };
  }
  
  // Genetic algorithm for agent placement
  async geneticPlacementOptimization(agents, constraints) {
    const ga = new GeneticAlgorithm({
      populationSize: 100,
      mutationRate: 0.1,
      crossoverRate: 0.8,
      maxGenerations: 500,
      eliteSize: 10
    });
    
    // Initialize population with random placements
    const initialPopulation = this.generateInitialPlacements(agents, constraints);
    
    // Define fitness function
    const fitnessFunction = (placement) => this.calculatePlacementFitness(placement, constraints);
    
    // Evolve optimal placement
    const result = await ga.evolve(initialPopulation, fitnessFunction);
    
    return {
      placement: result.bestIndividual,
      fitness: result.bestFitness,
      generations: result.generations,
      convergence: result.convergenceHistory
    };
  }
  
  // Graph partitioning for agent placement
  async graphPartitioningPlacement(agents, communicationGraph) {
    // Use METIS-like algorithm for graph partitioning
    const partitioner = new GraphPartitioner({
      objective: 'minimize_cut',
      balanceConstraint: 0.05, // 5% imbalance tolerance
      refinement: true
    });
    
    // Create communication weight matrix
    const weights = this.createCommunicationWeights(agents, communicationGraph);
    
    // Partition the graph
    const partitions = await partitioner.partition(communicationGraph, weights);
    
    // Map partitions to physical locations
    const placement = this.mapPartitionsToLocations(partitions, agents);
    
    return {
      placement,
      partitions,
      cutWeight: partitioner.getCutWeight(),
      balance: partitioner.getBalance()
    };
  }
}
4. Communication Pattern Optimization
javascript
// Advanced communication pattern optimization
class CommunicationOptimizer {
  constructor() {
    this.patternAnalyzer = new PatternAnalyzer();
    this.protocolOptimizer = new ProtocolOptimizer();
    this.messageOptimizer = new MessageOptimizer();
    this.compressionEngine = new CompressionEngine();
  }
  
  // Comprehensive communication optimization
  async optimizeCommunication(swarm, historicalData) {
    // Analyze communication patterns
    const patterns = await this.patternAnalyzer.analyze(historicalData);
    
    // Optimize based on pattern analysis
    const optimizations = {
      // Message batching optimization
      batching: await this.optimizeMessageBatching(patterns),
      
      // Protocol selection optimization
      protocols: await this.optimizeProtocols(patterns),
      
      // Compression optimization
      compression: await this.optimizeCompression(patterns),
      
      // Caching strategies
      caching: await this.optimizeCaching(patterns),
      
      // Routing optimization
      routing: await this.optimizeMessageRouting(patterns)
    };
    
    return optimizations;
  }
  
  // Intelligent message batching
  async optimizeMessageBatching(patterns) {
    const batchingStrategies = [
      new TimeBatchingStrategy(),
      new SizeBatchingStrategy(),
      new AdaptiveBatchingStrategy(),
      new PriorityBatchingStrategy()
    ];
    
    const evaluations = await Promise.all(
      batchingStrategies.map(strategy => 
        this.evaluateBatchingStrategy(strategy, patterns)
      )
    );
    
    const optimal = evaluations.reduce((best, current) => 
      current.score > best.score ? current : best
    );
    
    return {
      strategy: optimal.strategy,
      configuration: optimal.configuration,
      expectedImprovement: optimal.improvement,
      metrics: optimal.metrics
    };
  }
  
  // Dynamic protocol selection
  async optimizeProtocols(patterns) {
    const protocols = {
      tcp: { reliability: 0.99, latency: 'medium', overhead: 'high' },
      udp: { reliability: 0.95, latency: 'low', overhead: 'low' },
      websocket: { reliability: 0.98, latency: 'medium', overhead: 'medium' },
      grpc: { reliability: 0.99, latency: 'low', overhead: 'medium' },
      mqtt: { reliability: 0.97, latency: 'low', overhead: 'low' }
    };
    
    const recommendations = new Map();
    
    for (const [agentPair, pattern] of patterns.pairwisePatterns) {
      const optimal = this.selectOptimalProtocol(protocols, pattern);
      recommendations.set(agentPair, optimal);
    }
    
    return recommendations;
  }
}

MCP Integration Hooks

Topology Management Integration
javascript
// Comprehensive MCP topology integration
const topologyIntegration = {
  // Real-time topology optimization
  async optimizeSwarmTopology(swarmId, optimizationConfig = {}) {
    // Get current swarm status
    const swarmStatus = await mcp.swarm_status({ swarmId });
    
    // Analyze current topology performance
    const performance = await mcp.performance_report({ format: 'detailed' });
    
    // Identify bottlenecks in current topology
    const bottlenecks = await mcp.bottleneck_analyze({ component: 'topology' });
    
    // Generate optimization recommendations
    const recommendations = await this.generateTopologyRecommendations(
      swarmStatus, 
      performance, 
      bottlenecks, 
      optimizationConfig
    );
    
    // Apply optimization if beneficial
    if (recommendations.beneficial) {
      const result = await mcp.topology_optimize({ swarmId });
      
      // Monitor optimization impact
      const impact = await this.monitorOptimizationImpact(swarmId, result);
      
      return {
        applied: true,
        recommendations,
        result,
        impact
      };
    }
    
    return {
      applied: false,
      recommendations,
      reason: 'No beneficial optimization found'
    };
  },
  
  // Dynamic swarm scaling with topology consideration
  async scaleWithTopologyOptimization(swarmId, targetSize, workloadProfile) {
    // Current swarm state
    const currentState = await mcp.swarm_status({ swarmId });
    
    // Calculate optimal topology for target size
    const optimalTopology = await this.calculateOptimalTopologyForSize(
      targetSize, 
      workloadProfile
    );
    
    // Plan scaling strategy
    const scalingPlan = await this.planTopologyAwareScaling(
      currentState,
      targetSize,
      optimalTopology
    );
    
    // Execute scaling with topology optimization
    const scalingResult = await mcp.swarm_scale({ 
      swarmId, 
      targetSize 
    });
    
    // Apply topology optimization after scaling
    if (scalingResult.success) {
      await mcp.topology_optimize({ swarmId });
    }
    
    return {
      scalingResult,
      topologyOptimization: scalingResult.success,
      finalTopology: optimalTopology
    };
  },
  
  // Coordination optimization
  async optimizeCoordination(swarmId) {
    // Analyze coordination patterns
    const coordinationMetrics = await mcp.coordination_sync({ swarmId });
    
    // Identify coordination bottlenecks
    const coordinationBottlenecks = await mcp.bottleneck_analyze({ 
      component: 'coordination' 
    });
    
    // Optimize coordination patterns
    const optimization = await this.optimizeCoordinationPatterns(
      coordinationMetrics,
      coordinationBottlenecks
    );
    
    return optimization;
  }
};
Neural Network Integration
javascript
// AI-powered topology optimization
class NeuralTopologyOptimizer {
  constructor() {
    this.models = {
      topology_predictor: null,
      performance_estimator: null,
      pattern_recognizer: null
    };
  }
  
  // Initialize neural models
  async initializeModels() {
    // Load pre-trained models or train new ones
    this.models.topology_predictor = await mcp.model_load({ 
      modelPath: '$models$topology_optimizer.model' 
    });
    
    this.models.performance_estimator = await mcp.model_load({ 
      modelPath: '$models$performance_estimator.model' 
    });
    
    this.models.pattern_recognizer = await mcp.model_load({ 
      modelPath: '$models$pattern_recognizer.model' 
    });
  }
  
  // AI-powered topology prediction
  async predictOptimalTopology(swarmState, workloadProfile) {
    if (!this.models.topology_predictor) {
      await this.initializeModels();
    }
    
    // Prepare input features
    const features = this.extractTopologyFeatures(swarmState, workloadProfile);
    
    // Predict optimal topology
    const prediction = await mcp.neural_predict({
      modelId: this.models.topology_predictor.id,
      input: JSON.stringify(features)
    });
    
    return {
      predictedTopology: prediction.topology,
      confidence: prediction.confidence,
      expectedImprovement: prediction.improvement,
      reasoning: prediction.reasoning
    };
  }
  
  // Train topology optimization model
  async trainTopologyModel(trainingData) {
    const trainingConfig = {
      pattern_type: 'optimization',
      training_data: JSON.stringify(trainingData),
      epochs: 100
    };
    
    const trainingResult = await mcp.neural_train(trainingConfig);
    
    // Save trained model
    if (trainingResult.success) {
      await mcp.model_save({
        modelId: trainingResult.modelId,
        path: '$models$topology_optimizer.model'
      });
    }
    
    return trainingResult;
  }
}

Advanced Optimization Algorithms

1. Genetic Algorithm for Topology Evolution
javascript
// Genetic algorithm implementation for topology optimization
class GeneticTopologyOptimizer {
  constructor(config = {}) {
    this.populationSize = config.populationSize || 50;
    this.mutationRate = config.mutationRate || 0.1;
    this.crossoverRate = config.crossoverRate || 0.8;
    this.maxGenerations = config.maxGenerations || 100;
    this.eliteSize = config.eliteSize || 5;
  }
  
  // Evolve optimal topology
  async evolve(initialTopologies, fitnessFunction, constraints) {
    let population = initialTopologies;
    let generation = 0;
    let bestFitness = -Infinity;
    let bestTopology = null;
    
    const convergenceHistory = [];
    
    while (generation < this.maxGenerations) {
      // Evaluate fitness for each topology
      const fitness = await Promise.all(
        population.map(topology => fitnessFunction(topology, constraints))
      );
      
      // Track best solution
      const maxFitnessIndex = fitness.indexOf(Math.max(...fitness));
      if (fitness[maxFitnessIndex] > bestFitness) {
        bestFitness = fitness[maxFitnessIndex];
        bestTopology = population[maxFitnessIndex];
      }
      
      convergenceHistory.push({
        generation,
        bestFitness,
        averageFitness: fitness.reduce((a, b) => a + b) / fitness.length
      });
      
      // Selection
      const selected = this.selection(population, fitness);
      
      // Crossover
      const offspring = await this.crossover(selected);
      
      // Mutation
      const mutated = await this.mutation(offspring, constraints);
      
      // Next generation
      population = this.nextGeneration(population, fitness, mutated);
      generation++;
    }
    
    return {
      bestTopology,
      bestFitness,
      generation,
      convergenceHistory
    };
  }
  
  // Topology crossover operation
  async crossover(parents) {
    const offspring = [];
    
    for (let i = 0; i < parents.length - 1; i += 2) {
      if (Math.random() < this.crossoverRate) {
        const [child1, child2] = await this.crossoverTopologies(
          parents[i], 
          parents[i + 1]
        );
        offspring.push(child1, child2);
      } else {
        offspring.push(parents[i], parents[i + 1]);
      }
    }
    
    return offspring;
  }
  
  // Topology mutation operation
  async mutation(population, constraints) {
    return Promise.all(
      population.map(async topology => {
        if (Math.random() < this.mutationRate) {
          return await this.mutateTopology(topology, constraints);
        }
        return topology;
      })
    );
  }
}
2. Simulated Annealing for Topology Optimization
javascript
// Simulated annealing implementation
class SimulatedAnnealingOptimizer {
  constructor(config = {}) {
    this.initialTemperature = config.initialTemperature || 1000;
    this.coolingRate = config.coolingRate || 0.95;
    this.minTemperature = config.minTemperature || 1;
    this.maxIterations = config.maxIterations || 10000;
  }
  
  // Simulated annealing optimization
  async optimize(initialTopology, objectiveFunction, constraints) {
    let currentTopology = initialTopology;
    let currentScore = await objectiveFunction(currentTopology, constraints);
    
    let bestTopology = currentTopology;
    let bestScore = currentScore;
    
    let temperature = this.initialTemperature;
    let iteration = 0;
    
    const history = [];
    
    while (temperature > this.minTemperature && iteration < this.maxIterations) {
      // Generate neighbor topology
      const neighborTopology = await this.generateNeighbor(currentTopology, constraints);
      const neighborScore = await objectiveFunction(neighborTopology, constraints);
      
      // Accept or reject the neighbor
      const deltaScore = neighborScore - currentScore;
      
      if (deltaScore > 0 || Math.random() < Math.exp(deltaScore / temperature)) {
        currentTopology = neighborTopology;
        currentScore = neighborScore;
        
        // Update best solution
        if (neighborScore > bestScore) {
          bestTopology = neighborTopology;
          bestScore = neighborScore;
        }
      }
      
      // Record history
      history.push({
        iteration,
        temperature,
        currentScore,
        bestScore
      });
      
      // Cool down
      temperature *= this.coolingRate;
      iteration++;
    }
    
    return {
      bestTopology,
      bestScore,
      iterations: iteration,
      history
    };
  }
  
  // Generate neighbor topology through local modifications
  async generateNeighbor(topology, constraints) {
    const modifications = [
      () => this.addConnection(topology, constraints),
      () => this.removeConnection(topology, constraints),
      () => this.modifyConnection(topology, constraints),
      () => this.relocateAgent(topology, constraints)
    ];
    
    const modification = modifications[Math.floor(Math.random() * modifications.length)];
    return await modification();
  }
}

Operational Commands

Topology Optimization Commands
bash
# Analyze current topology
npx claude-flow topology-analyze --swarm-id <id> --metrics performance

# Optimize topology automatically
npx claude-flow topology-optimize --swarm-id <id> --strategy adaptive

# Compare topology configurations
npx claude-flow topology-compare --topologies ["hierarchical", "mesh", "hybrid"]

# Generate topology recommendations
npx claude-flow topology-recommend --workload-profile <file> --constraints <file>

# Monitor topology performance
npx claude-flow topology-monitor --swarm-id <id> --interval 60
Agent Placement Commands
bash
# Optimize agent placement
npx claude-flow placement-optimize --algorithm genetic --agents <agent-list>

# Analyze placement efficiency
npx claude-flow placement-analyze --current-placement <config>

# Generate placement recommendations
npx claude-flow placement-recommend --communication-patterns <file>

Integration Points

With Other Optimization Agents
  • Load Balancer: Coordinates topology changes with load distribution
  • Performance Monitor: Receives topology performance metrics
  • Resource Manager: Considers resource constraints in topology decisions
With Swarm Infrastructure
  • Task Orchestrator: Adapts task distribution to topology changes
  • Agent Coordinator: Manages agent connections during topology updates
  • Memory System: Stores topology optimization history and patterns

Performance Metrics

Topology Performance Indicators
javascript
// Comprehensive topology metrics
const topologyMetrics = {
  // Communication efficiency
  communicationEfficiency: {
    latency: this.calculateAverageLatency(),
    throughput: this.calculateThroughput(),
    bandwidth_utilization: this.calculateBandwidthUtilization(),
    message_overhead: this.calculateMessageOverhead()
  },
  
  // Network topology metrics
  networkMetrics: {
    diameter: this.calculateNetworkDiameter(),
    clustering_coefficient: this.calculateClusteringCoefficient(),
    betweenness_centrality: this.calculateBetweennessCentrality(),
    degree_distribution: this.calculateDegreeDistribution()
  },
  
  // Fault tolerance
  faultTolerance: {
    connectivity: this.calculateConnectivity(),
    redundancy: this.calculateRedundancy(),
    single_point_failures: this.identifySinglePointFailures(),
    recovery_time: this.calculateRecoveryTime()
  },
  
  // Scalability metrics
  scalability: {
    growth_capacity: this.calculateGrowthCapacity(),
    scaling_efficiency: this.calculateScalingEfficiency(),
    bottleneck_points: this.identifyBottleneckPoints(),
    optimal_size: this.calculateOptimalSize()
  }
};

This Topology Optimizer agent provides sophisticated swarm topology optimization with AI-powered decision making, advanced algorithms, and comprehensive performance monitoring for optimal swarm coordination.

© ruvnet, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/agent-topology-optimizer of ruvnet/ruflo.

Open the folder on GitHubat commit 58e0ae7

Used in 2 other repositories

We found 2 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 2 other GitHub owners. This page covers the copy in ruvnet/ruflo, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Agent Topology Optimizer next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Agent Topology Optimizer compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Agent Topology Optimizer this skillruvnet/ruflo74k2 repos~6.2kAutomated safety check: PassMIT
SQL Optimizationgithub/awesome-copilot40k2 repos~2.3kAutomated safety check: PassMIT
Database Optimizerdavila7/claude-code-templates32k8 repos~2.5kAutomated safety check: PassMIT
Prompt Optimizeraffaan-m/ECC276k2 repos~2.4kAutomated safety check: PassMIT
Caveman Optimization EvaluatorJuliusBrussee/caveman111k1 repos~1.2kAutomated safety check: PassApache-2.0
Optimize Slurm TopologyNVlabs/alpasim1.3k—~1.6kAutomated safety check: PassApache-2.0

Similar skills

  • SQL Optimization

    github/awesome-copilot

    Official

    Universal SQL performance optimization assistant for comprehensive query tuning, indexing strategies, and database performance analysis across all SQL databases (MySQL, PostgreSQL, SQL Server…

    40k GitHub starsUsed in 2 repos~2.3k tokens
    DatabasesAuto-check passed
  • Database Optimizer

    davila7/claude-code-templates

    Expert database optimizer specializing in modern performance tuning, query optimization, and scalable architectures.

    32k GitHub starsUsed in 8 repos~2.5k tokens
    DatabasesAuto-check passed
  • Prompt Optimizer

    affaan-m/ECC

    分析原始提示,识别意图和差距,匹配ECC组件(技能/命令/代理/钩子),并输出一个可直接粘贴的优化提示。仅提供咨询角色——绝不自行执行任务。触发时机:当用户说“优化提示”、“改进我的提示”、“如何编写提示”、“帮我优化这个指令”或明确要求提高提示质量时。中文等效表达同样触发:“优化prompt”、“改进prompt”、“怎么写prompt”、“帮我优化这个指令”。不触发时机:当用户希望直接执行任…

    276k GitHub starsUsed in 2 repos~2.4k tokens
    DevelopmentAuto-check passed
  • Caveman Optimization Evaluator

    JuliusBrussee/caveman

    Turns a Caveman report-only optimization observation into one minimal code change and a paired baseline evaluation, after the operator picks which to pursue.

    111k GitHub starsUsed in 1 repo~1.2k tokens
    AI & LLM EngineeringAuto-check passed
  • Optimize AlpaSim Slurm topology throughput using persistent local Prometheus/Grafana telemetry and run artifacts.

    1.3k GitHub stars~1.6k tokensUpdated 21 days ago
    DevOps & CloudAuto-check passed
  • Optimized

    thedaviddias/Front-End-Checklist

    A skill your agent uses when reviewing image assets, markup, and CDN or build transforms related to Optimise images for faster loading.

    74k GitHub stars~828 tokensUpdated 2 days ago
    Auto-check passed

More from ruvnet/ruflo

All 264 skills in this repo
  • Stores, searches, and retrieves successful patterns with HNSW-indexed semantic search so agents can reuse past solutions instead of relearning them.

    74k GitHub starsUsed in 2 repos~830 tokens
    Auto-check passed
  • Runs claude-flow CLI security scans for input validation, path traversal, SQL injection, XSS, hardcoded secrets and known CVEs, and writes an audit report.

    74k GitHub starsUsed in 2 repos~823 tokens
    Auto-check passed
  • Applies the SPARC method (specification, pseudocode, architecture, refinement, completion) with 17 specialized modes and multi-agent orchestration, from research to deployment.

    74k GitHub starsUsed in 2 repos~829 tokens
    Auto-check passed
  • Coordinates a hierarchical swarm of specialized agents through the claude-flow CLI for work that spans several files or modules at once.

    74k GitHub starsUsed in 2 repos~779 tokens
    Auto-check passed
  • Sets up and drives Ruflo, an npm-installed orchestration layer for multi-agent swarms, persistent memory, routing, hooks and its MCP tool catalog.

    74k GitHub starsUsed in 1 repo~975 tokens
    Auto-check passed
  • Agent Coordination

    ruvnet/ruflo

    Reference for spawning, listing, monitoring and stopping agents with claude-flow commands, with agent type families, routing codes and coordination tips.

    74k GitHub starsUsed in 2 repos~519 tokens
    Auto-check passed

Questions about Agent Topology Optimizer

What does Agent Topology Optimizer do?

Agent skill for topology-optimizer - invoke with $agent-topology-optimizer. Agent Topology Optimizer is an agent skill from ruvnet/ruflo.

How do I install Agent Topology Optimizer in Claude Code?

Run `npx skills add ruvnet/ruflo --skill agent-topology-optimizer -a claude-code`. Or copy the skill folder (.agents/skills/agent-topology-optimizer in ruvnet/ruflo) into .claude/skills/agent-topology-optimizer in your project. Claude Code loads it when a task matches its description.

How do I install Agent Topology Optimizer in Codex?

Run `npx skills add ruvnet/ruflo --skill agent-topology-optimizer -a codex`. Or copy the skill folder (.agents/skills/agent-topology-optimizer in ruvnet/ruflo) into .agents/skills/agent-topology-optimizer in your project. Codex loads it when a task matches its description.

Can I use Agent Topology Optimizer in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ruvnet/ruflo --skill agent-topology-optimizer -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/agent-topology-optimizer, .gemini/skills/agent-topology-optimizer, .github/skills/agent-topology-optimizer and .opencode/skills/agent-topology-optimizer in your project.

What does Agent Topology Optimizer need to run?

Going by SKILL.md and its folder, Agent Topology Optimizer needs the command-line tools its instructions call (npx).

Does Agent Topology Optimizer access the network?

SKILL.md contains no URLs. Its commands use npx, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Agent Topology Optimizer safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Agent Topology Optimizer use?

Agent Topology Optimizer is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Agent Topology Optimizer use?

About 6.2k tokens (SKILL.md is roughly 25k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Agent Topology Optimizer?

Skills that share tags, products or a category with Agent Topology Optimizer: SQL Optimization (github/awesome-copilot, 40k stars), Database Optimizer (davila7/claude-code-templates, 32k stars), Prompt Optimizer (affaan-m/ECC, 276k stars) and Caveman Optimization Evaluator (JuliusBrussee/caveman, 111k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Agent Topology Optimizer?

ruvnet (a GitHub user) maintains it in ruvnet/ruflo, which has 74,159 GitHub stars. The repository holds 264 skills in this directory. The repository was last updated on October 9, 2026.

Source: ruvnet/ruflo on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.