bymercuriusdream· 1 skill
Perpetual autonomous work loop for Claude Code — no end condition, no memory regression, no context overfill. Maintains a persistent ledger across all sessions.
$npx -y skills add mercuriusdream/agent-estate --skill agent-estateInstalls into the current project.
Run `npx skills use "https://github.com/mercuriusdream/agent-estate" --skill "mercuriusdream/agent-estate"` and follow the generated skill instructions now. Read its complete output, redirecting it to a temporary file first if necessary. Resolve relative paths from the supporting-files directory it provides.
Use the skills in "https://github.com/mercuriusdream/agent-estate" that are relevant to the current task. Run `npx skills add "https://github.com/mercuriusdream/agent-estate"` and select the relevant skills, then follow their instructions.
| 1 | # Agent-Estate |
| 2 | |
| 3 | <img width="2200" height="1440" alt="AGENT_ESTATE" src="https://github.com/user-attachments/assets/fb464d2e-a064-41ac-82c6-763ef9e8b9d0" /> |
| 4 | |
| 5 | > *IT'S THE FREE REAL AGENT ESTATE* |
| 6 | |
| 7 | Autonomous work loop for Claude Code. No end condition. Persistent memory. Zero config. |
| 8 | |
| 9 | Used it to build a [from-scratch C++ web browser](https://github.com/MercuriusDream/Vibrowser) — 287 autonomous cycles, 100+ hours, 3,374 tests, zero failures, <10 manual steerings. |
| 10 | |
| 11 | ## Why Agent Estate? |
| 12 | |
| 13 | - **Native hooks, not a wrapper** — uses Claude Code's Stop event to intercept exits. No bash wrapper, no tmux, no external process manager |
| 14 | - **Zero config** — no PRD files, no task definitions, no project setup. Just `/agent-estate:start` |
| 15 | - **Persistent memory** — ledger tracks everything across sessions. "Tell The Next Claude" handoff for cross-context memory. Context doesn't reset between cycles |
| 16 | - **Auto-stop when done** — `--done` flag lets Claude stop itself when the task is complete. Or run perpetual (default) |
| 17 | - **Rate limit resilience** — detects 429/529 errors, waits, retries. Never crashes, never loses state |
| 18 | - **~400 lines total** — the entire plugin. 3 directories, 7 files. Nothing to configure, nothing to break |
| 19 | |
| 20 | ## Install |
| 21 | |
| 22 | ### Claude Code Plugin (recommended) |
| 23 | |
| 24 | ```bash |
| 25 | /plugin marketplace add MercuriusDream/agent-estate |
| 26 | /plugin install agent-estate@MercuriusDream |
| 27 | ``` |
| 28 | |
| 29 | ### npx ([skills.sh](https://skills.sh)) |
| 30 | |
| 31 | ```bash |
| 32 | npx skills add MercuriusDream/agent-estate |
| 33 | ``` |
| 34 | |
| 35 | ### Manual |
| 36 | |
| 37 | ```bash |
| 38 | git clone https://github.com/MercuriusDream/agent-estate.git |
| 39 | mkdir -p ~/.claude/plugins/local |
| 40 | ln -s "$(pwd)/agent-estate" ~/.claude/plugins/local/agent-estate |
| 41 | chmod +x agent-estate/scripts/setup-estate.sh |
| 42 | chmod +x agent-estate/hooks/stop-hook.sh |
| 43 | ``` |
| 44 | |
| 45 | Requires `jq`: |
| 46 | |
| 47 | ```bash |
| 48 | brew install jq # macOS |
| 49 | sudo apt install jq # debian/ubuntu |
| 50 | ``` |
| 51 | |
| 52 | ## Usage |
| 53 | |
| 54 | ```bash |
| 55 | /agent-estate:start # full autonomy, perpetual |
| 56 | /agent-estate:start build a web server with tests # guided prompt, perpetual |
| 57 | /agent-estate:start --done build a web server with tests # auto-stops when done |
| 58 | /agent-estate:status # check cycle, mode, stats |
| 59 | /agent-estate:stop # manual stop |
| 60 | ``` |
| 61 | |
| 62 | ## How It Works |
| 63 | |
| 64 | ``` |
| 65 | start → read ledger → pick task → do the work → update ledger → try to exit |
| 66 | ↑ stop hook intercepts → blocks exit → re-injects prompt ↲ |
| 67 | ``` |
| 68 | |
| 69 | ### The Hook |
| 70 | |
| 71 | `hooks/stop-hook.sh` runs on every Claude Stop event: |
| 72 | |
| 73 | 1. No state file? → exit normally |
| 74 | 2. `done: true` in frontmatter? → remove state file, exit (auto-stop) |
| 75 | 3. Rate limited (429)? → wait 60s, retry |
| 76 | 4. API overloaded (529)? → wait 30s, retry |
| 77 | 5. Otherwise → increment cycle, re-inject prompt, block exit |
| 78 | |
| 79 | ### The Ledger |
| 80 | |
| 81 | `.claude/agent-estate.md` — the persistent brain. Every Claude reads it, every Claude updates it. |
| 82 | |
| 83 | | Section | Purpose | |
| 84 | |---------|---------| |
| 85 | | **Current Status** | Phase, focus, momentum, cycle count | |
| 86 | | **Session Log** | What happened each session | |
| 87 | | **Worked Things** | Table of everything done with files touched | |
| 88 | | **Future Works** | Prioritized task queue | |
| 89 | | **Statistics** | Cycles, tests, bugs fixed, features shipped | |
| 90 | | **Tell The Next Claude** | Sacred handoff message — letter to yourself with amnesia | |
| 91 | |
| 92 | ### Work Priority |
| 93 | |
| 94 | Built into the protocol, in order: |
| 95 | |
| 96 | 1. **Broken** — failing tests, bugs, errors |
| 97 | 2. **Incomplete** — half-finished features, TODOs, FIXMEs |
| 98 | 3. **Missing** — no tests, no error handling |
| 99 | 4. **Ugly** — code smells, dead code |
| 100 | 5. **Slow** — performance issues |
| 101 | 6. **New** — features that improve the project |
| 102 | 7. **Creative** — surprise the user |
| 103 | |
| 104 | ## Battle-Tested |
| 105 | |
| 106 | Built [Vibrowser](https://github.com/MercuriusDream/Vibrowser) — a from-scratch C++ browser engine: |
| 107 | |
| 108 | | | | |
| 109 | |---|---| |
| 110 | | Autonomous cycles | 287 across 123 sessions | |
| 111 | | Runtime | 100+ hours, <10 manual steerings | |
| 112 | | Tests | 3,374 — zero failures | |
| 113 | | Features | 2,440+ shipped, 124 bugs fixed | |
| 114 | | Lines | 168,360+ | |
| 115 | | Engines | CSS (370+ properties), JS (QuickJS), CORS/CSP/TLS | |
| 116 | | Result | Renders real websites off the live internet | |
| 117 | | Fun fact | [claude.ai 403'd the browser Claude built](https://x.com/Mercuriusdream/status/2026732290630672682) | |
| 118 | |
| 119 | ## Files |
| 120 | |
| 121 | ``` |
| 122 | agent-estate/ |
| 123 | ├── .claude-plugin/plugin.json # plugin manifest |
| 124 | ├── commands/ |
| 125 | │ ├── start.md # /agent-estate:start |
| 126 | │ ├── stop.md # /agent-estate:stop |
| 127 | │ └── status.md # /agent-estate:status |
| 128 | ├── hooks/ |
| 129 | │ ├── hooks.json # registers stop hook |
| 130 | │ └── stop-hook.sh # core engine |
| 131 | ├── scripts/ |
| 132 | │ └── setup-estate.sh # creates state file |
| 133 | ├── SKILL.md # skill definition |
| 134 | ├── AGENTS.md # agent instructions |
| 135 | └── README.md |
| 136 | ``` |
| 137 | |
| 138 | ## Tips |
| 139 | |
| 140 | - **Long sessions** — Claude Max recommended for hours-long autonomous runs |
| 141 | - **Guiding prompts** — focus without being restrictive |
| 142 | - **Ledger size** — if it gets large (300KB+), Claude will |