loop-engineering

loop-engineering is a skill for Codex from Mark393295827/third-brain-v7-skills. It costs 35 tokens per session (1,568 once invoked), scanned A, original, MIT.

A design method for turning repeated work into a bounded cycle: Trigger, Execute, Verify, and State. It supports scheduled automation, goal-based agents, and repeated research with limits and saved progress.

In plain words
What is it for?
Defining triggers, inputs, budgets, metrics, verifiers, retry limits, stop conditions, recovery steps, and run receipts for repeatable tasks.
Why use it?
It prevents automated work from running without a clear finish, independent checking, permission boundaries, or a way to recover and resume.

Skill for Codex

Written for Codex: agents/openai.yaml present.

Good fit Defining triggers, inputs, budgets, metrics, verifiers, retry limits, stop conditions, recovery steps…

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mark393295827/third-brain-v7-skills/loop-engineering
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Mark393295827/third-brain-v7-skills --skill loop-engineering
Clone the repo
git clone --depth 1 https://github.com/Mark393295827/third-brain-v7-skills

Made for: Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for loop-engineering

README.md
[![agentmods](https://agentmods.dev/badge/skills/mark393295827/third-brain-v7-skills/loop-engineering.svg)](https://agentmods.dev/skills/mark393295827/third-brain-v7-skills/loop-engineering)
Your own site
<a href="https://agentmods.dev/skills/mark393295827/third-brain-v7-skills/loop-engineering"><img src="https://agentmods.dev/badge/skills/mark393295827/third-brain-v7-skills/loop-engineering.svg" alt="Measured on agentmods" height="20"></a>
Per session 35 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,568 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00035 $0.01568
Opus 5 $0.00017 $0.00784
Sonnet 5 $0.00007 $0.00314
Haiku 4.5 $0.00003 $0.00157

Measured 7d ago against content hash 41688a967b70, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

loop-engineering scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/validate_loop_contract.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/loop-engineering/SKILL.md · 150 lines

How it starts

The opening of the file, as written. The whole thing — 150 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Loop Engineering

<skill_contract> A repeatable task with inspectable state, finite budgets, permissions, and an independent verifier. A validated Trigger -> Execute -> Verify -> State contract plus resumable run receipts. The declared metric or stop condition is supported by fresh validator and verifier evidence. <non_goals>Dependency-graph orchestration, unbounded autonomy, or self-certified completion.</non_goals>

Build loops only when repeated execution creates evidence. Every loop needs admission, a validated contract, durable state, independent evaluation, bounded retries, stop/recovery rules, and a final receipt.

Usage Template

Provide: objective, trigger, scope/non-goals, inputs, state/artifact paths, metric, verifier, permissions, budgets, stop condition, recovery, and write-back. See references/ci-repair-loop-example.md for a worked contract.

Workflow

Select one mode:

  • Goal: run until a defined end state or cap.
  • Loop: poll/iterate while eligible work exists.
  • Automation: start from an external schedule/event; the trigger is not execution evidence.
  • AutoResearch: vary experiments against an objective metric in a sandbox.

Admit only if work is repeatable, outputs are inspectable, a verifier exists, failures are recoverable, and autonomy is worth the orchestration/review cost. Otherwise use a one-shot workflow.

Use graph-engineering instead when explicit data dependencies, independent branches, typed joins, or node-local recovery create measurable value. A Graph node may use this Loop contract for local repetition; Graph width does not replace finite Loop depth.

<unknowns_gate>

Classify unknowns as known, probeable, testable, or blocked. Missing objective, verifier, permission boundary, budget, or recovery is NEEDS_INPUT; do not infer these controls from intent. Unknown implementation details may be resolved inside the loop only when the probe is bounded and reversible.

Read the full file on GitHub · 150 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 150 lines · 35 tokens per session scan A 41688a967b70

Subscribe to this mod's changes

loop-engineering is a skill published in the GitHub repository Mark393295827/third-brain-v7-skills (138 stars, last pushed 16d ago), licensed MIT. It adds 35 tokens to every session and 1,568 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

obsidian-ai-setup

Bootstrap an Obsidian vault with the AI Pro Obsidian Plugin. Creates the complete vault structure, system files, Obsidian configuration, memory system, hooks, and output styles, then runs personalized onboarding to tailor the workspace to the user. Uses a single universal structure with no mode selection. Trigger when…

anliberant/obsidian-ai-setup · 94 tokens

wiki-retrieve

Build and query a vault-local contextual BM25 retrieval index with optional multilingual Nomic cosine reranking; use for retrieve, hybrid retrieval, BM25, rerank, contextual retrieval, chunk search, vault search, semantic search, find relevant passages, or retrieval diagnostics. Derived caches stay under .vault-meta…

AgriciDaniel/claude-obsidian · 81 tokens

obsidian

Comprehensive guidelines for Obsidian.md plugin development including ESLint rules from eslint-plugin-obsidianmd v0.4.1, TypeScript best practices, memory management, API usage (requestUrl vs fetch), UI/UX standards, popout window compatibility, community.obsidian.md submission process, and Scorecard optimization. Use…

gapmiss/obsidian-plugin-skill · 105 tokens

superbrain-distill

Internal SuperBrain skill — run by the detached capture child to distill a session-event delta into routed Obsidian notes. Not for direct user invocation.

m3talux/superbrain · 36 tokens

pos-verify

Use this immediately after files are created, edited, moved, deleted, or materially rewritten inside PersonalOS. Verifies that new truth was routed to the correct owner, written in the correct file shape, and still follows POS conventions. Do NOT use for whole-vault deep audits; use system-health-check.

vincentmumme/personalos-boilerplate · 65 tokens

skillify

Use this when {{username}} asks to skillify a repeated workflow, determine whether it deserves a reusable PersonalOS skill, or harden an existing workflow into a tested resolver-reachable capability. Do NOT use for one-off notes, ordinary execution, or already-specified skill authoring; use write-skill.

vincentmumme/personalos-boilerplate · 66 tokens