loop-engineering

loop-engineering is a skill for Claude Code, Codex from build-with-dhiraj/ai-workflow-framework-portability-kit. It costs 60 tokens per session (1,070 once invoked), scanned A, original, MIT.

A guide to building repeating agent workflows, sometimes called loops, in Claude Code and Cursor. It covers how to set goals, verify progress, save state, and require human approval.

In plain words
What is it for?
It helps design agent harnesses, choose loop tools, add checks, and decide when to use a one-time task or a recurring workflow.
Why use it?
It helps turn repeated agent work into a controlled process instead of rerunning ad hoc commands without a clear stopping condition.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: reads .claude/ paths; mentions subagents; mentions Claude Code.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python3 research/loop-engineering-agent-hub-2026/scripts/ingest_corpus_full.py.

Good fit It helps design agent harnesses, choose loop tools, add checks, and decide when to use a one-time task or a recurring workflow.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/build-with-dhiraj/ai-workflow-framework-portability-kit
agentmods
npx agentmods add skills/build-with-dhiraj/ai-workflow-framework-portability-kit/loop-engineering

Made for: Claude Code, 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/build-with-dhiraj/ai-workflow-framework-portability-kit/loop-engineering/github.svg)](https://agentmods.dev/skills/build-with-dhiraj/ai-workflow-framework-portability-kit/loop-engineering)
Your own site
<a href="https://agentmods.dev/skills/build-with-dhiraj/ai-workflow-framework-portability-kit/loop-engineering"><img src="https://agentmods.dev/badge/skills/build-with-dhiraj/ai-workflow-framework-portability-kit/loop-engineering/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for loop-engineering

Your own site · 80×15
<a href="https://agentmods.dev/skills/build-with-dhiraj/ai-workflow-framework-portability-kit/loop-engineering"><img src="https://agentmods.dev/badge/skills/build-with-dhiraj/ai-workflow-framework-portability-kit/loop-engineering.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 60 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,070 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.00060 $0.01070
Opus 5.5 $0.00024 $0.00428
Sonnet 5.5 $0.00012 $0.00214
Haiku 4.5 $0.00006 $0.00107

Measured 1mo ago against content hash 4b854af01e81, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/load-digest.py, scripts/repo-pick.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 · 112 lines

How it starts

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

Loop Engineering

Operational skill distilled from 125-source full ingest (93 non-GitHub line-indexed + 33 GitHub code audits). Load REFERENCE.md for doctrine; INSTALL.md for code-backed installs; CORPUS_INDEX.md for source digests.

v2 requirement — evidence before recommendation

Before recommending any repo or install path:

  1. Run python3 scripts/load-digest.py --repo {slug} OR read data/repo-audits/{owner__repo}.md
  2. Cite evidence IDs (E###) or audit locators (file:line) in your answer
  3. Flag README-vs-code mismatches when audit notes them

Do not recommend installs from REFERENCE.md alone.

When to use

  • User asks to design a loop, harness, or agent workflow
  • Choosing between /loop, /goal, Routines, Ralph, or custom bash engines
  • Picking an installable repo vs custom skill/agent
  • Wiring verification, state write-back, or human-in-the-loop gates

Decision tree

Need recurring agent work?
├─ Yes → Stop condition verifiable?
│   ├─ Yes → Maturity path (below)
│   └─ No → Fix stop condition first; do not schedule
└─ No → Single-shot skill dispatch; not a loop

Maturity path (jpoindexter / corpus consensus):
1. Reliable manual run (one skill, one outcome)
2. Encode as SKILL.md
3. Add state file or kernel write-back
4. Wrap in gated loop (mechanical + human gate)
5. Schedule via /loop or /goal

Loop contract template

Every loop design MUST specify:

Field Question
Trigger Schedule, event, or human /loop
Input state What the agent reads (files, DB, kernel)
Skill/playbook Which SKILL.md stages run
Verifier Separate checker sub-agent or mechanical gate
Stop condition Boolean test — not vibes
Write-back What persists after each cycle
Human gate When human must approve before next cycle

Harness primitives (use first)

Primitive Use when
/loop Fixed interval re-run of prompt or slash-command
/goal Run until separate model grades "done"
Routines Anthropic-documented recurring workflows
Sub-agents Maker builds; checker verifies (never same agent)
Context kernel Cross-session state at .kernel/KERNEL.md

Read the full file on GitHub · 112 lines

Files

What ships with it

40 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. 1mo ago First seen · 112 lines · 60 tokens per session scan A 4b854af01e81

Subscribe to this mod's changes

loop-engineering is a skill published in the GitHub repository build-with-dhiraj/ai-workflow-framework-portability-kit (5 stars, last pushed 21d ago), licensed MIT. It adds 60 tokens to every session and 1,070 once invoked, about $0.0002 per session on Opus 5.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-09-21.

Related

Other skills, from other repositories

codeql

Run CodeQL database creation and security queries, add data-extension models, or process CodeQL SARIF. Use when CodeQL is explicitly requested; use security-review for a broader manual security review.

waybarrios/opencode-power-pack · 42 tokens

sharp-edges

Identify error-prone APIs, dangerous configuration, and footgun designs that enable security mistakes. Use for API ergonomics, misuse resistance, secure defaults, or pit-of-success reviews; use code-review for general defects.

waybarrios/opencode-power-pack · 47 tokens

huggingface-vision-trainer

Train object-detection, image-classification, or SAM segmentation models on Hugging Face Jobs. Use for vision fine-tuning and evaluation; use huggingface-llm-trainer for language models.

waybarrios/opencode-power-pack · 48 tokens

code-quality

Agents should invoke this skill for code reviews, linting/formatting setup, maintainability checks, complexity concerns, warning cleanup, coding standards, or quality gates in Rust, TypeScript, Python, shell, and mixed repos.

waybarrios/opencode-power-pack · 49 tokens

code-reviewer

Review code for bugs, logic errors, security vulnerabilities, code quality issues, and adherence to project conventions, using confidence-based filtering to report only high-priority issues that truly matter. Use this skill when reviewing a small set of changes locally (such as unstaged diff), when dispatched as a…

waybarrios/opencode-power-pack · 84 tokens

differential-review

Performs security-focused differential review of code changes (PRs, commits, diffs). Adapts analysis depth to codebase size, uses git history for context, calculates blast radius, checks test coverage, and generates comprehensive markdown reports. Automatically detects and prevents security regressions.

waybarrios/opencode-power-pack · 61 tokens