hitl-escalate
Escalate blocked runs to a human via configured channel or fallback to BLOCKED.md and exit the loop.
Skill by Archive228
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/archive228-hitl-escalate
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: productivity
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/hitl-escalate
What's inside
- Skill name
hitl-escalate- Description
- Escalate blocked runs to a human via configured channel or fallback to BLOCKED.md and exit the loop. Use when the loop hits an ambiguous spec, a missing credential, a destructive action needing approval, or 3+ consecutive verify failures on the same task.
- License
- MIT
- Instructions
- 80 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Human-in-the-Loop Escalate
Long-running agent loops fail in a specific way when they meet a question they can't answer: they guess. The guess ships, the next session builds on it, and by the time a human looks the divergence is three commits deep. This skill is the release valve — when the agent is stuck, it stops and asks, cleanly, in a shape the human can act on.
## Trigger — escalate when any of these are true
- **Ambiguous spec.** `PROMPT.md` admits two implementations and the choice changes user-visible behavior.
- **Missing credential.** A required env var, API key, or config file is absent, and there is no sanctioned way for the agent to create one.
- **Destructive action needing approval.** Dropping a table, force-pushing, deleting user data, spending money, sending mail to real recipients.
- **3+ consecutive `/verify` failures on the same task.** The loop is thrashing. Stop and get a human eye before the fourth attempt.
- **External dependency down.** A third-party service the feature needs is unreachable and no offline path exists.
If none of the above hold, do not escalate. Guessing is bad; escalating on a solvable problem is also bad (it trains humans to ignore the channel).
## Primary action — call the human via the configured channel
Read `LOOPKIT_HITL_CHANNEL`. Supported values:
| Value | Shape |
|---|---|
| `telegram` | POST to `https://api.telegram.org/bot$LOOPKIT_HITL_TELEGRAM_TOKEN/sendMessage` with `chat_id=$LOOPKIT_HITL_TELEGRAM_CHAT`, `text=<question + repo + short context>`. |
| `slack` | POST JSON `{"text": "..."}` to `$LOOPKIT_HITL_SLACK_WEBHOOK` (incoming-webhook URL). |
| `dial` | Run `$LOOPKIT_HITL_DIAL_CMD` with the message on stdin. Whatever the operator wired up — SMS gateway, ntfy, phone call, pager. |
| `none` (or unset) | Skip the primary action. Go straight to fallback. |
Message body — always these five lines, in this order:
```
[loopkit] blocked in <repo-name> on <ISO timestamp>
Q: <one-line question>
Context: <one-line what you were doing>
Attempted: <one-line what you tried>
Choices: <A | B | C>
```
Non-2xx from the channel is a soft failure. Log it, then fall through to the fallback so the loop still exits cleanly.
## Fallback — write BLOCKED.md and exit
Whether the primary succeeds or fails, always write `./BLOCKED.md` at the repo root with exactly four sections:
```markdown
# Blocked
## Question:
<one sentence, answerable with a short reply>
## Context:
<what feature, which file, which commit, why now — 3-6 lines>
## Attempted:
<bulleted list of what you tried and why each fell short>
## Choices:
- A) <option> — <consequence>
- B) <option> — <consequence>
- C) <option> — <consequence>
```
Then `exit 2`. The loop runner (`run.sh`) checks for `BLOCKED.md` at the head of each iteration and exits with code 2 if it exists — that stops the loop until a human clears it.
## Human unblocks
The human reads `BLOCKED.md`, edits `PROMPT.md` / drops the credential / approves the destructive step, then `rm BLOCKED.md` and restarts `run.sh`. The deleted `BLOCKED.md` is the unblock signal.
## Anti-patterns — do not do these
- **Do not fabricate an answer.** "I'll assume the user meant X" is how divergence starts. Assume nothing under ambiguity — escalate.
- **Do not loop endlessly.** After the third consecutive `/verify` failure on the same task, escalate. The fourth attempt is not going to succeed by the same reasoning that failed thrice.
- **Do not silently swallow the missing credential.** Do not commit a placeholder, do not disable the feature, do not "TODO" the auth. Ask.
- **Do not escalate for questions the repo already answers.** Read `AGENTS.md`, `PROMPT.md`, and the last three commits first. Escalation is expensive human attention — spend it on real ambiguity.
- **Do not skip writing `BLOCKED.md` because the primary channel succeeded.** The file is the loop's exit contract. Without it, `run.sh` keeps spinning.
## Pairs with
- `adversarial-verify` — the source of the 3-verify-failure trigger.
- `shift-notes` — after escalating, note the block in `IMPLEMENTATION_PLAN.md` so the next session (post-unblock) has full context.
- `spec-first` — an ambiguous `PROMPT.md` is a spec-first failure; the human's unblock should tighten the spec, not just answer the one-off.From Archive228/loopkit, MIT.
More from Archive228/loopkit
- 0.701score
prompt-caching
Archive228
Cache the parts of the prompt that don't change so a long-running loop stops paying full price on every turn.
SkillCFreshness: C★ 755Claude Code +9 - 0.701score
structured-output
Archive228
Get JSON out of the model reliably.
SkillCFreshness: C★ 755Claude Code +9 - 0.701score
using-loopkit
Archive228
Use when starting any conversation in a loopkit-enabled project - establishes how to find and use loopkit's 49 skills, requiring skill invocation before ANY…
SkillCFreshness: C★ 755Claude Code +9 - 0.698score
pdf-ingestion
Archive228
Get a PDF into the model without blowing the context window or losing structure.
SkillCFreshness: C★ 755Claude Code +9 - 0.698score
active-memory-reminder
Archive228
Before compaction Loopkit extracts decisions into claude-decisions.json (machine-readable).
SkillCFreshness: C★ 755Claude Code +9 - 0.698score
broken-window-check
Archive228
Before picking new work, smoke-test the last "completed" feature.
SkillCFreshness: C★ 755Claude Code +9 - 0.698score
init-script-contract
Archive228
Author idempotent init.sh under 120s plus sibling test.sh, stop.sh, reset.sh, serve.sh with fixed names the harness relies on.
SkillCFreshness: C★ 755Claude Code +9 - 0.698score
feature-list-json
Archive228
Enumerate every end-to-end feature as strict JSON entries with passes:false, editable-passes-only discipline, and priority order.
SkillCFreshness: C★ 755Claude Code +9 - 0.698score
adversarial-verify
Archive228
Review a diff against the goal spec assuming the code is BROKEN.
SkillCFreshness: C★ 755Claude Code +9 - 0.698score
evaluator-calibration
Archive228
Calibrate a reviewer persona with few-shot rubric examples so skepticism stays consistent and doesn't drift lenient over long runs.
SkillCFreshness: C★ 755Claude Code +9 - 0.698score
harness-stripping
Archive228
Systematically remove one harness component at a time and measure impact, killing scaffolding that no longer earns its complexity.
SkillCFreshness: C★ 755Claude Code +9 - 0.698score
eval-harness
Archive228
Build a repeatable eval loop that grades agent output with an LLM judge, so prompt/skill changes get scored against a baseline instead of eyeballed.
SkillCFreshness: C★ 755Claude Code +9
Signals
- Stars
- 755
- Forks
- 124
- Open issues
- 0
- Last commit (this folder)
- Jul 14, 2026 (3 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/Archive228/loopkit
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from Archive228
- 0.701score
using-loopkit
Archive228
Use when starting any conversation in a loopkit-enabled project - establishes how to find and use loopkit's 49 skills, requiring skill invocation before ANY…
SkillCFreshness: C★ 755Claude Code +9 - 0.701score
structured-output
Archive228
Get JSON out of the model reliably.
SkillCFreshness: C★ 755Claude Code +9 - 0.701score
prompt-caching
Archive228
Cache the parts of the prompt that don't change so a long-running loop stops paying full price on every turn.
SkillCFreshness: C★ 755Claude Code +9 - 0.698score
broken-window-check
Archive228
Before picking new work, smoke-test the last "completed" feature.
SkillCFreshness: C★ 755Claude Code +9 - 0.698score
harness-stripping
Archive228
Systematically remove one harness component at a time and measure impact, killing scaffolding that no longer earns its complexity.
SkillCFreshness: C★ 755Claude Code +9 - 0.698score
adversarial-verify
Archive228
Review a diff against the goal spec assuming the code is BROKEN.
SkillCFreshness: C★ 755Claude Code +9
Cite this page
hitl-escalate skill. Agent Mart. https://agentmart.dev/skills/archive228-hitl-escalate (last updated 2026-10-24)