agent-topology-optimizer
Agent skill for topology-optimizer - invoke with $agent-topology-optimizer
Install
mkdir -p .claude/skills/agent-topology-optimizer && curl -L -o skill.zip "https://mcp.directory/api/skills/download/5853" && unzip -o skill.zip -d .claude/skills/agent-topology-optimizer && rm skill.zipInstalls to .claude/skills/agent-topology-optimizer
About this skill
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
// 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
// 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
// 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
// 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
ca
---
*Content truncated.*
More by ruvnet
View all skills by ruvnet →You might also like
flutter-development
aj-geddes
Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.
drawio-diagrams-enhanced
jgtolentino
Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.
ui-ux-pro-max
nextlevelbuilder
"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."
godot
bfollington
This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.
nano-banana-pro
garg-aayush
Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.
fastapi-templates
wshobson
Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.
Related MCP Servers
Browse all serversStay ahead of the MCP ecosystem
Get weekly updates on new skills and servers.