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.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/autogame-17/htn-plannerWhat 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
- "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."
- "Simulate the execution of the current HTN problem. If the planner finds multiple methods for a task, output the decision branch taken."
- "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
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 skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-autogame-17-htn-planner": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: file-read, code-execution
Related Skills
capability-evolver
A self-evolution engine for AI agents. Analyzes runtime history to identify improvements and applies protocol-constrained evolution.
feishu-voice-assistant
Sends voice messages (audio) to Feishu chats using Duby TTS.
security-sentinel
Scan the workspace for security vulnerabilities, exposed secrets, and misconfigurations.
prompt-optimizer
Evaluate, optimize, and enhance prompts using 58 proven prompting techniques. Use when user asks to improve, optimize, or analyze a prompt; when a prompt needs better clarity, specificity, or structure; or when generating prompt variations for different use cases. Covers quality assessment, targeted improvements, and automatic optimization across techniques like CoT, few-shot learning, role-play, and 50+ more.
Feishu Broadcast
Skill by autogame-17