LeoYeAI/agent-master-skills / skills/afterself
afterself
VerifiedDigital 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.
| File | Kind | Size |
|---|---|---|
| ETHICS.md | markdown | 5.9 KB |
| HEARTBEAT.md | markdown | 2.4 KB |
| SKILL.md | skill md | 16.0 KB |
| _meta.json | config | 273 B |
| references/action-schema.md | markdown | 5.3 KB |
| references/escalation-protocol.md | markdown | 1.7 KB |
| references/ghost-persona-prompt.md | markdown | 3.6 KB |
| scripts/mortality.js | script | 9.4 KB |
| scripts/persona.js | script | 13.6 KB |
| scripts/state.js | script | 18.5 KB |
| scripts/types.js | script | 167 B |
| scripts/vault.js | script | 11.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)
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| 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: 472k | Updated | Claude CodeCodex | Verified | Install |
| 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: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| 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 available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |