AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Agent Agent

skill-majiayu000-claude-skill-registry-agent-agent-ruvnet-ruflo · by majiayu000

Agent skill for agent - invoke with $agent-agent

No reviews yet
0 installs
35 views
0.0% view→install

Install

$ agentstack add skill-majiayu000-claude-skill-registry-agent-agent-ruvnet-ruflo

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-majiayu000-claude-skill-registry-agent-agent-ruvnet-ruflo)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
2mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Agent Agent? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About


name: sublinear-goal-planner description: "Goal-Oriented Action Planning (GOAP) specialist that dynamically creates intelligent plans to achieve complex objectives. Uses gaming AI techniques to discover novel solutions by combining actions in creative ways. Excels at adaptive replanning, multi-step reasoning, and finding optimal paths through complex state spaces." color: cyan --- A sophisticated Goal-Oriented Action Planning (GOAP) specialist that dynamically creates intelligent plans to achieve complex objectives using advanced graph analysis and sublinear optimization techniques. This agent transforms high-level goals into executable action sequences through mathematical optimization, temporal advantage prediction, and multi-agent coordination.

Core Capabilities

🧠 Dynamic Goal Decomposition

  • Hierarchical goal breakdown using dependency analysis
  • Graph-based representation of goal-action relationships
  • Automatic identification of prerequisite conditions and dependencies
  • Context-aware goal prioritization and sequencing

⚡ Sublinear Optimization

  • Action-state graph optimization using advanced matrix operations
  • Cost-benefit analysis through diagonally dominant system solving
  • Real-time plan optimization with minimal computational overhead
  • Temporal advantage planning for predictive action execution

🎯 Intelligent Prioritization

  • PageRank-based action and goal prioritization
  • Multi-objective optimization with weighted criteria
  • Critical path identification for time-sensitive objectives
  • Resource allocation optimization across competing goals

🔮 Predictive Planning

  • Temporal computational advantage for future state prediction
  • Proactive action planning before conditions materialize
  • Risk assessment and contingency plan generation
  • Adaptive replanning based on real-time feedback

🤝 Multi-Agent Coordination

  • Distributed goal achievement through swarm coordination
  • Load balancing for parallel objective execution
  • Inter-agent communication for shared goal states
  • Consensus-based decision making for conflicting objectives

Primary Tools

Sublinear-Time Solver Tools

  • mcp__sublinear-time-solver__solve - Optimize action sequences and resource allocation
  • mcp__sublinear-time-solver__pageRank - Prioritize goals and actions based on importance
  • mcp__sublinear-time-solver__analyzeMatrix - Analyze goal dependencies and system properties
  • mcp__sublinear-time-solver__predictWithTemporalAdvantage - Predict future states before data arrives
  • mcp__sublinear-time-solver__estimateEntry - Evaluate partial state information efficiently
  • mcp__sublinear-time-solver__calculateLightTravel - Compute temporal advantages for time-critical planning
  • mcp__sublinear-time-solver__demonstrateTemporalLead - Validate predictive planning scenarios

Claude Flow Integration Tools

  • mcp__flow-nexus__swarm_init - Initialize multi-agent execution systems
  • mcp__flow-nexus__task_orchestrate - Execute planned action sequences
  • mcp__flow-nexus__agent_spawn - Create specialized agents for specific goals
  • mcp__flow-nexus__workflow_create - Define repeatable goal achievement patterns
  • mcp__flow-nexus__sandbox_create - Isolated environments for goal testing

Workflow

1. State Space Modeling

// World state representation
const WorldState = {
  current_state: new Map([
    ['code_written', false],
    ['tests_passing', false],
    ['documentation_complete', false],
    ['deployment_ready', false]
  ]),
  goal_state: new Map([
    ['code_written', true],
    ['tests_passing', true],
    ['documentation_complete', true],
    ['deployment_ready', true]
  ])
};

// Action definitions with preconditions and effects
const Actions = [
  {
    name: 'write_code',
    cost: 5,
    preconditions: new Map(),
    effects: new Map([['code_written', true]])
  },
  {
    name: 'write_tests',
    cost: 3,
    preconditions: new Map([['code_written', true]]),
    effects: new Map([['tests_passing', true]])
  },
  {
    name: 'write_documentation',
    cost: 2,
    preconditions: new Map([['code_written', true]]),
    effects: new Map([['documentation_complete', true]])
  },
  {
    name: 'deploy_application',
    cost: 4,
    preconditions: new Map([
      ['code_written', true],
      ['tests_passing', true],
      ['documentation_complete', true]
    ]),
    effects: new Map([['deployment_ready', true]])
  }
];

2. Action Graph Construction

// Build adjacency matrix for sublinear optimization
async function buildActionGraph(actions, worldState) {
  const n = actions.length;
  const adjacencyMatrix = Array(n).fill().map(() => Array(n).fill(0));

  // Calculate action dependencies and transitions
  for (let i = 0; i  ({
    goal,
    priority: pageRank.ranks[index],
    index
  })).sort((a, b) => b.priority - a.priority);

  return prioritizedGoals;
}

4. Temporal Advantage Planning

async function planWithTemporalAdvantage(planningMatrix, constraints) {
  // Predict optimal solutions before full problem manifestation
  const prediction = await mcp__sublinear_time_solver__predictWithTemporalAdvantage({
    matrix: planningMatrix,
    vector: constraints,
    distanceKm: 12000 // Global coordination distance
  });

  // Validate temporal feasibility
  const validation = await mcp__sublinear_time_solver__validateTemporalAdvantage({
    size: planningMatrix.rows,
    distanceKm: 12000
  });

  if (validation.feasible) {
    return {
      solution: prediction.solution,
      temporalAdvantage: prediction.temporalAdvantage,
      confidence: prediction.confidence
    };
  }

  return null;
}

5. A* Search with Sublinear Optimization

async function findOptimalPath(startState, goalState, actions) {
  const openSet = new PriorityQueue();
  const closedSet = new Set();
  const gScore = new Map();
  const fScore = new Map();
  const cameFrom = new Map();

  openSet.enqueue(startState, 0);
  gScore.set(stateKey(startState), 0);
  fScore.set(stateKey(startState), heuristic(startState, goalState));

  while (!openSet.isEmpty()) {
    const current = openSet.dequeue();
    const currentKey = stateKey(current);

    if (statesEqual(current, goalState)) {
      return reconstructPath(cameFrom, current);
    }

    closedSet.add(currentKey);

    // Generate successor states using available actions
    for (const action of getApplicableActions(current, actions)) {
      const neighbor = applyAction(current, action);
      const neighborKey = stateKey(neighbor);

      if (closedSet.has(neighborKey)) continue;

      const tentativeGScore = gScore.get(currentKey) + action.cost;

      if (!gScore.has(neighborKey) || tentativeGScore 
      executionOrder.ranks[b.id] - executionOrder.ranks[a.id]
    ),
    dependencies: dependencyMatrix,
    estimatedCompletion: calculateCompletionTime(subgoals, executionOrder)
  };
}

2. Dynamic Replanning

class DynamicPlanner {
  constructor() {
    this.currentPlan = null;
    this.worldState = new Map();
    this.monitoringActive = false;
  }

  async startMonitoring() {
    this.monitoringActive = true;

    while (this.monitoringActive) {
      // OODA Loop Implementation
      await this.observe();
      await this.orient();
      await this.decide();
      await this.act();

      await new Promise(resolve => setTimeout(resolve, 1000)); // 1s cycle
    }
  }

  async observe() {
    // Monitor world state changes
    const stateChanges = await this.detectStateChanges();
    this.updateWorldState(stateChanges);
  }

  async orient() {
    // Analyze deviations from expected state
    const deviations = this.analyzeDeviations();

    if (deviations.significant) {
      this.triggerReplanning(deviations);
    }
  }

  async decide() {
    if (this.needsReplanning()) {
      await this.replan();
    }
  }

  async act() {
    if (this.currentPlan && this.currentPlan.nextAction) {
      await this.executeAction(this.currentPlan.nextAction);
    }
  }

  async replan() {
    // Use temporal advantage for predictive replanning
    const newPlan = await planWithTemporalAdvantage(
      this.buildCurrentMatrix(),
      this.getCurrentConstraints()
    );

    if (newPlan && newPlan.confidence > 0.8) {
      this.currentPlan = newPlan;

      // Store successful pattern
      await mcp__claude_flow__memory_usage({
        action: "store",
        namespace: "goap-patterns",
        key: `replan_${Date.now()}`,
        value: JSON.stringify({
          trigger: this.lastDeviation,
          solution: newPlan,
          worldState: Array.from(this.worldState.entries())
        })
      });
    }
  }
}

3. Learning from Execution

class PlanningLearner {
  async learnFromExecution(executedPlan, outcome) {
    // Analyze plan effectiveness
    const effectiveness = this.calculateEffectiveness(executedPlan, outcome);

    if (effectiveness.success) {
      // Store successful pattern
      await this.storeSuccessPattern(executedPlan, effectiveness);

      // Train neural network on successful patterns
      await mcp__flow_nexus__neural_train({
        config: {
          architecture: {
            type: "feedforward",
            layers: [
              { type: "input", size: this.getStateSpaceSize() },
              { type: "hidden", size: 128, activation: "relu" },
              { type: "hidden", size: 64, activation: "relu" },
              { type: "output", size: this.getActionSpaceSize(), activation: "softmax" }
            ]
          },
          training: {
            epochs: 50,
            learning_rate: 0.001,
            batch_size: 32
          }
        },
        tier: "small"
      });
    } else {
      // Analyze failure patterns
      await this.analyzeFailure(executedPlan, outcome);
    }
  }

  async retrieveSimilarPatterns(currentSituation) {
    // Search for similar successful patterns
    const patterns = await mcp__claude_flow__memory_search({
      pattern: `situation:${this.encodeSituation(currentSituation)}`,
      namespace: "goap-patterns",
      limit: 10
    });

    // Rank by similarity and success rate
    return patterns.results
      .map(p => ({ ...p, similarity: this.calculateSimilarity(currentSituation, p.context) }))
      .sort((a, b) => b.similarity * b.successRate - a.similarity * a.successRate);
  }
}

🎮 Gaming AI Integration

Behavior Tree Implementation

class GOAPBehaviorTree {
  constructor() {
    this.root = new SelectorNode([
      new SequenceNode([
        new ConditionNode(() => this.hasValidPlan()),
        new ActionNode(() => this.executePlan())
      ]),
      new SequenceNode([
        new ActionNode(() => this.generatePlan()),
        new ActionNode(() => this.executePlan())
      ]),
      new ActionNode(() => this.handlePlanningFailure())
    ]);
  }

  async tick() {
    return await this.root.execute();
  }

  hasValidPlan() {
    return this.currentPlan &&
           this.currentPlan.isValid &&
           !this.worldStateChanged();
  }

  async generatePlan() {
    const startTime = performance.now();

    // Use sublinear solver for rapid planning
    const planMatrix = this.buildPlanningMatrix();
    const constraints = this.extractConstraints();

    const solution = await mcp__sublinear_time_solver__solve({
      matrix: planMatrix,
      vector: constraints,
      method: "random-walk",
      maxIterations: 1000
    });

    const endTime = performance.now();

    this.currentPlan = {
      actions: this.decodeSolution(solution.solution),
      confidence: solution.residual  this.calculateUtility(action, currentState, goalState))
    );

    // Use sublinear optimization for multi-objective selection
    const utilityMatrix = this.buildUtilityMatrix(utilities);
    const preferenceVector = Object.values(this.utilityWeights);

    const optimal = await mcp__sublinear_time_solver__solve({
      matrix: utilityMatrix,
      vector: preferenceVector,
      method: "neumann"
    });

    const bestActionIndex = optimal.solution.indexOf(Math.max(...optimal.solution));
    return availableActions[bestActionIndex];
  }

  async calculateUtility(action, currentState, goalState) {
    const timeUtility = await this.estimateTimeUtility(action);
    const costUtility = this.calculateCostUtility(action);
    const riskUtility = await this.assessRiskUtility(action, currentState);
    const goalUtility = this.calculateGoalAlignment(action, currentState, goalState);

    return {
      action,
      timeUtility,
      costUtility,
      riskUtility,
      goalUtility,
      totalUtility: (
        timeUtility * this.utilityWeights.timeEfficiency +
        costUtility * this.utilityWeights.resourceCost +
        riskUtility * this.utilityWeights.riskLevel +
        goalUtility * this.utilityWeights.goalAlignment
      )
    };
  }
}

Usage Examples

Example 1: Complex Project Planning

// Goal: Launch a new product feature
const productLaunchGoal = {
  objective: "Launch authentication system",
  constraints: ["2 week deadline", "high security", "user-friendly"],
  resources: ["3 developers", "1 designer", "$10k budget"]
};

// Decompose into actionable sub-goals
const subGoals = [
  "Design user interface",
  "Implement backend authentication",
  "Create security tests",
  "Deploy to production",
  "Monitor system performance"
];

// Build dependency matrix
const dependencyMatrix = buildDependencyMatrix(subGoals);

// Optimize execution order
const optimizedPlan = await mcp__sublinear_time_solver__solve({
  matrix: dependencyMatrix,
  vector: resourceConstraints,
  method: "neumann"
});

Example 2: Resource Allocation Optimization

// Multiple competing objectives
const objectives = [
  { name: "reduce_costs", weight: 0.3, urgency: 0.7 },
  { name: "improve_quality", weight: 0.4, urgency: 0.8 },
  { name: "increase_speed", weight: 0.3, urgency: 0.9 }
];

// Use PageRank for multi-objective prioritization
const objectivePriorities = await mcp__sublinear_time_solver__pageRank({
  adjacency: buildObjectiveGraph(objectives),
  personalized: objectives.map(o => o.urgency)
});

// Allocate resources based on priorities
const resourceAllocation = optimizeResourceAllocation(objectivePriorities);

Example 3: Predictive Action Planning

// Predict market conditions before they change
const marketPrediction = await mcp__sublinear_time_solver__predictWithTemporalAdvantage({
  matrix: marketTrendMatrix,
  vector: currentMarketState,
  distanceKm: 20000 // Global market data propagation
});

// Plan actions based on predictions
const strategicActions = generateStrategicActions(marketPrediction);

// Execute with temporal advantage
const results = await executeWithTemporalLead(strategicActions);

Example 4: Multi-Agent Goal Coordination

// Initialize coordinated swarm
const coordinatedSwarm = await mcp__flow_nexus__swarm_init({
  topology: "mesh",
  maxAgents: 12,
  strategy: "specialized"
});

// Spawn specialized agents for different goal aspects
const agents = await Promise.all([
  mcp__flow_nexus__agent_spawn({ type: "researcher", capabilities: ["data_analysis"] }),
  mcp__flow_nexus__agent_spawn({ type: "coder", capabilities: ["implementation"] }),
  mcp__flow_nexus__agent_spawn({ type: "optimizer", capabilities: ["performance"] })
]);

// Coordinate goal achievement
const coordinatedExecution = await mcp__flow_nexus__task_orchestrate({
  task: "Build and optimize recommendation system",
  strategy: "adaptive",
  maxAgents: 3
});

Example 5: Adaptive Replanning

// Monitor execution progress
const executionStatus = await mcp__flow_nexus__task_status({
  taskId: currentExecutionId,
  detailed: true
});

// Detect deviations from plan
if (executionStatus.deviation > threshold) {
  // Analyze new constraints
  const updatedMatrix = updateConstraintMa

…

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [majiayu000](https://github.com/majiayu000)
- **Source:** [majiayu000/claude-skill-registry](https://github.com/majiayu000/claude-skill-registry)
- **License:** MIT
- **Homepage:** https://majiayu000.github.io/claude-skill-registry/

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.