Practical patterns, starters & CLI tools for loop engineering with AI coding agents. Design systems that prompt and orchestrate agents (inspired by Addy Osmani and Boris Cherny). Includes loop-audit, loop-init, loop-cost.
# Add to your Claude Code skills
git clone https://github.com/cobusgreyling/loop-engineeringGuides for using ai agents skills like loop-engineering.
Last scanned: 6/15/2026
{
"issues": [],
"status": "PASSED",
"scannedAt": "2026-06-15T10:24:04.404Z",
"npmAuditRan": true,
"pipAuditRan": true,
"promptInjectionRan": true
}loop-engineering is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by cobusgreyling. Practical patterns, starters & CLI tools for loop engineering with AI coding agents. Design systems that prompt and orchestrate agents (inspired by Addy Osmani and Boris Cherny). Includes loop-audit, loop-init, loop-cost. It has 9,608 GitHub stars.
Yes. loop-engineering passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.
Clone the repository with "git clone https://github.com/cobusgreyling/loop-engineering" and add it to your Claude Code skills directory (see the Installation section above).
loop-engineering is primarily written in JavaScript. It is open-source under cobusgreyling on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh loop-engineering against similar tools.
No comments yet. Be the first to share your thoughts!
Stop prompting. Design the loop. Get a score.
# Front door (recommended) — one binary for init + doctor + status
npx @cobusgreyling/loop init . --pattern daily-triage --tool grok
npx @cobusgreyling/loop doctor .
# Same as before (still fully supported — forks need not change)
npx @cobusgreyling/loop-init .
# Optional: also scaffold a versioned harness (harness-foundry)
npx @cobusgreyling/loop init . --with-foundry
loop init (or loop-init) scaffolds skills, state, and budget files, then prints your Loop Ready score and first loop command. loop doctor combines audit + sync + file checks into top-3 next actions. Swap --tool for claude, codex, or opencode. Use --with-foundry when you want the loop as a composable runtime stack. See docs/cli-front-door.md.
Loop engineering replaces you as the person who prompts the agent — you design the system that does it instead.
New here? Quickstart (5 min) · Interactive picker
For developers using Grok, Claude Code, Codex, Cursor, and other AI coding agents.
| Start here | Description |
|---|---|
| Quickstart (5 min) | loop init → loop doctor → first loop — start here if you just landed |
| CLI front door | Unified @cobusgreyling/loop — old packages stay open |
| Loop Engineering essay | The concept, primitives, and Grok mapping — read for the why |
| Pattern Picker | Which loop to run first — start here if unsure |
| Primitives Matrix | Cross-tool loop primitive mapping — bookmark this |
| Loop Design Checklist | Ship readiness rubric |
| Patterns | 7 production patterns + interactive picker |
| Starters | Clone-and-run kits (Grok, Claude Code, Codex, Opencode) |
| Opencode examples | CLI-first loops: cron/systemd + opencode run, skills, worktrees |
| loop (front door) | Unified CLI — npx @cobusgreyling/loop init | doctor | status | audit | cost · cli-front-door |
| loop-audit | Loop Readiness Score CLI (v1.7 — constraints + governance + Harness Runtime) — npx @cobusgreyling/loop audit . --suggest · also loop-audit |
| loop-init | Scaffold starters + budget/run-log + constraints (v1.5) — npx @cobusgreyling/loop init . --pattern daily-triage --tool grok · also loop-init |
| harness-foundry | Companion runtime: versioned stacks, sessions, traces — npx @cobusgreyling/harness-foundry init --from loop-engineering:daily-triage |
| outerloop | Companion governance: evidence → verdict → answerability |
| loop-cost | Token spend estimator — npx @cobusgreyling/loop-cost |
| loop-sync | Drift detection between STATE.md and LOOP.md — npx @cobusgreyling/loop-sync . |
| loop-context | Stateful memory manager + circuit breaker for long runs — npx @cobusgreyling/loop-context --check --ledger run.json |
| loop-mcp-server | MCP runtime lookup for patterns, skills, state — npx @cobusgreyling/loop-mcp-server |
| loop-worktree | Manage isolated git worktrees per fix attempt — npx @cobusgreyling/loop-worktree create --run-id <id> --pattern <p> |
| loop-gate | Mechanical enforcement of the path denylist + auto-merge allowlist from gate.yaml — npx @cobusgreyling/loop-gate check --action auto-merge --paths <f1,f2,...> |
| loop-sandbox | Ephemeral git worktree isolation + patch capture — npx @cobusgreyling/loop-sandbox run -- <cmd> |
| loop-action | GitHub Composite Action for running loops in CI — uses: cobusgreyling/loop-engineering/tools/loop-action@main |
| Goal Engineering | Companion: loops discover, goals finish — /goal + stack cookbook (npx @cobusgreyling/goal doctor .) |
| Memory Engineering | Companion: stop re-explaining the repo — tiers, budget, Memory Ready score (node tools/memory-init/cli.js .) |
| Fleet Engineering | Companion: govern populations of agents — registry, inbox, Fleet Ready score (npx @cobusgreyling/fleet-init .) |
| Stories | Real wins and honest failures |
memory-engineering → loop-engineering → harness-foundry → outerloop → fleet-engineering
(persist) (patterns) (runtime) (verdict) (population)
| Layer | You get | Start |
|---|---|---|
| Memory | Tiers, recall budget, Memory Ready score | memory-engineering |
| Design (this repo) | Patterns, starters, Loop Ready score | npx @cobusgreyling/loop init . then loop doctor . |
| Runtime | Versioned harness, traces, evolve | npx @cobusgreyling/loop init . --with-foundry or Foundry showcase |
| Govern | Evidence, verdict, answerability | outerloop |
| Fleet | Registry, inbox, budgets, kill switch | npx @cobusgreyling/fleet-init . · Fleet Ready |
Scale beyond one loop: when agents forget across sessions, add memory-engineering. When