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.
npx skills add haidrrrry/loop-engineering-skills --skill loop-memorygit clone --depth 1 https://github.com/haidrrrry/loop-engineering-skillsWrote 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.
[](https://agentmods.dev/skills/haidrrrry/loop-engineering-skills/loop-memory)<a href="https://agentmods.dev/skills/haidrrrry/loop-engineering-skills/loop-memory"><img src="https://agentmods.dev/badge/skills/haidrrrry/loop-engineering-skills/loop-memory/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.
<a href="https://agentmods.dev/skills/haidrrrry/loop-engineering-skills/loop-memory"><img src="https://agentmods.dev/badge/skills/haidrrrry/loop-engineering-skills/loop-memory.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00107 | $0.00729 |
| Opus 5.5 | $0.00043 | $0.00292 |
| Sonnet 5.5 | $0.00021 | $0.00146 |
| Haiku 4.5 | $0.00011 | $0.00073 |
Grade A, and why
loop-memory 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.
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.
How it starts
The opening of the file, as written. The whole thing — 70 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Loop Memory
Reflexion-style verbal memory: the agent reflects on each attempt in writing, stores the reflection, and reads recent reflections before acting. Research (Shinn et al., 2023) shows this mechanism — reflect, store, re-read — beats blind retrying by wide margins (+22% on decision tasks over 12 trials, +11% on code) and beats memory-without-reflection by 8 points. The gain comes from written reasons, not from retrying harder.
The protocol
Before acting (every task)
- Read
.loop/LESSONS.md. - Apply the Standing rules section unconditionally.
- Read the 3 most recent entries. If any is relevant to the current task, state in one line how it changes your approach. If none is relevant, proceed — do not force it.
After acting (every attempt, pass or fail)
Append exactly one entry in the file's format:
## [date] — [task, 5 words max] — PASS|FAIL
- What happened: [one line]
- Root cause / why it worked: [one line]
- Next time: [one specific, checkable instruction]
Quality bar for "Next time":
- ❌ "Be more careful with the database" — not checkable
- ✅ "Run
npx prisma migrate deploybefore any seed script" — checkable - ❌ "Remember the API is tricky" — vague
- ✅ "The /users endpoint paginates at 50; always pass ?page= when counting"
Failure reflection, specifically
When an attempt failed, the reflection must answer: what did I believe that was wrong? Failed attempts usually come from a false assumption, not a typo. Name the assumption. That's the lesson.
Maintenance (when the file exceeds ~30 entries)
- Read all entries oldest-first.
- Any lesson that appears 2+ times graduates into Standing rules, rewritten as a single imperative line.
- Delete the oldest 20 entries after graduation.
- Never delete Standing rules without the user's approval.
What NOT to store
- Secrets, keys, tokens, personal data — never, even if they caused the failure.
- Narration ("I then tried X, after which Y…") — store conclusions only.
- Duplicate lessons — if it's already there, don't re-add; consider graduating it.
- Blame or self-criticism — lessons are instructions, not feelings.
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.
- 1mo ago First seen · 70 lines · 107 tokens per session scan A 055a2d753c30
loop-memory is a skill published in the GitHub repository haidrrrry/loop-engineering-skills (4 stars, last pushed 3mo ago), licensed MIT. It adds 107 tokens to every session and 729 once invoked, about $0.0004 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-08-31.
Other skills, from other repositories
principle-guard-the-context-window
Apply when context is filling up: large outputs, long files, repeated reads, fan-out planning. Route bulk to subagents; keep summaries in the main thread, not raw payloads.
memclaw
The agent's persistent long-term memory — the only knowledge that survives across sessions, shared across the fleet under access control. Consult it at the start of a task to recall prior decisions, findings, and rules before acting, and write outcomes, decisions, and lessons as work completes. Use whenever a caura…
company-brain
How an agent should operate as one mind inside a shared Company Brain built on Caura — recall before acting, obey fleet keystones, reuse and publish skills, and report outcomes so every task compounds across the whole organization. Use this whenever you work as part of a Caura-connected team or fleet and your work…
compass-integrity
Use when the user is about to rely on prior session memory for a non-trivial decision, or when something feels off about a recall hit — runs the Merkle chain check, drift summary, and daemon liveness in one pass and surfaces any tampering, drift bursts, or daemon-down state before the user acts on stale or corrupted…
lifecycle_report
Scan project memory for v1.7.1 lifecycle frontmatter · report tier distribution + promotion candidates (reinforcecount >= promoteafter) · NO LLM.
session_audit
Scan project memory · age distribution + ungrouped count (L1 build readiness) + per-namespace entity stats · NO LLM.