# Planning Goal Goap Algorithm

> Sub-skill of planning-goal: GOAP Algorithm (+2).

- Skill: `vamseeachanta/planning-goal-goap-algorithm` (Agent Skill)
- Install (CLI): `npx skillmds@latest add vamseeachanta/planning-goal-goap-algorithm`
- Raw SKILL.md: https://api.skillmd.com/api/skills/vamseeachanta/planning-goal-goap-algorithm/raw
- Safety review: PASS (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: vamseeachanta (https://skillmd.com/u/vamseeachanta)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/vamseeachanta/planning-goal-goap-algorithm

---


# GOAP Algorithm (+2)

## GOAP Algorithm


GOAP uses A* pathfinding through state space:

1. **State Space**: All possible combinations of world facts
2. **Actions**: Transforms with preconditions and effects
3. **Heuristic**: Estimated cost to reach goal from current state
4. **Optimal Path**: Lowest-cost action sequence achieving goal

## Action Definition


```
Action: action_name
  Preconditions: {condition1: true, condition2: value}
  Effects: {new_condition: true, changed_value: new_value}
  Cost: numeric_value
  Execution: llm|code|hybrid
  Fallback: alternative_action
```

## Execution Modes


| Mode | Description | Use Case |
|------|-------------|----------|
| Focused | Direct action execution | Specific requested actions |
| Closed | Single-domain planning | Defined action set |
| Open | Creative problem solving | Novel solution discovery |

