mcpbeat Sign in

Objective Loop Skill for Claude

Loop /do cycles until done-criteria verify or budget stops.

4k tokens
context cost
the whole folder, loaded on every use
5
files
instructions only
0
copies elsewhere
how many repositories repackaged it
413
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/notque/vexjoy-agent --skill objective-loop

The instruction itself

10 sections, as written by the author

Objective Loop

The toolkit's iterate-until-verified-done loop. A user states an objective with verifiable done-criteria; each iteration routes one /do cycle, verifies the criteria by executing them, and reschedules itself via ScheduleWakeup until verified-done or budget-stop. This skill is a planner/verifier wrapped around the /do router — it executes no work inline. Objectives over tasks: describe what done looks like and how to verify it; the loop finds the path.

Phase 1: SPEC

Gather the objective spec from the request. Interview only for missing fields.

| Field | Required | Default |

|---|---|---|

| Objective statement | yes | — |

| DONE-CRITERIA | yes | — |

| Iteration budget | no | 5 |

| Token-budget note | no | orchestration.token_budget from .claude/settings.json (500000 when absent) |

| NOT-DONE-YET guardrails | no | empty |

DONE-CRITERIA are verifiable checks. Each criterion has a type: command (default, preferred) or rubric.

  • command — a deterministic command with an expected exit code/output: pytest -q exits 0; gh pr view N --json state -q .state prints MERGED; validate-doc-counts.py reports zero drifts. A criterion the model reasons about is not a criterion; each needs a command plus an expected observable.
  • rubric — allowed only where no mechanical check exists, per the PHILOSOPHY.md verification ranking (exit code > fresh-context grader > self-critique). Store the rubric verbatim in the state file at SPEC time: pass conditions plus the evidence the grader must cite. Frozen once the loop starts — changes require the user, same as a guardrail.

NOT-DONE-YET guardrails name what may never be done to satisfy a criterion (e.g. "never weaken a gate to make it pass"). They bind every iteration: inject them verbatim into each /do dispatch.

Gate: spec complete. Proceed to Phase 2.

Phase 2: STATE

Write .objective/<slug>/state.md from the template in references/state-file.md: objective, criteria table, guardrails, per-iteration log, next planned step.

  • Wakeups resume FROM THE STATE FILE, never from conversation memory — the wakeup prompt carries only a pointer.
  • .objective/ mirrors .feature/'s ephemerality but stays separate: .feature/ is feature-lifecycle's phase machine, managed only by feature-state.py, and its presence reroutes /do into feature phases. Objectives are arbitrary goals.
  • State is session working memory — keep .objective/ unstaged; stage repo files by name only.

Gate: state file written. Proceed to Phase 3.

Phase 3: ITERATE — one /do cycle

Plan the smallest next step toward the unmet criteria, then route it through the /do phases: classify → route → dispatch agents → evaluate. The loop dispatches work exclusively through /do — catching yourself editing or analyzing inline means stop and route. Multi-part objectives may dispatch parallel agents per /do's rules.

Learning capture is automatic. Every iteration dispatches through /do, so routing rows and outcomes record via the /do learning hooks. Add no manual capture.

Gate: dispatch evaluated, iteration log updated in the state file. Proceed to Phase 4.

Phase 4: VERIFY (execution, not reasoning)

Run every done-criterion check. A worker's "criterion passes" claim never substitutes for the re-run.

  • command — run the command; paste the exit code and the decisive output line into the iteration log.
  • rubric — dispatch a fresh-context sub-agent that did NOT produce the work. Input is the artifact plus the rubric, nothing else — no iteration history. It returns PASS/FAIL plus cited evidence (file:line or output excerpt), pasted into the iteration log exactly like an exit code.

Then:

  • All criteria pass → write the final report (per-criterion evidence), STOP. The loop ends by not calling ScheduleWakeup.
  • Any criterion unmet → Phase 5.

Criteria-gaming guard (hard rule). A criterion may never be satisfied by weakening a hook, gate, test, or safety control — and a rubric is never weakened to pass. When the only visible path to "pass" weakens a control or the rubric text, stop the loop and report the conflict to the user.

Phase 5: RESCHEDULE or STOP

| State | Action |

|---|---|

| All criteria pass | Final report; stop — no wakeup call |

| Unmet + iterations remain | Update state file (log, next planned step); call ScheduleWakeup {delaySeconds, reason, prompt} with prompt = "Read .objective/<slug>/state.md, then resume the objective-loop skill from that state file." |

| Budget exhausted | Honest NOT-DONE report: per-criterion status with last evidence, remaining gaps, suggested next step; stop — no wakeup call |

Delay table (prompt-cache aware; ScheduleWakeup clamps 60–3600s):

| Wait type | Delay | Cache economics |

|---|---|---|

| Active polling (CI run, PR merge expected soon) | 270s or less | Keeps the Anthropic prompt cache warm (5-min TTL) |

| Idle / long agent work | 1200s+ | Pays one cache miss; right for long gaps |

| ~300s band | skip it | Worst case — pays the miss with none of the idle benefit |

Harness fallback. When ScheduleWakeup is absent from your tool list, run iterations sequentially in-session against the same state file and budgets. For a single until-condition wait inside an iteration, the Monitor tool fits; loop boundaries use ScheduleWakeup.

Safety stance (binding)

  • Default mode is ScheduleWakeup: session-scoped, dies with the session, zero persistence.
  • Cron mode is persistence. CronCreate or system crontab survives the session and requires the owner's explicit OWNER-APPROVED-PERSISTENCE phrase per the home CLAUDE.md. Stop and ask before any cron-mode loop; on approval, route to headless-cron-creator.
  • Criteria-gaming guard (Phase 4) and NOT-DONE-YET guardrails (Phase 1) bind every iteration.

Error Handling

| Error | Cause | Solution |

|---|---|---|

| State file missing on wakeup | .objective/<slug>/ removed mid-loop | Report and stop; ask the user to restate the objective rather than re-deriving it from memory |

| Criterion command fails to run (not just non-zero) | Tool missing, bad path | Fix the check command in the state file first; a broken check verifies nothing |

| Unmet-criteria set unchanged across 2 iterations (read from the Last result column, not judged from memory) | Plan stuck | Change approach: re-route through /do with a different agent or skill; unchanged after a third iteration, spend the report on what blocked progress and stop |

| Wakeup arrives with fresh context | Normal — wakeups carry only the prompt | Resume entirely from the state file per references/state-file.md |

Reference Loading Table

| Signal | Load These Files | Why |

|---|---|---|

| Writing or resuming the state file | state-file.md | Template, slug rules, resume protocol |

References

  • ${CLAUDE_SKILL_DIR}/references/state-file.md — state-file template, slug rules, and the wakeup resume protocol

Other skills for the same job

different authors, same section of the catalogue
Protocolsio Integration
by christophacham
×4

Integration with protocols.io API for managing scientific protocols. This skill should be used when working with protocols.io to search, create, update, or publish protocols; manage protocol steps and materials; handle discussions and comments; organize workspaces; upload and manage files; or integrate protocols.io functionality into workflows. Applicable for protocol discovery, collaborative protocol development, experiment tracking, lab protocol management, and scientific documentation.

16k tokens
Tailored Resume Generator
by frostant
×4

Analyzes job descriptions and generates tailored resumes that highlight relevant experience, skills, and achievements to maximize interview chances

3k tokens
Excalidraw Diagram Generator
by github
vendor ×3

Generate Excalidraw diagrams from natural language descriptions. Use when asked to "create a diagram", "make a flowchart", "visualize a process", "draw a system architecture", "create a mind map", or "generate an Excalidraw file". Supports flowcharts, relationship diagrams, mind maps, and system architecture diagrams. Outputs .excalidraw JSON files that can be opened directly in Excalidraw.

36k tokens scripts
Expo Dev Client
by openai
vendor ×3

Build and distribute Expo development clients locally or via TestFlight

961 tokens
Executing Plans
by ZhanlinCui
×3

Use when you have a written implementation plan to execute in a separate session with review checkpoints

542 tokens
Anndata
by christophacham
×3

Data structure for annotated matrices in single-cell analysis. Use when working with .h5ad files or integrating with the scverse ecosystem. This is the data format skill—for analysis workflows use scanpy; for probabilistic models use scvi-tools; for population-scale queries use cellxgene-census.

16k tokens
Benchling Integration
by christophacham
×3

Benchling R&D platform integration. Access registry (DNA, proteins), inventory, ELN entries, workflows via API, build Benchling Apps, query Data Warehouse, for lab data management automation.

14k tokens
Biopython
by christophacham
×3

Comprehensive molecular biology toolkit. Use for sequence manipulation, file parsing (FASTA/GenBank/PDB), phylogenetics, and programmatic NCBI/PubMed access (Bio.Entrez). Best for batch processing, custom bioinformatics pipelines, BLAST automation. For quick lookups use gget; for multi-service integration use bioservices.

24k tokens

How to use it

Copy the folder

Take notque/objective-loop from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.