dev-loop
A central entrypoint for executing development tasks. It enforces strict workflow rules based on tracked issues or PRs.
Install
mkdir -p .claude/skills/dev-loop && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/19471" && unzip -o skill.zip -d .claude/skills/dev-loop && rm skill.zipInstalls to .claude/skills/dev-loop
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Single public dev-loop entrypoint. Resolve canonical current state first, then load only route-specific internal skills.Key capabilities
- →Resolve canonical current state
- →Load route-specific internal skills
- →Build workflow handoff envelope
- →Validate PR gate pipeline
- →Promote refinable items to pickup column
How it works
The skill resolves the authoritative state of a development task from a GitHub issue or PR, then builds a handoff envelope to determine the necessary files and actions.
Inputs & outputs
When to use dev-loop
- →Start a new development task
- →Check progress on an active issue
- →Sync implementation with a GitHub PR
About this skill
No-implicit-start rule: Never start implementation without explicit instruction.
Work-origin rule: All work must originate from a tracked artifact: a GitHub issue (tracker-first), a persisted markdown plan file (local-planning), or — on the sanctioned lightweight path — the PR description itself as the spec-of-record (--lightweight, canonicalSpecSource: pr_body; no committed plan artifact; issue-less PR-first is size-gated by the light-mode threshold unless localImplementation.issueless sanctions it at any change scope). See Artifact Authority Contract for canonical mode definitions and settings. No work may originate from a PR (other than the sanctioned lightweight PR-body-as-spec path) or a direct local change unless explicitly requested.
Unified Dev Loop
This is the public dev-loop façade — a summary of the authoritative routing contract. The authoritative contract is Public Dev Loop Contract. Runtime evaluator: @dev-loops/core/loop/public-dev-loop-routing. For status/progress/readiness/merge-state/next-step queries, resolve authoritative artifact identity first; for issue targets, identity resolution is handled by the startup resolver. Fail closed to reconcile/unknown when unresolved. When an open linked PR exists, treat it as the single canonical artifact for the issue and reuse it instead of opening another PR.
Installed skill layout
Required installed runtime contract docs are shared bundled copies under ../docs/ from this skill directory. Read those bundled ../docs/ files from the installed skill layout — do not assume a source checkout. If a required bundled contract doc is missing, treat it as a packaging/installer bug.
Startup procedure
<!-- pi-only -->Main agent (read-only)
The main agent must always dispatch the dev-loop async subagent for any dev-loop work.
Do not run dev-loops loop startup or any startup resolver in the main agent.
For async-required routes (config workflow.asyncStartMode, default required) the resolver needs an async run-id marker: the Pi runtime injects PI_SUBAGENT_RUN_ID into each async subagent's child env, or the main agent mints and propagates the neutral DEVLOOPS_RUN_ID before dispatch; under the Claude Code harness the requirement is relaxed automatically (no marker needed). The startup resolver also runs without a marker for non-async routes. Regardless, only the dev-loop subagent runs it — never the main agent.
Resolve authoritative state
<!-- pi-only -->Under the Claude Code harness the dev-loop runs as a single agent: run these steps directly — no read-only boundary and no separate async-subagent dispatch. See Main Agent Contract.
CLI invocation (<dev-loops-package-root>): dev-loop CLI commands below are invoked as node <dev-loops-package-root>/cli/index.mjs <verb...> using the package-local CLI rather than npx, so they resolve unambiguously from the installed package without a global install. Resolve <dev-loops-package-root> via the first of these bounded candidates whose cli/index.mjs exists — never assume a single fixed layout (under a Pi user-level install the package lives at ~/.pi/agent/npm/node_modules/dev-loops/, so the old ../../.. package-relative guess from skills/dev-loop/SKILL.md overshoots the package root):
- Node module resolution (best-effort first try):
node -e "try{const p=require('node:path');console.log(p.resolve(p.dirname(require.resolve('dev-loops/cli/index.mjs')),'..'))}catch{process.exit(1)}"— resolves the package root whendev-loopsis reachable from Node's module search path (notably under~/.pi/agent/npm); this is cwd-dependent and commonly misses from a target-repo cwd, so the probe is wrapped in try/catch (no stack trace, exits non-zero on miss) — treat a non-zero exit as "probe missed, try the next candidate", not a hard failure. - Pi user-agent npm root (reliable for user-level installs):
~/.pi/agent/npm/node_modules/dev-loops. - Package-relative (legacy):
../../..from this skill's own directory (the original package-local install layout). - Global npm root:
$(npm root -g)/dev-loops.
NEVER fall back to find / or any unbounded filesystem walk to locate the CLI — it stalls and trips the needs-attention timeout. If every bounded candidate fails, stop and ask the orchestrator/operator for the dev-loops package root rather than searching. (The dev-loop agent resolves it analogously.)
Resolve authoritative state via the startup resolver (node <dev-loops-package-root>/cli/index.mjs loop startup --issue <n> for issues, node <dev-loops-package-root>/cli/index.mjs loop startup --pr <n> for PRs), then immediately build the handoff envelope via node <dev-loops-package-root>/cli/index.mjs loop build-envelope --input <resolver-output.json>. The envelope determines requiredReads, nextAction, stopRules, and acceptance — load only those files, execute only that bounded task. It is the first handoff artifact consumed before loading any route pack. See Workflow Handoff Contract for the derivation contract.
Retrospective checkpoint gate: the resolver reads .pi/dev-loop-retrospective-checkpoint.json and injects the state. When the checkpoint is missing and the repo config workflow.requireRetrospective (set via .devloops at repo root) is true, the resolver returns needs_reconcile. Complete or explicitly skip the retrospective before starting.
Pre-flight PR gate (mandatory): Before working an existing PR, the dev-loop must run node <dev-loops-package-root>/cli/index.mjs loop handoff --repo <owner/name> --pr <number> and abort if action: "stop". When terminal: true, proceed inline. When terminal: false, resolve the blocking condition first.
Worktree cwd (mandatory): Always use a worktree checkout for git operations, file reads/writes, and validation commands — never use the main checkout.
Worktree fetch (mandatory): Always run git fetch origin before creating or reusing any worktree.
Resume from existing loop state
When the startup resolver returns a fresh-start routing but an existing outer-loop checkpoint
(tmp/copilot-loop/<owner>/<repo>/pr-<n>/outer-loop-state.json) is present on disk, the
dev-loop must check the checkpoint before treating the start as a fresh intake or follow-up:
- Read the outer-loop checkpoint (authored by
outer-loop.mjs). - If
outerActioniscontinue_wait,reenter_copilot_loop, orreenter_reviewer_loop:- Skip issue-intake normalization or fresh-intake routing.
- Route directly to the existing PR's follow-up path (the PR number is in the
checkpoint's
prfield). Forreenter_copilot_loop, enter the copilot-pr-followup path. Forreenter_reviewer_loop, enter the reviewer-loop path. - Use the checkpoint's
copilotStateandreviewerStateas last-known context for re-attachment, then re-baseline with fresh detectors (copilot-pr-handoff.mjsordetect-copilot-loop-state.mjs) before acting on the state.
- If
outerActionisstop:- Report the
reasonfield and the authoritative state from the checkpoint. stopmeans the loop is blocked or needs a human decision; ask for direction rather than guessing or starting fresh.
- Report the
- If no checkpoint exists, or
outerActionisdone:- Treat as normal fresh startup (the existing startup resolver path).
This eliminates the manual "report-and-resume" or "exit and resume later" pattern when the deterministic state already knows the next action.
The outer-loop checkpoint is the canonical re-attachment artifact. Do not rely on chat context, local notes, or prose recollection of "where we left off."
Route table
Load only the route-specific internal skill required by selectedStrategy:
| Strategy | Route pack to load |
|---|---|
local_implementation | Local Implementation Skill |
issue_intake | Copilot PR Follow-up Skill + Copilot Loop Operations + Issue Intake Procedure |
copilot_pr_followup | Copilot PR Follow-up Skill + Copilot Loop Operations |
external_pr_followup | same as copilot_pr_followup |
reviewer_fixer | same as copilot_pr_followup |
wait_watch | same as copilot_pr_followup |
final_approval | same as copilot_pr_followup + Final Approval Skill |
Do not preload route packs before the resolver selects the strategy.
Async dispatch
Async dispatch rule (enforced): the resolver fails closed for GitHub-first strategies when canonicalStateSummary.requiresAsyncDispatch is true (default required mode) — inline invocation without an async run-id marker (DEVLOOPS_RUN_ID or PI_SUBAGENT_RUN_ID) is rejected for those routes. Under the Claude Code harness this requirement is relaxed automatically. See Startup procedure.
Fallback gate-comment poster
When the @dev-loops/core package is not installed in the consumer repo, the full scripts/github/upsert-checkpoint-verdict.mjs helper (referenced from the copilot-pr-followup skill procedure) is unavailable. To keep the PR audit trail intact in that mode, the dev-loop skill ships a small gh-only fallback poster at scripts/post-gate-verdict-fallback.mjs (relative to the dev-loop skill root) that renders the same visible comment format and fails closed if posting cannot succeed.
Use the fallback poster only when the full helper cannot be reached:
- Detect the missing helper: try
node scripts/github/upsert-checkpoint-verdict.mjs --helpfrom the consumer repo. If t
Content truncated.
When not to use it
- →Starting implementation without explicit instruction
- →Running startup resolver in the main agent
Prerequisites
Limitations
- →No gate exemptions for PRs
- →Fail closed to reconcile when state is unresolved
How it compares
It enforces a strict authority contract by requiring a tracked artifact before allowing any development work to proceed.
Compared to similar skills
dev-loop side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| dev-loop (this skill) | 0 | 10d | Review | Advanced |
| resolve-conflicts | 81 | 8mo | Review | Intermediate |
| openspec-onboard | 10 | 5mo | Review | Beginner |
| codex-cli-bridge | 9 | 9mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
resolve-conflicts
antinomyhq
Use this skill immediately when the user mentions merge conflicts that need to be resolved. Do not attempt to resolve conflicts directly - invoke this skill first. This skill specializes in providing a structured framework for merging imports, tests, lock files (regeneration), configuration files, and handling deleted-but-modified files with backup and analysis.
openspec-onboard
studyzy
Guided onboarding for OpenSpec - walk through a complete workflow cycle with narration and real codebase work.
codex-cli-bridge
alirezarezvani
Bridge between Claude Code and OpenAI Codex CLI - generates AGENTS.md from CLAUDE.md, provides Codex CLI execution helpers, and enables seamless interoperability between both tools
skill-sync
KyleKing
Syncs Claude Skills with other AI coding tools like Cursor, Copilot, and Codeium by creating cross-references and shared knowledge bases. Invoke when user wants to leverage skills across multiple tools or create unified AI context.
github-workflow-automation
ruvnet
Advanced GitHub Actions workflow automation with AI swarm coordination, intelligent CI/CD pipelines, and comprehensive repository management
git-advanced-workflows
wshobson
Master advanced Git workflows including rebasing, cherry-picking, bisect, worktrees, and reflog to maintain clean history and recover from any situation. Use when managing complex Git histories, collaborating on feature branches, or troubleshooting repository issues.