Noirewinter/hplan / skills/hplan-zh
hplan
Verified分层持久化计划管理,适用于复杂的多阶段开发任务。当用户要求进行涉及多文件修改、 架构重构、系统设计等需要详细规划的任务时使用(超过5次工具调用的任务)。 创建分层的计划目录结构:overview.md(全局摘要)+ 每个阶段独立目录(详细规格、 调用链、检查清单)。触发词包括:开始规划、制定计划、任务分解。
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 11.1 KB |
| scripts/advance-phase.sh | script | 2.0 KB |
| scripts/check-complete.sh | script | 2.4 KB |
| scripts/init-plan.sh | script | 2.4 KB |
| scripts/inject-overview.sh | script | 279 B |
| scripts/post-edit-remind.sh | script | 321 B |
| scripts/recover-context.sh | script | 1.5 KB |
| scripts/validate-plan.sh | script | 2.1 KB |
| templates/call_chain.md | markdown | 1.2 KB |
| templates/checklist.md | markdown | 509 B |
| templates/decisions.md | markdown | 112 B |
| templates/errors.md | markdown | 130 B |
| templates/overview.md | markdown | 305 B |
| templates/spec.md | markdown | 1.4 KB |
scripts/advance-phase.sh
View on GitHub#!/bin/sh
# advance-phase.sh — 推进到下一阶段
# 用法: sh advance-phase.sh
# 功能: 将 overview.md 中 current_phase 指向的阶段标记为完成,并切换到下一个 pending 阶段
PLAN_DIR="$(pwd)/.plan"
if [ ! -f "$PLAN_DIR/overview.md" ]; then
echo "[hplan] 未找到 .plan/overview.md"
exit 1
fi
# 获取当前阶段
CURRENT=$(grep -m1 '^current_phase:' "$PLAN_DIR/overview.md" | sed 's/current_phase: *//')
if [ -z "$CURRENT" ]; then
echo "[hplan] 未找到 current_phase 字段。"
exit 1
fi
# 安全校验:拒绝包含路径遍历字符的阶段 ID
case "$CURRENT" in
*..* | */* | *\\*) echo "[hplan] 无效的阶段 ID: $CURRENT"; exit 1 ;;
esac
echo "[hplan] 当前阶段: $CURRENT"
# 检查当前阶段的 checklist 是否全部完成
if [ -f "$PLAN_DIR/phases/$CURRENT/checklist.md" ]; then
UNCHECKED=$(grep -c '^\- \[ \]' "$PLAN_DIR/phases/$CURRENT/checklist.md" 2>/dev/null || echo "0")
if [ "$UNCHECKED" -gt 0 ]; then
echo "[hplan] 警告: $CURRENT 的 checklist 中还有 $UNCHECKED 项未完成。"
echo "确定要推进到下一阶段吗?(继续执行将忽略此警告)"
fi
fi
# 在 overview.md 中标记当前阶段为完成
# 匹配 "- [ ] phase_id:" 并替换为 "- [x] phase_id:"
sed -i.bak "s/^\(- \)\[ \]\( $CURRENT:.*\)→.*/\1[x]\2→ complete/" "$PLAN_DIR/overview.md"
rm -f "$PLAN_DIR/overview.md.bak"
# 找到下一个未完成的阶段
NEXT=$(grep -m1 '^\- \[ \]' "$PLAN_DIR/overview.md" | sed -n 's/^- \[ \] \([^ :]*\).*/\1/p')
if [ -n "$NEXT" ]; then
# 安全校验:拒绝包含路径遍历字符的阶段 ID
case "$NEXT" in
*..* | */* | *\\*) echo "[hplan] 无效的阶段 ID: $NEXT"; exit 1 ;;
esac
# 更新 current_phase
sed -i.bak "s/^current_phase:.*/current_phase: $NEXT/" "$PLAN_DIR/overview.md"
# 更新下一阶段状态为 in_progress
sed -i.bak "s/^\(- \[ \] $NEXT:.*\)→ pending/\1→ in_progress/" "$PLAN_DIR/overview.md"
rm -f "$PLAN_DIR/overview.md.bak"
echo "[hplan] 已切换到: $NEXT"
else
echo "[hplan] 所有阶段已完成!"
fi
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |