# Loop Engineering

> Shared loop-engineering reference for COG skills - the agent loop, deterministic verifiers, termination conditions, in-loop context management, and named patterns. Invoke when designing or debugging a skill that iterates (search-verify-retry, scan-until-dry, fetch-retry-gate).

- Skill: `huytieu/loop-engineering-3` (Agent Skill)
- Install (CLI): `npx skillmds@latest add huytieu/loop-engineering-3`
- Raw SKILL.md: https://api.skillmd.com/api/skills/huytieu/loop-engineering-3/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: huytieu (https://skillmd.com/u/huytieu)
- Updated: 2026-09-21
- Page: https://skillmd.com/skills/huytieu/loop-engineering-3

---


Read `.claude/skills/loop-engineering/SKILL.md` and execute it exactly as written — that file is the authoritative
playbook. Then follow `.agents/rules/cog.md`.

Antigravity substitution: where the playbook delegates to a `.claude/agents/<name>`
worker, invoke `.agents/agents/<name>.md` via `invoke_subagent` instead.

