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 8,175 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.
npx @cobusgreyling/loop-init .
loop-init scaffolds skills, state, and budget files, then prints your Loop Ready score and first loop command. Swap --tool for claude, codex, or opencode.
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) | Scaffold → cost check → audit → first loop — start here if you just landed |
| 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-audit | Loop Readiness Score CLI (v1.6 — constraints + governance scoring) — npx @cobusgreyling/loop-audit . --suggest · --badge for README |
| loop-init | Scaffold starters + budget/run-log + constraints (v1.4) — npx @cobusgreyling/loop-init . --pattern daily-triage --tool grok |
| 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,...> |
| Goal Engineering | Companion: loops discover, goals finish — /goal + stack cookbook (npx @cobusgreyling/goal doctor .) |
| Stories | Real wins and honest failures |
| Contributor quickstart | Help wanted: 21 scoped good first issues — comment I'll take this to get assigned |
| Community update | July 4: 5.5k stars, traffic sources, contributor merges |
| Community week (Jul 8) | loop-worktree npm, MCP quickstart, tool appendices |
| npm update (Jul 16) | loop-context 1.2.0 + loop-worktree 1.1.0 — daily budget, path locks |
| Maintenance (Jul 10) | Doc sync, branch prune, loop-audit 1.6.0 follow-up |
| Prior release notes | v1.5.0 — loop-sync, constraints, MCP server |
| Add your project | Pinned: Loop Ready badge + adopters list |
Peter Steinberger:
“You shouldn’t be prompting coding agents anymore. You should be designing loops that prompt your agents.”
Boris Cherny (Head of Claude Code at Anthropic):
“I don’t prompt Claude anymore. I have loops running that prompt Claude and figuring out what to do. My job is to write loops.”
The leverage point has moved from crafting individual prompts to designing the control systems that orchestrate agents over time.
| Primitive | Job in the Loop |
|---|---|
| Automations / Scheduling | Discovery + triage on a cadence |
| Worktrees | Safe parallel execution |
| Skills | Persistent project knowledge |
| Plugins & Connectors | Reach into your real tools (MCP) |
| Sub-agents | Maker / checker split |
| + Memory / State | Durable spine outside any conversation |
Full detail: docs/primitives.md · Cross-tool matrix: docs/primitives-matrix.md
flowchart LR
A[Schedule / Automation] --> B[Triage Skill]
B --> C[Read + Write STATE / Memory]
C --> D[Isolated Worktree]
D --> E[Implementer Sub-agent]
E --> F[Verifier Sub-agent<br/>tests + gates]
F --> G[MCP / Git / Tickets]
G --> H{Human Gate?}
H -->|safe / allowlisted| I[Commit / PR / Action]
H -->|risky / ambiguous| J[Escalate to human<br/>with full context]
I --> A
J --> A
Deeper diagrams — the actor-level sequence within one run, the run lifecycle's states, autonomy levels L1-L3, and how tools/ maps