agentleFS
0xUrsanomics0xUrsanomics/utopia-os/skills/open-loops/SKILL.md

open-loops

Skill2 starsChanged 24 days agoMITView on GitHub

Find email threads where someone is waiting on you (24h+) or you are waiting on someone (72h+). Read-only, deterministic rules, zero LLM judging.

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Search with newer_than:14d (in:inbox OR in:sent) -category:promotions -category:social -category:updates -category:forums, max 100 results.

    line 13
  2. Distinctive:

    Keep the FIRST message id per threadId (that is the thread's latest message).

    line 14
  3. Very specific:

    Write {"me": ["you@example.com"], "messages": [...metadata objects...]} to a scratch file.

    line 17

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Open loops

Pattern from gbrain docs/guides/open-loops.md. Run it inside a morning briefing, or on demand. Read-only: it never drafts, sends or labels anything.

Fetch (in-session, through your mail MCP's search and get tools)

  1. Search with newer_than:14d (in:inbox OR in:sent) -category:promotions -category:social -category:updates -category:forums, max 100 results. Results come newest first.
  2. Keep the FIRST message id per threadId (that is the thread's latest message). Cap at 30 threads.
  3. Get each kept id as metadata (headers + snippet), in one parallel batch.
  4. For any thread whose latest message is yours, also fetch the previous message id from step 1, so a nudge does not reset the clock.
  5. Write {"me": ["you@example.com"], "messages": [...metadata objects...]} to a scratch file. Or set OPERATOR_EMAILS and leave me out.

Judge

python3 -I scripts/memory/open_loops.py <input.json> (add --json for machine output).

  • Exit 2 with OPEN_LOOPS_EMPTY_INPUT means the fetch returned nothing. That is a FAIL, never "no open loops". Re-fetch.
  • Self-check: python3 -I scripts/memory/open_loops.py --selftest (14 cases).

Rules (all in the script)

  • Waiting on you: last real message is theirs, you are in To:, it asks or requests something, 24h+ old.
  • You waiting: last real message is yours, it has a "?" outside any URL, 72h+ old.
  • Acks ("thanks", "got it", "noted") never close a loop. Same-side nudges keep the original clock.
  • Ignored: automated senders, calendar invites, promo/social/update/forum categories, threads older than 14 days, and senders in memory/state/open-loops-ignore.json ({"senders": ["domain.example"]}).
  • Writing in another language? Add its ack and request phrases to ACK and REQUEST in the script.

What a result does NOT prove

It is judged on the ~200-char snippet, so a request deep in a long mail can be missed. Only the 30 most recent threads are checked. Follow-ups that moved to a chat app are invisible: a thread that moved there can show as open.

Report

List "waiting on you" first, oldest first, max 5 lines, then "you're waiting on them". When you dismiss a sender as never-a-loop, add the domain to the ignore file (safe to do without asking: it only narrows output).

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.