mcpbeat Sign in

Agent Estate Skill for Claude

Perpetual autonomous work loop for Claude Code — no end condition, no memory regression, no context overfill. Maintains a persistent ledger across all sessions.

2k tokens
context cost
the whole folder, loaded on every use
2
files
instructions only
0
copies elsewhere
how many repositories repackaged it
532
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/majiayu000/claude-skill-registry --skill agent-estate

What comes with it

729 bytes besides the instruction
metadata.json

The instruction itself

14 sections, as written by the author

Agent Estate

Perpetual autonomous work loop plugin for Claude Code. Turns Claude into an agent that works cycle after cycle, maintaining a persistent ledger across all sessions, never stopping until explicitly told to.

Overview

Agent Estate creates an infinite work loop by intercepting Claude's stop events via a shell hook. Each time Claude tries to exit, the hook blocks the exit, increments the cycle counter, and re-injects the prompt — creating a true perpetual agent.

Architecture

agent-estate/
├── .claude-plugin/plugin.json   # Plugin manifest (name, version, author)
├── commands/
│   ├── start.md                 # /agent-estate:start — activates the loop
│   ├── stop.md                  # /agent-estate:stop — removes state file to allow exit
│   └── status.md                # /agent-estate:status — shows cycle count, ledger summary
├── hooks/
│   ├── hooks.json               # Registers stop-hook.sh on the "Stop" event
│   └── stop-hook.sh             # Core engine: blocks exit, increments cycle, re-injects prompt
├── scripts/
│   └── setup-estate.sh          # Creates .claude/agent-estate.local.md state file
├── LICENSE
└── README.md

Key Components

Stop Hook (hooks/stop-hook.sh)

The core engine. Runs on every Claude "Stop" event:

  • Checks if .claude/agent-estate.local.md exists (is the loop active?)
  • If not active: exits normally (exit 0)
  • If done (done: true in frontmatter): removes state file, exits normally (auto-stop)
  • If active and not done:
  • Detects rate limits (429) → waits 60s
  • Detects API overload (529) → waits 30s
  • Increments cycle counter in the state file
  • Outputs a JSON {"decision": "block", "reason": "..."} to prevent exit
  • Re-injects the prompt for the next cycle

Setup Script (scripts/setup-estate.sh)

Creates the state file at .claude/agent-estate.local.md with YAML frontmatter (active, cycle, started_at, user_prompt) and the full cycle protocol instructions. If already active, outputs current state and continues.

Ledger (.claude/agent-estate.md)

The persistent brain — every Claude session reads and updates it. Contains:

  • Current Status — phase, focus, momentum, cycle count
  • Session Log — what happened each session
  • Worked Things — table of everything done with files touched
  • Future Works — prioritized task queue
  • More Works — ideas, discoveries, nice-to-haves
  • Statistics — cycles, tests, bugs fixed, features shipped
  • Tell The Next Claude — sacred handoff message for cross-context memory

State File (.claude/agent-estate.local.md)

Ephemeral file that signals an active loop. Contains the cycle counter and preserved user prompt. Removing this file (via /agent-estate:stop) is the only way to end the loop.

Commands

| Command | Description |

|---------|-------------|

| /agent-estate:start | Activate the loop in perpetual mode (no end condition) |

| /agent-estate:start <prompt> | Start perpetual mode with a specific task focus |

| /agent-estate:start --done <prompt> | Start in done mode — auto-stops when task is complete |

| /agent-estate:status | Show current cycle, mode, stats, and the latest handoff message |

| /agent-estate:stop | Manually remove the state file to stop the loop |

Work Priority Protocol

Built into the agent instructions, in order:

  • Broken things — failing tests, bugs, errors
  • Incomplete things — half-finished features, TODOs, FIXMEs
  • Missing things — no tests, no error handling
  • Ugly things — code smells, dead code
  • Slow things — performance issues
  • New things — features that improve the project
  • Creative things — surprise the user

Cycle Protocol

Each cycle follows this pattern:

  • Read .claude/agent-estate.md (the ledger)
  • Decide what to work on next
  • Do the work — write code, fix bugs, add features, run tests
  • Update the ledger with what was done, discovered, and planned
  • Update statistics, session log, and "Tell The Next Claude" handoff
  • Immediately start the next cycle (never stop)

Prerequisites

  • jq — required for JSON output in the stop hook
  • Claude Code with plugin support

Installation

git clone https://github.com/MercuriusDream/agent-estate.git
mkdir -p ~/.claude/plugins/local
ln -s "$(pwd)/agent-estate" ~/.claude/plugins/local/agent-estate
chmod +x agent-estate/scripts/setup-estate.sh
chmod +x agent-estate/hooks/stop-hook.sh

Tips

  • Long sessions: Claude Max recommended for extended autonomous runs
  • Guiding prompts: Use /agent-estate:start <prompt> for focused work without being restrictive
  • Ledger size: If it exceeds ~300KB, Claude will auto-summarize older cycles
  • Resuming: The ledger persists after stop. Start again and Claude picks up from the handoff
  • Full autonomy: No prompt = Claude explores and decides what's most valuable

Other skills for the same job

different authors, same section of the catalogue
Skill Creator
by anthropics
vendor ×10

Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.

56k tokens scripts
Skill Creator
by vercel-labs
vendor ×10

Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.

12k tokens scripts
Skill Creator
by JayZeeDesign
×9

Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.

10k tokens scripts
Template Skill
by JayZeeDesign
×7

Replace with description of the skill and when Claude should use it.

35 tokens
Dispatching Parallel Agents
by ZhanlinCui
×5

Use when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies

2k tokens
Skill Development
by anthropics
vendor ×4

This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill content", or needs guidance on skill structure, progressive disclosure, or skill development best practices for Claude Code plugins.

9k tokens
Find Skills
by sanity-io
vendor ×4

Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.

1k tokens
Writing Skills
by ZhanlinCui
×4

Use when creating new skills, editing existing skills, or verifying skills work before deployment

26k tokens scripts

How to use it

Copy the folder

Take majiayu000/agent-estate from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.