Skip to main content
ClaudeWave
Slash Command1k repo starsupdated 5d ago

loop

Show OpenLoomi Loop dashboard state (pending decisions, connectors, last tick) and force-refresh connector health — thin doorway into the openloomi-loop sub-skill

Install in Claude Code
Copy
mkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/melandlabs/openloomi/HEAD/plugins/claude/commands/loop.md -o ~/.claude/commands/loop.md
Then start a new Claude Code session; the slash command loads automatically.

loop.md

# /openloomi:loop

Thin doorway into the [`openloomi-loop`](../skills/openloomi-loop/SKILL.md)
sub-skill. With no arguments it prints the dashboard snapshot from
`GET /api/loop/state`. To force-refresh the connector snapshot (which the
dashboard reads but caches), say **"loop refresh"**, **"refresh
connectors"**, **"force refresh"**, **"check connections"**, or pass
`refresh` as the slash argument (`/openloomi:loop refresh`). For
everything else (run a tick, schedule a decision, register a custom type /
channel / classifier rule), say "loop tick", "loop schedule", "register
loop type", "add loop rule" — the sub-skill's frontmatter triggers on
those phrases and walks Claude through the full API.

Base URL: `http://localhost:3414` (fallback `http://localhost:3515`).
The skill doc spells out which port is which.

## Steps

1. Read the bearer token (base64-encoded JWT stored at
   `~/.openloomi/token`) and decode it:

   ```bash
   TOKEN=$(cat ~/.openloomi/token | base64 -d)
   ```

2. Decide the mode:
   - **Refresh mode** (user said "refresh connectors" / "force refresh"
     / "check connections" / passed `/openloomi:loop refresh`) → go to
     the [Refresh connectors](#refresh-connectors) section below, not
     this one.
   - **Default dashboard mode** (no args, or "loop dashboard" / "loop
     state") → continue.

3. Fetch the dashboard:

   ```bash
   curl -sS "$BASE/api/loop/state" -H "Authorization: Bearer $TOKEN" | jq .
   ```

4. Print the JSON to the user. Highlight:
   - `pending` — number of decisions waiting for Run / Dry / Dismiss
   - `connectors` — integration health (one entry per signal channel;
     **note**: this is the cached snapshot — see Refresh below)
   - `lastTickAt` — when the last signal pull ran
   - `prefs` — current interval / brief time / wrap time / timezone

5. If `pending > 0`, suggest the natural-language follow-up:

   > Say **"loop inbox"** to list them, or **"loop tick"** to pull new
   > signals and classify them now.

6. If any connector shows `connected: false` with a `lastError` like
   `"no composio surface reachable"` and the user actually has those
   connectors configured through Composio (check with
   `composio connections list`), suggest:

   > The dashboard is reading a stale snapshot. Say **"loop refresh"**
   > to force-refresh connector probes — that bypasses the cache and
   > re-probes every channel through Composio.

---

## Refresh connectors

The Loop dashboard reads a cached connector snapshot
(`~/.openloomi/loop/connectors.json`) that's refreshed on a slow TTL and
re-probed opportunistically by the agent. When the cache is wrong
(common: every connector reports `connected: false` with `lastError: "no
composio surface reachable"` even though `composio connections list`
returns active toolkits), `GET /api/loop/connectors?refresh=1` forces a
fresh probe now and persists the result.

This is **read-only**: nothing is created, scheduled, sent, or deleted.
The probe runs server-side; expect 1–10 seconds per connector.

```bash
curl -sS "$BASE/api/loop/connectors?refresh=1" \
  -H "Authorization: Bearer $TOKEN" | jq .
```

The response shape is `{items: ConnectorHealth[], lastProbeError?: string}`.
Each `ConnectorHealth` has:

| Field       | Meaning                                                            |
| ----------- | ------------------------------------------------------------------ |
| `id`        | stable connector id (e.g. `gmail`, `slack`, `linear`)              |
| `label`     | human-readable name                                                |
| `connected` | `true` iff the most recent probe succeeded                         |
| `lastError` | string when probe failed (`null`/`undefined` on success)           |
| `fetchedAt` | ISO timestamp of the **most recent** probe (proves refresh worked) |

After the response, do the following:

1. **Confirm the refresh actually fired.** Print `fetchedAt` for every
   connector — they should all share the same timestamp from "just now"
   (within the last ~30s). If the timestamps are older, the cache wasn't
   invalidated and the call hit the cache. Re-check the URL: it must end
   in `?refresh=1`, not `?refresh=true`.
2. **Summarize the result.** One line per connector: `gmail ✅ connected`,
   `slack ❌ lastError=...`. Group `connected: true` first; failures last.
3. **If anything is still red**, surface the `lastError` verbatim. Do
   not invent reasons — quote the string the API returned.
4. **The refreshed snapshot is the new cache.** Subsequent
   `/api/loop/state` calls will read it; no further action needed.

### Refresh failure modes

| HTTP / network                               | What to surface                                                                                                                                                                  |
| -------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Connection refused on `:3414` and `:3515`    | OpenLoomi isn't running. Point the user at `/openloomi:status` to confirm, then `/openloomi:setup` if needed.                                                                    |
| `401 Unauthorized`                           | Token is stale or missing. Re-run `/openloomi:setup` to mint a fresh guest bearer.                                                                                               |
| `404` on `/api/loop/connectors`              | Runtime is older than Loop. Tell the user to update OpenLoomi Desktop — Loop ships in the desktop bundle.                                                                        |
| Probe runs but every connector still `false` | Real probe failure. Cross-check with `composio connections list` (or whichever CLI the connector expects); if those show healthy toolkits but Loop still fails, surface the gap.
agent-browserSkill

Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction.

cua-driverSkill

Drive a native macOS app via the cua-driver CLI (default) or MCP server — snapshot its AX tree, click/type/scroll by element_index, verify via re-snapshot. Use when the user asks you to operate, drive, automate, or perform a GUI task in a real macOS application on the host (e.g. "open a file in TextEdit", "navigate to /Applications in Finder", "click the Save button in Numbers").

docxSkill

Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files). Triggers include: any mention of "Word doc", "word document", ".docx", or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a "report", "memo", "letter", "template", or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation.

frontend-designSkill

Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.

openloomi-apiSkill

openloomi HTTP API reference (local-first, served from the OpenLoomi Desktop app at http://localhost:3414). Use when working with openloomi backend routes — auth, AI, files, integrations, RAG, memory, Loop, pet, workspace, platform callbacks. Triggers: API endpoints, backend routes, /api/*, local API, port 3414, integrations REST, OAuth start, RAG search, loop state, memory search, pet state, audit logs

openloomi-connectorsSkill

openloomi Connectors tools - manage the native 7 messaging integrations and pair with the composio skill for the 1000+ apps OAuth layer (Slack, Discord, X, Gmail, Outlook, Google Calendar/Drive/Docs, GitHub, Notion, Linear, HubSpot, LinkedIn, Jira, Asana). Triggers: connect platform, integration status, list accounts, disconnect, list-accounts, status, connect, send-reply, native vs composio, 1000+ apps, list connections.

openloomi-feature-guideSkill

Use this when users ask about openloomi features, capabilities, or how to use it. Examples: 'openloomi 怎么用', '你能做什么', 'What can you do?', 'How does openloomi work?', 'Tell me about openloomi features', 'What platforms does openloomi support?', 'How do I use scheduled tasks?', 'What is Loop?', 'How does the attention agent work?', 'What is a Decision Card?', 'How do connectors work?', 'How do I extend Loop with custom types?', 'What is a classifier rule?', 'How do I plug openloomi into Claude Code / Codex?'

openloomi-memorySkill

openloomi Memory tools - search and manage the holistic context (people, projects, decisions, knowledge base, chat insights). Triggers: memory search, knowledge base, search documents, list insights, who is John, what did we decide about X, tiered memory, knowledge graph, people/projects/decisions, search-all, conversation memory