bb-close-issue

SkillAI & models

Babel internal issue protocol — close a handoff after downstream agent picked it up or user signed off. Moves designs/<name>/.handoff/<label>.md to .handoff/closed/ (using mv per CLAUDE.md), appends to handoff_log.jsonl.

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the bb-close-issue skill

What this skill tells your AI

The instructions your AI receives, as published by amoslee2026/babel in .claude/skills/bb-close-issue/SKILL.md and read by ahel’s review.

Inputs

  • --label <label> — handoff label to close
  • --design-name <name> — required
  • --reason <text> (optional) — close reason
  • --close-gh (flag) — also close paired gh issue

Output Contract

field
closed_pathdesigns/<name>/.handoff/closed/<label>_<stamp>.md
log_pathdesigns/<name>/.handoff/handoff_log.jsonl
gh_closedbool
validbool

4-Phase 执行

Phase 1 — validate

src="designs/<name>/.handoff/<label>.md"
[ -f "$src" ] || exit 2  # nothing to close

Phase 2 — move (mv 不 rm)

Bash

STAMP=$(date -u +'%Y%m%d-%H%M%SZ')
mkdir -p designs/<name>/.handoff/closed
mv designs/<name>/.handoff/<label>.md designs/<name>/.handoff/closed/<label>_${STAMP}.md

Phase 3 — append_log

LINE=$(printf '{"ts":"%s","action":"close","label":"%s","reason":"%s"}' \
  "$(date -u +'%Y-%m-%dT%H:%M:%SZ')" "<label>" "<reason>")
echo "$LINE" >> designs/<name>/.handoff/handoff_log.jsonl

Phase 4 — gh (optional)

if [ "<close-gh>" = "true" ] && command -v gh >/dev/null 2>&1; then
  gh issue list --label "<label>" --state open --json number \
    | python3 -c "import sys,json; [print(i['number']) for i in json.load(sys.stdin)]" \
    | xargs -I{} gh issue close {} --comment "Closed by bb-close-issue: <reason>"
fi

Failure Modes

状态退出码
handoff 文件不存在2
mv 失败4
gh 不可用且 --close-gh 指定warning(exit 0)

Signals

GitHub stars
42
Forks
10
Last commit
Aug 2026
Advanced
Catalog kind
skill
Gateway key
bb-close-issue
Source
github.com/amoslee2026/babel