Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/noirewinter/hplan/hplan-zhnpx skills add Noirewinter/hplan --skill hplan-zhgit clone --depth 1 https://github.com/Noirewinter/hplanWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/noirewinter/hplan/hplan-zh)<a href="https://agentmods.dev/skills/noirewinter/hplan/hplan-zh"><img src="https://agentmods.dev/badge/skills/noirewinter/hplan/hplan-zh.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00102 | $0.03040 |
| Opus 5 | $0.00051 | $0.01520 |
| Sonnet 5 | $0.00020 | $0.00608 |
| Haiku 4.5 | $0.00010 | $0.00304 |
Grade A, and why
hplan scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 284 lines — stays where its author put it; the contents beside it link to each section on GitHub.
hplan — 分层持久化计划管理
用文件系统作为持久化工作记忆。overview.md 保持精简(≤25行),详细规格按阶段拆分到独立目录中。
核心原则
上下文窗口 = RAM(易失、有限)
文件系统 = 磁盘(持久、无限)
→ 重要信息必须写入磁盘
→ 被 hook 注入的内容必须精简
→ 被深度参考的内容必须详尽
→ 二者分离,互不冲突
如果感觉上下文缺失,主动读取 .plan/ 下的相关文件即可。所有计划信息都持久化在磁盘文件中,不会因上下文变化而丢失。
目录结构
所有计划文件存放在项目根目录的 .plan/ 目录下:
.plan/
├── overview.md ← 全局摘要(精简,被 hook 反复注入)
├── decisions.md ← 所有决策记录
├── errors.md ← 所有错误记录
└── phases/
├── phase1_xxx/
│ ├── spec.md ← 该阶段详细规格(修改文件、代码变更)
│ ├── call_chain.md ← 调用链 / 架构图(可选)
│ └── checklist.md ← 逐项完成状态
├── phase2_xxx/
│ ├── spec.md
│ ├── call_chain.md
│ └── checklist.md
└── ...
关键约束
overview.md 必须保持精简
overview.md 是被 PreToolUse hook 每次注入到上下文的文件。严格控制在 25 行以内。格式如下:
# [项目名称]
current_phase: phase2_xxx
## Goal
[一句话描述最终目标]
## Phases
- [x] phase1_xxx: [阶段描述] → complete
- [ ] phase2_xxx: [阶段描述] → in_progress (2/4)
- [ ] phase3_xxx: [阶段描述] → pending
## Blockers
[当前阻塞项,没有则写 None]
## Last Decision
[最近一条重要决策的一句话摘要]
## Last Error
[最近一条错误的一句话摘要,没有则写 None]
绝对不要在 overview.md 里放详细的文件清单、代码片段、调用链。那些内容属于 phase 目录。
详细内容放在 phase 目录中
每个 phases/phaseN_xxx/ 目录包含该阶段的完整信息:
spec.md — 该阶段的详细规格:
- 需要修改哪些文件、每个文件的具体变更内容
- 新增文件的接口设计、数据结构定义
- 依赖关系和前置条件
spec.md 控制在 60 行以内。 当用户发送新消息时,如果有进行中的阶段,当前阶段的 spec.md 会被自动注入到上下文。如果一个阶段的 spec 写出来超过 60 行,说明这个阶段的粒度太粗,应该拆分成两个或更多阶段。拆分时保持每个阶段的 spec 聚焦于一组相关的修改,而非堆砌所有细节。
call_chain.md(可选)— 调用链 / 架构变更图:
- 修改前后的调用关系对比
- 用文本或 Mermaid 语法绘制
checklist.md — 该阶段的逐项检查清单:
# Phase 2: 后端接口改造 — 检查清单
- [x] 新建 src/auth/token.py
- [x] 修改 src/auth/routes.py
- [ ] 修改 src/middleware/auth.py
- [ ] 修改 config/auth.yaml
- [ ] 运行单元测试确认无回归
工作流
1. 创建计划(必须在开始执行前完成)
收到复杂任务后:
- 创建
.plan/目录结构(可运行sh scripts/init-plan.sh快速初始化) - 用模板创建 overview.md(参考 templates/overview.md)
- 为每个阶段创建 phase 目录和 spec.md / checklist.md
- 如果涉及架构变更,创建 call_chain.md
- 创建 decisions.md 和 errors.md
What ships with it
13 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- scripts/advance-phase.sh 2.0 KB runs code
- scripts/check-complete.sh 2.4 KB runs code
- scripts/init-plan.sh 2.4 KB runs code
- scripts/inject-overview.sh 279 B runs code
- scripts/post-edit-remind.sh 321 B runs code
- scripts/recover-context.sh 1.5 KB runs code
- scripts/validate-plan.sh 2.1 KB runs code
- templates/call_chain.md 1.2 KB
- templates/checklist.md 509 B
- templates/decisions.md 112 B
- templates/errors.md 130 B
- templates/overview.md 305 B
- templates/spec.md 1.4 KB
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 6d ago First seen · 284 lines · 102 tokens per session scan A de991df21592
hplan is a skill published in the GitHub repository Noirewinter/hplan (5 stars, last pushed 4mo ago), licensed MIT. It adds 102 tokens to every session and 3,040 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
ai-agent-builder
Expert guide for building AI-powered coding agents that produce professional-quality output. Trigger whenever the user asks to build an AI agent, coding assistant, automation pipeline, tool-using LLM system, or says "agent", "agentic", "tool use", "function calling", "LLM pipeline", "AI workflow", "coding bot", or…
agent-development
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development…
adk-unit-design
Writes an as-built architecture document for one ADK code unit — purpose, execution flow, data flow, cross-class dependencies, extension points, and the parts that must not change — to docs/design/{topic}/{unit}/index.md. It describes the code as implemented, not a proposed design, and its reader is a developer about…
artifact-deploy
One-click deploy a user's pre-built app/artifact into their OWN AWS account and get a global public HTTPS link (Vercel-like), with a default TTL and promote-to-persistent. Use when the user says "deploy this", "ship this demo", "give me a public link", "share this externally", or "deploy to AWS".
explain-for
Explain a topic, a piece of code, an error, or a design decision calibrated to one named audience — a 5-year-old, a 5th grader, a manager, a designer, a graduate student, a parent. Resolves who the explanation is for (from the request, or from what memory already records about that person), establishes the ground…
meta-tags-optimizer
Optimize title tags, meta descriptions, Open Graph, and Twitter cards for maximum click-through rate. Generates multiple A/B test variations with character counting and SERP preview. Use when asked to "optimize title tag", "write meta description", "improve CTR", "Open Graph tags", "fix my meta tags", "social media…