Skip to content

LeoYeAI/agent-master-skills / skills/afterself

afterself

Verified

Digital legacy agent — dead man's switch, final message executor, and ghost mode responder that preserves your digital presence. Use when the user wants to set up a dead man's switch, manage their digital will, or enable ghost mode.

FileKindSize
ETHICS.mdmarkdown5.9 KB
HEARTBEAT.mdmarkdown2.4 KB
SKILL.mdskill md16.0 KB
_meta.jsonconfig273 B
references/action-schema.mdmarkdown5.3 KB
references/escalation-protocol.mdmarkdown1.7 KB
references/ghost-persona-prompt.mdmarkdown3.6 KB
scripts/mortality.jsscript9.4 KB
scripts/persona.jsscript13.6 KB
scripts/state.jsscript18.5 KB
scripts/types.jsscript167 B
scripts/vault.jsscript11.2 KB

HEARTBEAT.md

View on GitHub
# Afterself Heartbeat Check

Run the state check and act accordingly.

## Step 1: Load state

```bash
node {baseDir}/scripts/state.js status
```

Read the `switchState` field from the response.

## Step 2: Route by state

### If `disabled` or `completed`
- Nothing to do. **HEARTBEAT_OK**

### If `triggered`
- Executor should be running. Check `executorProgress` for stuck actions. If `currentAction` hasn't changed in multiple heartbeats, log a warning. **HEARTBEAT_OK**

### If `armed`
- Run: `node {baseDir}/scripts/state.js is-overdue`
- If `overdue: false` → **HEARTBEAT_OK**
- If `overdue: true` → Send a check-in ping to the owner on all configured channels. Then run: `node {baseDir}/scripts/state.js record-ping`

### If `warning`
- Run: `node {baseDir}/scripts/state.js is-warning-expired`
- If `expired: false` → Send another reminder to the owner. **HEARTBEAT_OK**
- If `expired: true` → Begin escalation:
  1. Run `node {baseDir}/scripts/state.js begin-escalation`
  2. Load contacts from `node {baseDir}/scripts/state.js config get heartbeat.escalationContacts`
  3. Send each contact the escalation message from `{baseDir}/references/escalation-protocol.md`
  4. Log: `node {baseDir}/scripts/state.js audit escalation "contacts_notified"`

### If `escalating`
- Run: `node {baseDir}/scripts/state.js escalation-status`
- Check the `decision` field:
  - `"stand_down"` → Run `node {baseDir}/scripts/state.js stand-down`. Notify owner their contacts confirmed they're okay.
  - `"trigger"` → Run `node {baseDir}/scripts/state.js trigger`. Begin executor (see SKILL.md Executor section).
  - `"waiting"` → Check if escalation timeout has expired. If timeout exceeded with no responses → run `node {baseDir}/scripts/state.js trigger`. Otherwise → **HEARTBEAT_OK**, wait for responses.

## Step 3: Ghost check

If ghost mode is active (`ghostState: "active"` or `"fading"`):
- Run: `node {baseDir}/scripts/state.js ghost-decay-check`
- If `shouldRespond: false` and `probability: 0` → Ghost has fully faded. Update: `node {baseDir}/scripts/state.js update ghostState "retired"`. Log: `node {baseDir}/scripts/state.js audit ghost "retired"`

## Step 4: Mortality pool check

If `mortalityPool.enabled` is true and state is `armed`:
- Run: `node {baseDir}/scripts/mortality.js check-balance`
- If balance changed since last check, the state is updated automatically by the script
- (Nudging the user to buy tokens happens on owner check-in, not during heartbeat)
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall