ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified developer tools Safety 4/5

Htn Planner

Skill by autogame-17

Why use this skill?

Master complex task decomposition with the HTN Planner for OpenClaw. Define domains, visualize plan trees with Mermaid, and simulate agent behavior efficiently.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/autogame-17/htn-planner
Or

What This Skill Does

The HTN (Hierarchical Task Network) Planner skill is a specialized tool for complex task decomposition and automated reasoning within OpenClaw. It functions by taking high-level goals and breaking them down into a nested hierarchy of subtasks, distinguishing between compound tasks (which require further decomposition) and primitive tasks (which are directly executable actions). This skill includes a robust visualizer that exports plan trees in Mermaid format, allowing developers to inspect how the agent intends to solve a problem before committing to execution. By providing a structured domain definition, users can model intricate logic flows, decision trees, and contingency planning for their autonomous agents.

Installation

To integrate this skill into your environment, run the following command in your terminal: clawhub install openclaw/skills/skills/autogame-17/htn-planner Ensure you have Node.js installed, as the skill relies on the node runtime for executing the planning and simulation logic.

Use Cases

This skill is ideal for scenarios requiring deterministic logic and sequential step-planning. Common use cases include complex game state management where an agent must navigate multiple stages to reach a goal, automated industrial workflows that require strict dependency adherence, and sophisticated troubleshooting bots that follow a diagnostic tree. It is particularly effective when you need to audit an agent's reasoning process through the visual plan tree.

Example Prompts

  1. "HTN Planner: Take the domain defined in my domain.json and the current objective in problem.json and generate a visual flow chart showing how the agent plans to reach the goal."
  2. "Simulate the execution of the current HTN problem. If the planner finds multiple methods for a task, output the decision branch taken."
  3. "Validate my domain.json file to ensure all compound tasks have valid method subtasks, then export a Mermaid graph of the root task tree."

Tips & Limitations

The HTN Planner performs best when domain definitions are kept modular. Start with a simple root task and gradually add complexity. Note that the planner's efficiency depends on the state space; for extremely large problems, the search space for plan decomposition may grow exponentially. Ensure your state variables in the problem.json are accurately mapped to the preconditions required by your primitive tasks to avoid simulation failure. Currently, the skill does not support dynamic learning; the domain logic must be predefined by the user.

Metadata

Stars1100
Views1
Updated2026-02-17
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-autogame-17-htn-planner": {
      "enabled": true,
      "auto_update": true
    }
  }
}

Tags(AI)

#planning#automation#logic#workflow#reasoning
Safety Score: 4/5

Flags: file-read, code-execution