distill
When there's a failure, bug, unexpected behavior, or important finding, distills it into a verified general rule saved under .loop/memory/. Invoke right after…
Onboards loopcraft into a project — scans the repo to detect gate commands, confirms the backlog and rubrics through an interview, then scaffolds the .loop/ structure. Run once per project, or when refreshing the config.
$ npx -y skills add hiphapis/loopcraft --skill loop-init --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/loop-initContext preview
The summary Claude sees to decide when to auto-load this skill.
Onboards loopcraft into a project — scans the repo to detect gate commands, confirms the backlog and rubrics through an interview, then scaffolds the .loop/ structure. Run once per project, or when refreshing the config.
name: loop-init description: Onboards loopcraft into a project — scans the repo to detect gate commands, confirms the backlog and rubrics through an interview, then scaffolds the .loop/ structure. Run once per project, or when refreshing the config. argument-hint: ""
If `.loop/` already exists, run in "refresh mode": show existing values as defaults and only ask about what changes.
`pyproject.toml`, etc. Offer the detected results as default suggestions.
(default: `code` + `docs`, two of them).
Confirm ① the gate commands ② the backlog **source** (Q1 below) ③ completion handling (Q2 below) ④ the starter rubrics — show each criterion and tune it to the project. Explain that **every criterion must have a "how to verify" + "pass condition"**, and don't accept an unscorable criterion ("the code is clean") — help rewrite it into a verifiable form.
> **Display language:** the wording below is an example (intent) only. **Present every user-facing string in the user's working language** (English for an English user, Chinese for a Chinese user) — the questions and options here, and the operational messages too: the git-repo precondition abort, the "no GitHub remote detected" warning, and the "Draft PR unavailable" note. Only the values written to config.json stay canonical English enums (`file`/`github`/`jira`/`command`, `none`/`comment`/`draft-pr`).
> **Precondition:** if this isn't a git repository, loopcraft can't commit — don't scaffold; stop with "run this inside a git repository".
**Q1. "Where should the autonomous runner (loop-run) read and manage tasks from?"** (intent)
**GitHub scaffolding (when GitHub is chosen):** 1. Check `git remote` — if there's no remote, warn "no GitHub remote detected" and propose the **file fallback** (the repo the issues live in can't be identified). 2. Copy `adapters/github.sh` to the project's `.loop/adapters/github.sh` (project-owned, editable). 3. Check `gh auth status` — if not authenticated, point to `gh auth login` (continue scaffolding but warn). 4. Check that the `loop:ready`, `loop:manual`, and `loop:blocked` labels exist; if not, propose creating them (`gh label create`). `loop:manual` marks an issue as unfit-for-unattended (needs manual handling) → skip. 5. Write to config: `source: "github"`, `list: "bash .loop/adapters/github.sh list --label loop:ready"`, `get: "bash .loop/adapters/github.sh get"` (enables `/loop-run #123` target mode), `report: "bash .loop/adapters/github.sh report"`.
**Q2. "How should completion be handled?"** (intent) — apply the gating below:
**Q2 gating:**
**Q3. "Who authors tests when an item needs them?"** (intent) — stored as `tests.author` (default `subagent`):
Detect: if `codex` is on PATH, suggest **codex-cli**; otherwise default **subagent**. Whichever is chosen, loop-run falls back to `subagent` if it's unavailable or fails.
Loop engineering plugin for Claude Code — instead of steering the model with ever-longer prompts, design loops where it self-corrects from environment feedback and accumulates memory across sessions.
When there's a failure, bug, unexpected behavior, or important finding, distills it into a verified general rule saved under .loop/memory/. Invoke right after…
Traverses the backlog unattended, applying the loop-task cycle (rubric · verifier · gate · Loop-Verified commit) to each item. Invoke only when the user…