LeoYeAI/agent-master-skills / skills/auto-respawn
auto-respawn
VerifiedYour agent always comes back. Anchor identity and memory on-chain so any new instance can resurrect from just an address — no local state, no single point of failure. Permanent identity and recovery on the Autonomys Network.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 16.4 KB |
| _meta.json | config | 281 B |
| auto-respawn.ts | script | 14.4 KB |
| eslint.config.js | script | 468 B |
| lib/address.ts | script | 2.2 KB |
| lib/balance.ts | script | 1.1 KB |
| lib/cli.ts | script | 1.6 KB |
| lib/evm-balance.ts | script | 925 B |
| lib/evm-transfer.ts | script | 2.4 KB |
| lib/evm.ts | script | 3.4 KB |
| lib/memory-chain.ts | script | 3.5 KB |
| lib/network.ts | script | 1.4 KB |
| lib/remark.ts | script | 1.3 KB |
| lib/transfer.ts | script | 1.7 KB |
| lib/wallet.ts | script | 8.8 KB |
| lib/xdm.ts | script | 3.3 KB |
| package.json | manifest | 647 B |
| references/auto-respawn-commands.md | markdown | 9.6 KB |
| references/autonomys-network.md | markdown | 6.2 KB |
| setup.shexecutable | script | 2.2 KB |
| tests/address.test.ts | script | 3.4 KB |
| tests/balance.test.ts | script | 4.3 KB |
| tests/cli.test.ts | script | 3.5 KB |
| tests/evm-balance.test.ts | script | 3.1 KB |
| tests/evm-transfer.test.ts | script | 5.2 KB |
| tests/evm.test.ts | script | 2.4 KB |
| tests/network.test.ts | script | 1.8 KB |
| tests/wallet-roundtrip.test.ts | script | 6.3 KB |
| tests/wallet.test.ts | script | 1.1 KB |
| tsconfig.json | config | 366 B |
lib/address.ts
View on GitHubimport { address as encodeAddress, decode } from '@autonomys/auto-utils'
import { ethers } from 'ethers'
/**
* Non-throwing check: is this string a valid consensus-layer address?
*/
export function isConsensusAddress(input: string): boolean {
if (!input.startsWith('su') && !input.startsWith('5')) return false
try {
decode(input)
return true
} catch {
return false
}
}
/**
* Non-throwing check: is this string a valid EVM address?
* Requires the 0x prefix to stay consistent with normalizeEvmAddress.
*/
export function isEvmAddress(input: string): boolean {
return input.startsWith('0x') && ethers.isAddress(input)
}
/**
* Validate and normalise a consensus-layer address.
*
* Accepted formats:
* - su... (Autonomys SS58 prefix 6094) — passed through
* - 5... (Substrate generic prefix 42) — converted to su...
*
* Anything else is rejected with a clear error message.
*/
export function normalizeAddress(input: string): string {
// Quick prefix check before we attempt decoding
if (!input.startsWith('su') && !input.startsWith('5')) {
throw new Error(
`Invalid address prefix: "${input.slice(0, 6)}…". ` +
'Expected an Autonomys address (su…) or a Substrate address (5…).',
)
}
// Attempt to decode → re-encode at Autonomys prefix 6094
let publicKey: Uint8Array
try {
publicKey = decode(input)
} catch {
throw new Error(
`Invalid address: "${input}". Could not decode as a valid SS58 address.`,
)
}
// Re-encode with Autonomys prefix (6094 is the default in auto-utils)
const normalized = encodeAddress(publicKey)
return normalized
}
/**
* Validate and normalise an EVM address.
*
* Accepted format: 0x... (42-character hex string)
* Returns the checksummed EVM address.
*/
export function normalizeEvmAddress(input: string): string {
if (!input.startsWith('0x')) {
throw new Error(
`Invalid EVM address: "${input.slice(0, 10)}…". Expected an address starting with 0x.`,
)
}
try {
return ethers.getAddress(input) // Returns checksummed address
} catch {
throw new Error(
`Invalid EVM address: "${input}". Not a valid Ethereum address.`,
)
}
}
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 | Unverified | 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 |