alekspetrov/navigator/nav-loop
Claude Code and agent skill by alekspetrov/navigator
- community
Checking that the SKILL.md file is still in the repository.
Run tasks until complete with structured completion signals. Auto-invoke when user says "run until done", "keep going until complete", "iterate until finished", "loop mode", "autonomous mode".
Install
npx vskill@latest install alekspetrov/navigator/nav-loopSKILL.md
Navigator Loop Skill
Execute tasks iteratively until completion with structured signals, stagnation detection, and dual-condition exit gates.
Why This Exists
Traditional AI coding requires manual "keep going" prompts. Navigator Loop provides:
- Structured completion signals (NAVIGATOR_STATUS block)
- Dual-condition exit gate (heuristics + explicit signal)
- Stagnation detection (circuit breaker for stuck loops)
- Progress visibility (phases: INIT → RESEARCH → IMPL → VERIFY → COMPLETE)
Based on Ralph's autonomous loop innovations, adapted for Navigator's context-efficient architecture.
When to Invoke
Auto-invoke when:
- User says "run until done", "keep going until complete"
- User says "iterate until finished", "autonomous mode"
- User says "loop mode", "don't stop until done"
- Task document has
loop_mode: true
DO NOT invoke if:
- Single-step task (no iteration needed)
- User says "just do this once"
- Already in loop mode (prevent nested loops)
- User explicitly disabled loop mode
Configuration
Loop mode settings in .agent/.nav-config.json:
Core options:
enabled: Default state for new tasksmax_iterations: Hard cap to prevent infinite loops (1-20)stagnation_threshold: Same-state count before pause (2-5)exit_requires_explicit_signal: Require EXIT_SIGNAL alongside heuristicsshow_status_block: Render NAVIGATOR_STATUS each iteration
Autonomous / overnight options (v6.2.2+):
iteration_approval: When to prompt the user for accept/reject between iterations."none"(default) — never prompt; loop runs uninterrupted"strict"— prompt after every iteration"periodic"— prompt every N iterations (where N =periodic_interval, default 3)periodic_interval: Wheniteration_approval == "periodic", the cadence of prompts. Default 3 (every 3rd iteration). Set higher for less frequent check-ins on long overnight runs (e.g., 5 or 10).never_pause_on_stagnation: Iftrue, stagnation triggers auto-diversification instead of anAskUserQuestionpause. Required for true overnight runs. Inspired by karpathy/autoresearch's NEVER STOP directive.stagnation_diversify_strategy: Which recovery to attempt whennever_pause_on_stagnationfires."combine"— combine previous near-misses / partially-met indicators"radical"— try a substantially different approach (re-architect, swap library)"reread"— re-read the in-scope task/system docs for missed signals
Safety guard: Setting never_pause_on_stagnation: true REQUIRES max_iterations to be set explicitly (the default of 5 is fine; the point is — no infinite default). Without a max, an autonomous loop can spin forever on a fundamentally broken task.
Execution Steps
Step 1: Initialize Loop State
Load configuration:
Initialize tracking variables:
Display loop start:
Step 2: Execute Iteration
Perform task work based on current phase:
| Phase | Actions | |
|---|---|---|
| INIT | Load context, understand requirements | |
| RESEARCH | Explore codebase, find patterns | |
| IMPL | Write code, make changes | |
| VERIFY | Run tests, validate functionality, simplify code | |
| COMPLETE | All indicators met, ready to exit |
Track changes during iteration:
- Files read (for RESEARCH detection)
- Files changed (for IMPL detection)
- Tests run (for VERIFY detection)
- Commits made (for completion indicator)
Step 3: Generate Status Block
After each iteration, generate NAVIGATOR_STATUS:
Display status block:
Step 3.5: Per-Iteration Approval Gate (optional)
Skip this step if config.loop_mode.iteration_approval == "none" (default).
Run this step if the user wants oversight between iterations — for risky changes, learning the loop's behavior, or sanity-checking before a long run.
| Setting | Behavior | |
|---|---|---|
"none" | Never prompt. Loop continues to Step 4. | |
"strict" | Prompt after every iteration. | |
"periodic" | Prompt every Nth iteration. N defaults to 3; configurable via loop_mode.periodic_interval. |
When prompting, use AskUserQuestion immediately after the status block:
Decision handling:
- Continue: Proceed to Step 4 normally.
- Adjust: Capture the user's feedback into a transient note, do NOT advance hash history (so the next iteration is judged as fresh progress), continue to Step 4.
- Abort: Jump to Step 8 (Cleanup) with
status: "user_aborted".
This gate runs BEFORE stagnation detection so that a rejected iteration doesn't accidentally accumulate stagnation count.
Step 4: Check Stagnation
Calculate state hash:
If stagnation detected (same hash for N iterations), the response depends on never_pause_on_stagnation.
Default behavior (never_pause_on_stagnation: false)
Prompt the user:
Use AskUserQuestion for choice:
- Continue: Reset stagnation counter, continue loop
- Clarify: User explains blocker, incorporate and continue
- Abort: Exit loop with partial completion marker
Autonomous behavior (never_pause_on_stagnation: true)
The loop is running unattended (overnight, CI, etc.). Do NOT prompt — auto-diversify based on stagnation_diversify_strategy:
| Strategy | What to attempt next iteration | |
|---|---|---|
combine | Re-examine partially-met indicators; combine 2 near-miss approaches from previous iterations | |
radical | Discard the current approach; try a substantially different design (different library, different architecture, different algorithm) | |
reread | Re-read the in-scope task doc + relevant system docs; look for a missed signal or constraint |
After diversifying:
- Reset stagnation counter to 0
- Record the diversification in the iteration's notes (so the next status block reflects it)
- Continue to Step 5
Hard stop: Even in autonomous mode, the loop still terminates on max_iterations. If diversification has been triggered ≥3 times within a single run, escalate to the abort path (creates a loop-aborted marker and exits) — repeated diversification is itself a signal that the task is fundamentally stuck.
Inspired by karpathy/autoresearch's NEVER STOP directive: "If you run out of ideas, think harder — read papers, re-read in-scope files for new angles, try combining previous near-misses, try more radical architectural changes."
Step 5: Check Exit Conditions
Evaluate dual-condition gate:
Exit conditions:
- Heuristics: At least 2 completion indicators met
- EXIT_SIGNAL: Explicit signal that task is complete
Completion indicators (mapped from autonomous protocol):
code_committed: Changes committed to gittests_passing: Test suite passes (exit code 0)code_simplified: Code simplified for clarity (v5.4.0+)docs_updated: Documentation files changedticket_closed: PM tool ticket marked donemarker_created: Completion marker exists
Exit decision logic:
Step 6: Handle Max Iterations
If iteration >= max_iterations:
Step 7: Complete Loop
When exit conditions met, emit the exit signal in JSON format and display completion:
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/nav-loop/SKILL.md
Popularity
- Repository stars
- 195
- Repository forks
- 10
- 7-day trend score
- 26
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 12 May 2026, 5 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/alekspetrov/navigator/nav-loop)