loop-execution
Use when executing an existing HOTL workflow file — reads steps, loops until success criteria met, auto-approves low-risk gates, pauses at high-risk gates.
by yimwoo★ 27 GitHub stars
Install loop-execution in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
About this skill
HOTL Loop Execution
Overview
Execute an existing HOTL workflow file autonomously. Canonical workflows live at docs/plans/YYYY-MM-DD-<slug>-workflow.md, with legacy root hotl-workflow-<slug>.md still accepted during migration. Loop on steps with success criteria. Auto-approve low-risk gates. Always pause for high-risk gates.
governed-execution is the preferred new router for host-native or fallback runs. This skill remains the canonical autonomous state machine and a supported explicit compatibility profile. When invoked through the router, use the selected driver for lifecycle calls and require a sufficient evidence receipt before completion.
Announce: "Starting HOTL loop execution. Looking for workflow file..."
Workflow File Resolution
Resolve which workflow file to execute:
- If the user specified a filename → use that file
- Else, glob for canonical workflows in
docs/plans/*-workflow.md:- One match → use it automatically
- Multiple matches → if one is clearly the newest revision for the same semantic slug, prefer it; otherwise list them and ask the user to pick
- If no canonical matches, glob for legacy
hotl-workflow*.mdin project root:- One match → use it automatically
- Multiple matches → list them and ask the user to pick
- No matches → see "What to Do If No Workflow Found" below
Interrupted Run Detection
After resolving the workflow file, locate interrupted runs before Branch/Worktree Preflight. Use scripts/hotl-locate-run.sh --workflow <workflow-file> when available. This helper scans the current checkout, linked git worktrees, and HOTL's default .hotl-worktrees/<repo>/ directory, so it can find state created inside an isolated execution worktree even when the new session starts from the authoring checkout.
If the helper is unavailable, manually scan these locations for .hotl/state/*.json and match workflow_path or source_workflow_path against the resolved workflow:
- Current checkout
git worktree list --porcelainroots for the repo$(dirname <repo-root>)/.hotl-worktrees/$(basename <repo-root>)/*
- One interrupted run found → ask: "Found an interrupted run (step N/M). Resume from step N, or start fresh?"
- Multiple interrupted runs found → list all with run_id, step progress, branch, age. Ask which to resume or start fresh. Never silently choose.
- No interrupted runs → proceed normally (new run)
If the user chooses resume, do not run Branch/Worktree Preflight again. Load the matched sidecar, change into its recorded execution_root, and follow skills/resuming/SKILL.md with the original run_id.
Branch/Worktree Preflight
After resolving the workflow file, run this preflight before executing any steps:
1. Is this a git repo with at least one commit?
- No → log "Skipping branch setup (no git history)" → proceed to step execution
- Yes → continue
2. Check for uncommitted changes
- First, exclude HOTL-owned transient artifacts from the dirty check:
• docs/plans/*-workflow.md (canonical workflow files)
• hotl-workflow-*.md (legacy workflow files)
• docs/designs/*.md (canonical design docs from brainstorming)
• docs/plans/*-design.md, docs/plans/*-plan.md (legacy design docs from brainstorming)
• .hotl/ (runtime state, reports, cache)
- If only HOTL artifacts are dirty → treat as clean, continue
- If non-HOTL dirty files exist:
• If dirty_worktree: allow in workflow frontmatter → proceed without prompting
• Otherwise → HARD-FAIL. Tell the user which non-HOTL files are dirty. Offer choices:
a. Clean up manually, then re-run
b. Stash manually, then re-run
c. Explicitly approve HOTL to stash and continue
- Clean → continue
3. Determine branch name
- If branch: field exists in workflow frontmatter → use it
- Otherwise → derive `hotl/<slug>` from the workflow filename
• Canonical: strip `YYYY-MM-DD-` prefix and `-workflow.md` suffix from `docs/plans/YYYY-MM-DD-<slug>-workflow.md`
• Legacy: strip `hotl-workflow-` prefix and `.md` suffix from `hotl-workflow-<slug>.md`
4. Capture authoring origin
- Record the current branch name (if any) and current `HEAD` commit as the workflow's authoring origin
- If the current branch is neither `main` nor `master`, and the workflow frontmatter does not already set `branch:` or `worktree:`, PAUSE and ask:
a. Continue on the current branch in this checkout
→ set `branch: <current-branch>` and `worktree: false`
b. Use HOTL's isolated execution branch/worktree (recommended)
→ leave `worktree: true` and let HOTL derive `hotl/<slug>` unless the user wants a custom branch name
c. Use a custom execution branch
→ set `branch: <user-branch>` and keep worktree isolation unless the user explicitly opts out
- Explain clearly: the authoring checkout and the execution checkout can differ. HOTL can execute in a separat
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
FAQ
What does the loop-execution skill do?
Use when executing an existing HOTL workflow file — reads steps, loops until success criteria met, auto-approves low-risk gates, pauses at high-risk gates.
How do I install the loop-execution skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the loop-execution skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
theme-factory
AnthropicToolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
access
AnthropicManage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
configure
AnthropicSet up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
access
AnthropicManage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…