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 agentmods add skills/haidrrrry/loop-engineering-skills/loop-memorynpx 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.svg" alt="Measured on agentmods" 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 | $0.00107 | $0.00729 |
| Opus 5 | $0.00053 | $0.00365 |
| Sonnet 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 3d 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.
- 3d 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 (2 stars, last pushed 2mo ago), licensed MIT. It adds 107 tokens to every session and 729 once invoked, about $0.0005 per session on Opus 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
add-backend
Guide for adding a backend (Rust or Python) to the agent-sec-core security middleware. Use when creating new backends, integrating Rust or Python code into the security middleware, or extending with new backend actions.
skill-ledger
Skill 安全状态查看、风险暴露审查、用户决策、快速扫描认证与可选深度扫描。支持用户主动查看或扫描单个/全部 Skill;当用户要求 agent 安装 Skill 且安装成功后,必须自动对最终本地目录执行快速扫描认证。.
pr-body
分析当前分支的全部变更,自动生成或更新 PR 标题和正文。聚焦内容质量:解释 why、归纳 what、标注测试方式,遵循 anolisa 项目 PR 模板规范。适用于新建 PR 前生成描述,或已有 PR 需要更新描述。.
regex-mastery
Use this skill when writing regular expressions, debugging pattern matching,optimizing regex performance, or implementing text validation. Triggers on regex, regular expressions, pattern matching, lookahead, lookbehind, named groups, capture groups, backreferences, and any task requiring text pattern matching.
install-openclaw
Install and configure OpenClaw non-interactively with Alibaba Cloud Model Studio. Use when the user asks to install OpenClaw, configure Aliyun Bailian/Model Studio/DashScope credentials, choose pay-as-you-go, Coding Plan, or Token Plan billing, set Base URL/model config, optionally configure DingTalk, start the local…
agentsight-bugfix
AgentSight fix issues 流程。了解问题 → 复现验证 → 根因分析 → 编码修复 → 验证修复,五阶段标准化调试迭代循环。确保 AI agent 遵循最小改动、逐轮验证的修复规范。.