/slm-loop
Run gate-verified bounded loops with SuperLocalMemory as the durable ledger. Use when a task has a checkable acceptance condition (tests, schema, lint, reconciliation) and you must iterate until an INDEPENDENT gate passes — never stopping just because the agent believes it is
$ npx -y skills add qualixar/superlocalmemory --skill slm-loop --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/slm-loop
Context preview
The summary Claude sees to decide when to auto-load this skill.
Run gate-verified bounded loops with SuperLocalMemory as the durable ledger. Use when a task has a checkable acceptance condition (tests, schema, lint, reconciliation) and you must iterate until an INDEPENDENT gate passes — never stopping just because the agent believes it is
SKILL.md
slm-loop.SKILL.mdname: slm-loop
description: Run gate-verified bounded loops with SuperLocalMemory as the durable ledger. Use when a task has a checkable acceptance condition (tests, schema, lint, reconciliation) and you must iterate until an INDEPENDENT gate passes — never stopping just because the agent believes it is done. `slm loop demo` runs a keyless convergence demo; `slm loop history` and `slm loop show <run_id>` inspect past runs whose every lap is persisted as queryable SLM memory (tag `loop:<name>`). Terminal statuses are DONE / HALT / PAUSE / KILLED / ERROR — report them exactly, never converting HALT/PAUSE/ERROR into success.
when_to_use: "run a bounded loop, gate-verified task, iterate until tests pass, verify against an independent gate, don't trust the agent's own done claim, slm loop, convergence loop, loop until green, loop ledger, resume a loop"
allowed-tools: Bash, slm_recall
slm-loop — Bounded, gate-verified agent loops
The one rule
A bounded loop is complete **only when an independent gate passes** — not when the agent claims it is finished. The agent's own "I'm done" signal is recorded for audit and is *never* used to terminate the loop. If you take one thing from this skill: **the gate is the authority.**
Use a bounded loop whenever the goal has a mechanical, checkable contract: a test suite, a JSON schema, a linter, a reconciliation rule, a citation checker, a security scan. When the goal is subjective, keep a human approval gate (see rungs below).
What SLM adds
Every lap is written to SuperLocalMemory as a durable, queryable memory (tagged `loop:<name>`, session `loop:<run_id>`). That makes a run:
- **auditable** — inspect the decision + gate verdict + budget for each lap;
- **resumable / historical** — a run's ledger survives across sessions;
- **discoverable** — visible via `slm recall`, the dashboard, and any
SLM-integrated tool, alongside everything else the agent remembers.
CLI
slm loop demo [--iterations N] [--json] # keyless convergence demo
slm loop history [--name NAME] [--json] # list recorded runs
slm loop show <run_id> [--json] # every lap of one run
`slm loop demo` proposes a fix, checks it against a deterministic gate that passes on lap 3, and records the run — a zero-setup way to see the control flow and confirm the SLM-backed ledger works end to end.
The bounds
A loop runs inside a safety envelope. Any bound tripping ends the run with `HALT` (never a success):
- **max_iterations** — a hard lap cap.
- **no_progress_window** — consecutive no-change laps before halting a spinning
agent.
- **token budget / wall-clock** — cumulative ceilings.
- **kill switch** — set `SLM_LOOP_KILL` to stop before the next lap.
- **approval rung** — L1 (report), L2 (assisted, pauses for approval), L3
(unattended). L2/L3 require approval before a passing gate is accepted as DONE unless approval is explicitly configured off.
Terminal statuses — report exactly
| Status | Meaning | |----------|---------| | `DONE` | The independent gate passed **and** approval was granted or not required. | | `HALT` | A bound tripped (iterations, no-progress, token, or wall-clock). | | `PAUSE` | The gate passed but required approval is not yet granted. | | `KILLED` | The external kill switch tripped between laps. | | `ERROR` | The runner or gate failed to execute; inspect the lap detail. |
Say `DONE` only when the status is exactly `DONE`. Never describe `HALT`, `PAUSE`, or `ERROR` as success. When halted, name which bound tripped; when paused, name the approval needed; when errored, quote the short detail.
Reporting workflow
1. Run or resume the loop. 2. Read back the ledger with `slm loop show <run_id>` (or `slm recall` on tag `loop:<name>`). 3. Report the exact terminal status, the lap count, and the gate's final verdict. Include the `run_id` so the run can be re-inspected later.
Gate discipline
- The gate verifies; the runner only proposes. They are separate.
- Prefer a typed, parseable gate (a test exit code, a schema validation, a
scanner report) over a vague check. A missing tool, an empty report, or a crashed scanner is **not** a clean pass — fail closed.
- Never use "an LLM decides it looks good" as the gate. That reintroduces the
exact failure mode bounded loops exist to remove.
---
Related skills
- `slm-status` — confirm SLM is healthy before relying on the ledger.
- `slm-recall` — query a loop's laps directly (`loop:<name>` tag).
- `slm-session` — session lifecycle around a longer loop run.
---
SuperLocalMemory v4.0.0 · Qualixar · AGPL-3.0-or-later
Read more
name: slm-loop description: Run gate-verified bounded loops with SuperLocalMemory as the durable ledger. Use when a task has a checkable acceptance condition (tests, schema, lint, reconciliation) and you must iterate until an INDEPENDENT gate passes — never stopping just because the agent believes it is done. `slm loop demo` runs a keyless convergence demo; `slm loop history` and `slm loop show <run_id>` inspect past runs whose every lap is persisted as queryable SLM memory (tag `loop:<name>`). Terminal statuses are DONE / HALT / PAUSE / KILLED / ERROR — report them exactly, never converting HALT/PAUSE/ERROR into success. when_to_use: "run a bounded loop, gate-verified task, iterate until tests pass, verify against an independent gate, don't trust the agent's own done claim, slm loop, convergence loop, loop until green, loop ledger, resume a loop" allowed-tools: Bash, slm_recall
slm-loop — Bounded, gate-verified agent loops
The one rule
A bounded loop is complete **only when an independent gate passes** — not when the agent claims it is finished. The agent's own "I'm done" signal is recorded for audit and is *never* used to terminate the loop. If you take one thing from this skill: **the gate is the authority.**
Use a bounded loop whenever the goal has a mechanical, checkable contract: a test suite, a JSON schema, a linter, a reconciliation rule, a citation checker, a security scan. When the goal is subjective, keep a human approval gate (see rungs below).
What SLM adds
Every lap is written to SuperLocalMemory as a durable, queryable memory (tagged `loop:<name>`, session `loop:<run_id>`). That makes a run:
- **auditable** — inspect the decision + gate verdict + budget for each lap;
- **resumable / historical** — a run's ledger survives across sessions;
- **discoverable** — visible via `slm recall`, the dashboard, and any
SLM-integrated tool, alongside everything else the agent remembers.
CLI
slm loop demo [--iterations N] [--json] # keyless convergence demo slm loop history [--name NAME] [--json] # list recorded runs slm loop show <run_id> [--json] # every lap of one run
`slm loop demo` proposes a fix, checks it against a deterministic gate that passes on lap 3, and records the run — a zero-setup way to see the control flow and confirm the SLM-backed ledger works end to end.
The bounds
A loop runs inside a safety envelope. Any bound tripping ends the run with `HALT` (never a success):
- **max_iterations** — a hard lap cap.
- **no_progress_window** — consecutive no-change laps before halting a spinning
agent.
- **token budget / wall-clock** — cumulative ceilings.
- **kill switch** — set `SLM_LOOP_KILL` to stop before the next lap.
- **approval rung** — L1 (report), L2 (assisted, pauses for approval), L3
(unattended). L2/L3 require approval before a passing gate is accepted as DONE unless approval is explicitly configured off.
Terminal statuses — report exactly
| Status | Meaning | |----------|---------| | `DONE` | The independent gate passed **and** approval was granted or not required. | | `HALT` | A bound tripped (iterations, no-progress, token, or wall-clock). | | `PAUSE` | The gate passed but required approval is not yet granted. | | `KILLED` | The external kill switch tripped between laps. | | `ERROR` | The runner or gate failed to execute; inspect the lap detail. |
Say `DONE` only when the status is exactly `DONE`. Never describe `HALT`, `PAUSE`, or `ERROR` as success. When halted, name which bound tripped; when paused, name the approval needed; when errored, quote the short detail.
Reporting workflow
1. Run or resume the loop. 2. Read back the ledger with `slm loop show <run_id>` (or `slm recall` on tag `loop:<name>`). 3. Report the exact terminal status, the lap count, and the gate's final verdict. Include the `run_id` so the run can be re-inspected later.
Gate discipline
- The gate verifies; the runner only proposes. They are separate.
- Prefer a typed, parseable gate (a test exit code, a schema validation, a
scanner report) over a vague check. A missing tool, an empty report, or a crashed scanner is **not** a clean pass — fail closed.
- Never use "an LLM decides it looks good" as the gate. That reintroduces the
exact failure mode bounded loops exist to remove.
---
Related skills
- `slm-status` — confirm SLM is healthy before relying on the ledger.
- `slm-recall` — query a loop's laps directly (`loop:<name>` tag).
- `slm-session` — session lifecycle around a longer loop run.
---
SuperLocalMemory v4.0.0 · Qualixar · AGPL-3.0-or-later
World's first local-only AI memory to break 74% retrieval and 60% zero-LLM on LoCoMo. No cloud, no APIs, no data leaves your machine. Additionally, mode C (LLM/Cloud) - 87.7% LoCoMo. Research-backed. arXiv: 2603.14588
Repo: qualixar/superlocalmemory
Other skills on superlocalmemory.
- /slm-cache
KV cache for repeated reads — call slm_cache_get(key) first; on a miss do the expensive operation then slm_cache_set(key, value, ttl_seconds) to store it; on a hit use the returned value directly; always fail-open (hit:false on any error, never raises); saves tokens when the
Open skill - /slm-compress
Compress large text, tool output, or transcripts to reduce context-window usage while keeping the full 1M window intact — call slm_compress(content, mode, reversible, ttl_seconds) to shrink content; if the result is lossy a ccr_id is returned so you can call slm_retrieve(ccr_id)
Open skill - /slm-governance
Enterprise compliance and governed workspace behavior for SuperLocalMemory. Covers role-based access (admin/member/viewer), retention policies, audit trail, GDPR data export/erase, and how agents must behave when operating under workspace governance. Requires power MCP profile
Open skill - /slm-graph
Index and query a codebase as a structural graph — build the code graph, trace blast radius of a change, find callers/callees/inheritors, semantic code search by meaning, assemble PR review context, and detect what changed since last index. Use when the user asks how code
Open skill - /slm-mesh
Cross-session peer coordination via the SLM mesh network. Lets multiple AI agent sessions on the same machine discover each other, send messages, share lightweight state, and lock files to avoid conflicts. Requires full, power, or mesh MCP profile. All 8 tools are MCP-only —
Open skill - /slm-profile
Workspace isolation and runtime profile switching for SuperLocalMemory. Each profile is a fully independent memory namespace — separate facts, code graphs, and tool sets. Use switch_profile (MCP, requires code/full/power profile) to change the active workspace without
Open skill

