Skip to main content
skill Claude Code CX Codex Cursor GitHub Copilot

goal-plan — Claude Code skill: action planning with preconditions

A skill that builds step-by-step plans for complex tasks, tracks what conditions must be met before each step, estimates costs, and switches to an alternative path if something fails.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add ruvnet/ruflo --skill goal-plan -a claude-code
Open on GitHub

What goal-plan does

goal-plan uses Goal-Oriented Action Planning (GOAP) — a search algorithm that finds the optimal sequence of actions through state space. The skill takes a goal description, identifies what must change from the current state to the desired state, and builds a plan from available actions accounting for preconditions, effects, and cost of each step.

Internally it uses task management tools (task_create, task_list, task_status), memory search (memory_search, memory_store), workflow execution (workflow_execute), and trajectory hooks (trajectory-start, trajectory-step, trajectory-end) to track and execute the plan. Actions run in dependency order: preconditions are verified before each action, effects verified after.

If an action fails or new information appears, the skill recalculates the path from the new state, updates remaining tasks, and continues. Successful plans are stored in memory under the namespace goap-plans for reuse.

What it helps with

  • split a complex goal into ordered actions with precondition checking
  • select the lowest-cost path among multiple action sequences
  • replan automatically when conditions change or an action fails
  • record the solution trajectory and store the successful plan for later use

Example prompts for the agent

  • Migrate a React project from JavaScript to TypeScript — find all files, determine the change order accounting for dependencies
  • A production microservice is crashing — figure out root causes, determine the check order, switch to a backup if a path is blocked
  • Design a database schema for an app — identify which migrations are needed and in what sequence to deploy them

How to install goal-plan

1Skills CLI (Vercel)

npx skills add ruvnet/ruflo --skill goal-plan -a claude-code

2Manually: put the files in place

~/.claude/skills/goal-plan/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/goal-plan/

From the same set104

The whole set →
ruflo ruvnet This skill adds multi-agent orchestration, memory, routing, and MCP tools to a project. Use it for swarm tasks and multi-step workflows. Claude Code CX Codex Cursor +1 4,000installs Swarm Orchestration ruvnet Skill for managing agent swarms with parallel execution, dynamic topology, and automatic load balancing. Use when a single agent is not enough and you need to orchestrate specialists of different types. Claude Code CX Codex Cursor +1 2,100installs github-project-management ruvnet Turns issue triage and board upkeep into gh and ruv-swarm calls: labels, subtasks, duplicate lookup. Useful when the tracker holds more tickets than order. Claude Code CX Codex Cursor +1 1,400installs github-workflow-automation ruvnet Automates GitHub Actions with AI agent coordination. Generates optimised pipelines, manages pull requests, analyzes failed runs, and deploys updates with risk assessment. Claude Code CX Codex Cursor +1 1,300installs github-code-review ruvnet Runs a swarm of specialized AI agents to inspect GitHub pull requests for security, performance, and architecture issues. Claude Code CX Codex Cursor +1 1,300installs stream-chain ruvnet Chains sequential agent steps together using streaming JSON flow and provides ready-to-run pipelines. Claude Code CX Codex Cursor +1 1,200installs flow-nexus-swarm ruvnet Deploy cloud-based AI agent swarms and define event-driven workflows with message queues. Use it to coordinate tasks, inspect runs, and scale a swarm. Claude Code CX Codex Cursor +1 1,200installs performance-analysis ruvnet Detects bottlenecks in Claude Flow swarms, profiles agent operations, and generates reports with actionable optimization recommendations. Claude Code CX Codex Cursor +1 1,200installs

Similar

tamarind K-Dense-AI Runs Tamarind Bio structural biology and molecular design tools through its REST API or MCP server. Use it for cloud jobs without local GPUs. Claude Code CX Codex Cursor +1 1,100installs svelte vercel-labs Guides AI coding agents through building Svelte 5 component trees from json-render specs, including state, events, bindings, and catalogs. Claude Code CX Codex Cursor +1 1,200installs cli-anything-libreoffice HKUDS Skill for creating and editing Writer, Calc, and Impress documents from the CLI without a GUI. Produces real ODF files (ZIP with XML) — useful when an AI agent needs to assemble a report, spreadsheet, or presentation programmatically. Claude Code CX Codex Cursor +1 669installs delegate-setup amElnagdy This skill sets up delegation lanes: which implementer CLI takes feature, test or UI work, with a model and an effort dial. It writes config only after you say yes. Claude Code CX Codex Cursor +1 5,800installs gmgn-portfolio GMGNAI Skill analyzes crypto wallets by address via GMGN API: shows holdings, realized and unrealized P&L, win rate, trade history, and tokens created by a developer wallet. Works on Solana, BSC, Base, and Ethereum. Claude Code CX Codex Cursor +1 17,500installs setup-matt-pocock-skills Matt Pocock This skill configures a repository for Matt Pocock's engineering skills by setting its issue tracker, triage labels, and domain docs layout. Run it before using the other skills. Claude Code 1,052,851installs to-tickets Matt Pocock Turns a plan, spec, or conversation into small end-to-end tickets with explicit blockers. Use it to agree on the work breakdown before tickets go to a tracker. Claude Code 711,230installs writing-plans Jesse Vincent This skill turns requirements for a multi-step task into an implementation plan before code changes begin. It helps when another engineer needs exact files, interfaces, and checks. Claude Code CX Codex 282,859installs

Questions about goal-plan

How do I install goal-plan in Claude Code?

Run npx skills add ruvnet/ruflo --skill goal-plan -a claude-code. The skill will appear in ~/.claude/skills/goal-plan/SKILL.md.

What does goal-plan do?

The skill takes a goal description and current state, analyzes available actions with their preconditions and effects, builds an optimal plan using A* search, executes it step by step, and switches to an alternative route if conditions change.

When does the skill trigger replanning?

The skill switches to a new plan if an action fails, unexpected effects are detected, the goal definition changes, estimated cost is exceeded, or an external dependency becomes unavailable.

Source text

SKILL.md · MIT
---
name: goal-plan
description: Create and execute Goal-Oriented Action Plans (GOAP) with precondition analysis, cost optimization, and adaptive replanning
argument-hint: "<goal-description>"
allowed-tools: mcp__plugin_ruflo-core_ruflo__task_create mcp__plugin_ruflo-core_ruflo__task_list mcp__plugin_ruflo-core_ruflo__task_status mcp__plugin_ruflo-core_ruflo__task_assign mcp__plugin_ruflo-core_ruflo__task_update mcp__plugin_ruflo-core_ruflo__task_complete mcp__plugin_ruflo-core_ruflo__task_summary mcp__plugin_ruflo-core_ruflo__memory_store mcp__plugin_ruflo-core_ruflo__memory_search mcp__plugin_ruflo-core_ruflo__neural_predict mcp__plugin_ruflo-core_ruflo__workflow_create mcp__plugin_ruflo-core_ruflo__workflow_execute mcp__plugin_ruflo-core_ruflo__workflow_status mcp__plugin_ruflo-core_ruflo__hooks_intelligence_trajectory-start mcp__plugin_ruflo-core_ruflo__hooks_intelligence_trajectory-step mcp__plugin_ruflo-core_ruflo__hooks_intelligence_trajectory-end Bash Read Write Edit
---

# Goal Plan

Create and execute intelligent plans using Goal-Oriented Action Planning (GOAP).

## When to use

When you have a complex objective that requires multiple steps, has dependencies between steps, and may need adaptive replanning as conditions change.

## Steps

1. **Define goal state** — what does "done" look like? List concrete success criteria
2. **Assess current state** — what's true now? What assets, code, infrastructure exist?
3. **Identify gap** — what must change between current and goal state?
4. **Inventory actions** — list available actions with:
   - Preconditions (what must be true before this action)
   - Effects (what becomes true after this action)
   - Cost estimate (time, complexity, risk)
5. **Generate plan** — find the optimal action sequence using A* through the state space
6. **Record trajectory** — call `mcp__plugin_ruflo-core_ruflo__hooks_intelligence_trajectory-start` to begin tracking
7. **Create tasks** — call `mcp__plugin_ruflo-core_ruflo__task_create` for each action in the plan
8. **Execute** — work through tasks in dependency order:
   - Before each action: verify preconditions still hold
   - After each action: verify effects achieved
   - Record each step via `mcp__plugin_ruflo-core_ruflo__hooks_intelligence_trajectory-step`
9. **Monitor & replan** — if an action fails or produces unexpected results:
   - Reassess current state
   - Recalculate optimal path from new state
   - Update remaining tasks
10. **Complete trajectory** — call `mcp__plugin_ruflo-core_ruflo__hooks_intelligence_trajectory-end`
11. **Store successful plan** — call `mcp__plugin_ruflo-core_ruflo__memory_store` with namespace `goap-plans`

## Plan output format

```
Goal: [concrete objective]
Current State: [key facts]
Plan Cost: [estimated effort]
Steps:
  1. [action] — precondition: [X], effect: [Y], cost: [Z]
  2. [action] — precondition: [Y], effect: [W], cost: [Z]
  ...
Risk Factors: [what could force a replan]
Fallback: [alternative approach if primary path fails]
```

## Replanning triggers

- Action fails (precondition no longer met)
- Unexpected side effects detected
- New information changes goal definition
- Cost exceeds threshold
- External dependency becomes unavailable

© ruvnet · MIT · ruvnet/ruflo

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor