Chuyển đến nội dung
Skillpedia
Triển khai và đám mây (DevOps)81k · #1502

agent-resource-allocator

Skill này làm gì

Skill này hướng dẫn agent phân bổ tài nguyên máy tính cho các công việc khác nhau và dự đoán khi nào cần thêm dung lượng. Phù hợp với người vận hành máy chủ, ứng dụng hoặc nhóm agent và muốn dùng tài nguyên hiệu quả.

Khi nào nên dùng

  • ✓Khi một phần của hệ thống liên tục thiếu bộ nhớ hoặc sức xử lý.
  • ✓Khi bạn muốn lên kế hoạch dung lượng trước một mùa cao điểm hoặc đợt ra mắt.
  • ✓Khi một hệ thống trả tiền cho tài nguyên mà gần như không dùng.

Liên kết skill

https://github.com/ruvnet/ruflo/blob/main/.agents/skills/agent-resource-allocator/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/ruvnet/ruflo/blob/main/.agents/skills/agent-resource-allocator/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Kiểm tra cách máy chủ của chúng tôi dùng bộ nhớ và sức xử lý, và cho tôi biết khi nào chúng tôi cần thêm dung lượng.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent xem mức dùng hiện tại, dự đoán nhu cầu trong tương lai dựa trên các mẫu trước đó, và gợi ý cách chia tài nguyên giữa các công việc.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.


name: Resource Allocator type: agent category: optimization description: Adaptive resource allocation, predictive scaling and intelligent capacity planning

Resource Allocator Agent

Agent Profile

  • Name: Resource Allocator
  • Type: Performance Optimization Agent
  • Specialization: Adaptive resource allocation and predictive scaling
  • Performance Focus: Intelligent resource management and capacity planning

Core Capabilities

1. Adaptive Resource Allocation

// Advanced adaptive resource allocation system
class AdaptiveResourceAllocator {
  constructor() {
    this.allocators = {
      cpu: new CPUAllocator(),
      memory: new MemoryAllocator(),
      storage: new StorageAllocator(),
      network: new NetworkAllocator(),
      agents: new AgentAllocator()
    };
    
    this.predictor = new ResourcePredictor();
    this.optimizer = new AllocationOptimizer();
    this.monitor = new ResourceMonitor();
  }
  
  // Dynamic resource allocation based on workload patterns
  async allocateResources(swarmId, workloadProfile, constraints = {}) {
    // Analyze current resource usage
    const currentUsage = await this.analyzeCurrentUsage(swarmId);
    
    // Predict future resource needs
    const predictions = await this.predictor.predict(workloadProfile, currentUsage);
    
    // Calculate optimal allocation
    const allocation = await this.optimizer.optimize(predictions, constraints);
    
    // Apply allocation with gradual rollout
    const rolloutPlan = await this.planGradualRollout(allocation, currentUsage);
    
    // Execute allocation
    const result = await this.executeAllocation(rolloutPlan);
    
    return {
      allocation,
      rolloutPlan,
      result,
      monitoring: await this.setupMonitoring(allocation)
    };
  }
  
  // Workload pattern analysis
  async analyzeWorkloadPatterns(historicalData, timeWindow = '7d') {
    const patterns = {
      // Temporal patterns
      temporal: {
        hourly: this.analyzeHourlyPatterns(historicalData),
        daily: this.analyzeDailyPatterns(historicalData),
        weekly: this.analyzeWeeklyPatterns(historicalData),
        seasonal: this.analyzeSeasonalPatterns(historicalData)
      },
      
      // Load patterns
      load: {
        baseline: this.calculateBaselineLoad(historicalData),
        peaks: this.identifyPeakPatterns(historicalData),
        valleys: this.identifyValleyPatterns(historicalData),
        spikes: this.detectAnomalousSpikes(historicalData)
      },
      
      // Resource correlation patterns
      correlations: {
        cpu_memory: this.analyzeCPUMemoryCorrelation(historicalData),
        network_load: this.analyzeNetworkLoadCorrelation(historicalData),
        agent_resource: this.analyzeAgentResourceCorrelation(historicalData)
      },
      
      // Predictive indicators
      indicators: {
        growth_rate: this.calculateGrowthRate(historicalData),
        volatility: this.calculateVolatility(historicalData),
        predictability: this.calculatePredictability(historicalData)
      }
    };
    
    return patterns;
  }
  
  // Multi-objective resource optimization
  async optimizeResourceAllocation(resources, demands, objectives) {
    const optimizationProblem = {
      variables: this.defineOptimizationVariables(resources),
      constraints: this.defineConstraints(resources, demands),
      objectives: this.defineObjectives(objectives)
    };
    
    // Use multi-objective genetic algorithm
    const solver = new MultiObjectiveGeneticSolver({
      populationSize: 100,
      generations: 200,
      mutationRate: 0.1,
      crossoverRate: 0.8
    });
    
    const solutions = await solver.solve(optimizationProblem);
    
    // Select solution from Pareto front
    const selectedSolution = this.selectFromParetoFront(solutions, objectives);
    
    return {
      optimalAllocation: selectedSolution.allocation,
      paretoFront: solutions.paretoFront,
      tradeoffs: solutions.tradeoffs,
      confidence: selectedSolution.confidence
    };
  }
}

2. Predictive Scaling with Machine Learning

// ML-powered predictive scaling system
class PredictiveScaler {
  constructor() {
    this.models = {
      time_series: new LSTMTimeSeriesModel(),
      regression: new RandomForestRegressor(),
      anomaly: new IsolationForestModel(),
      ensemble: new EnsemblePredictor()
    };
    
    this.featureEngineering = new FeatureEngineer();
    this.dataP
Câu hỏi thường gặp

Mở rộng dự đoán là gì?

Đó là việc ước tính nhu cầu tương lai từ các mẫu trước đây, để thêm dung lượng trước khi cần.

Nó có tự thay đổi máy chủ không?

Skill tập trung vào phân tích và lập kế hoạch, nên bạn quyết định thay đổi nào sẽ thực hiện.

Nó bao quát những tài nguyên nào?

Skill bao quát sức xử lý, bộ nhớ, lưu trữ, mạng và số lượng agent.

Chi tiết

Mô tả gốc của tác giả

Agent skill for resource-allocator - invoke with $agent-resource-allocator

repo: ruvnet/ruflo

Độ phổ biến

Sao GitHub
81k
Vị trí xếp hạng
#1502
Giấy phép
MIT
Cập nhật
2/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự