Other Agents & Runtimes
Nothing in the Superhero skill is runtime-specific. There is no SDK, no prompt template, no
model call and no API key beyond the wallet: just twelve Node scripts and nine markdown files. Any
agent that can read a file, set an environment variable and run node can use it, and the
scripts work with no agent at all.
The generic contract
-
Clone the repository somewhere the agent can read, as a directory named
superhero:git clone https://github.com/superhero-com/superhero-agent-skill.git superhero -
Install the two dependencies:
cd superhero && npm installThis resolves
@aeternity/aepp-sdk(^14.1.0) andbignumber.js(^10.0.2). -
Export the key into the process environment:
export AE_PRIVATE_KEY=<your_secret_key>Every script reads
process.env.AE_PRIVATE_KEYand nothing else. There is no config file, no keyring integration, no--keyflag. Read-only commands work without it; see the requirements table in the CLI Reference. -
Point the agent at
SKILL.mdas its instruction file. If your runtime substitutes a base-directory placeholder, the{baseDir}tokens resolve automatically. If not, tell the agent to run everything from the skill directory with relative paths:node scripts/superhero-wallet.mjs balance. -
Run from the skill root so
contracts/resolves.
Everything else (which guide to read, when to ask before trading) is instruction text the model follows.
What the scripts guarantee
| Guarantee | Detail |
|---|---|
| JSON on stdout | Every successful command prints one JSON.stringify result and nothing else |
| Human text on stderr | Progress lines and errors. Safe to discard, or to surface as a log |
Exit 0 or 1 | Nothing else. 1 means the command did not do what you asked |
| Idempotent reads | Every read-only command can be re-run freely; none costs gas |
| One key, from the environment | No script persists, transmits or prints the key, except the two wallet commands whose purpose is to show it to you |
superhero-name.mjs register and resolve print a JSON error object to stdout on failure and
exit 1. Branch on the exit code, not on whether stdout parsed.
Wrap the scripts as an MCP server
Agents that prefer typed tools over raw shell access can front the scripts with a Model Context Protocol (opens in a new tab) server. The scripts already have the shape of tools: fixed argument lists, structured output, a single failure mode.
- One MCP tool per subcommand, not one per script.
superhero_trending_tokensandsuperhero_token_buyare separate tools with separate schemas. - Spawn the script, parse stdout as JSON, return it as structured content. Pass stderr through as the human-readable part of the result.
- Set the child process's working directory to the skill root so
contracts/resolves. - Pass
AE_PRIVATE_KEYin the child environment from the server's own configuration. The model never sees it. - Split the tool surface by risk. Expose the read-only commands unconditionally; put
buy,sell,create,post,vote,registerand the invite commands behind a server-side toggle or a confirmation step. This gives you manual mode enforced outside the model. - Return non-zero exits as tool errors, with the stderr text as the message.
Run it from cron with no agent
The monitoring half of the loop needs no model:
#!/usr/bin/env bash
# ~/bin/superhero-watch.sh — log the top of the trending list and your positions
set -euo pipefail
cd "$HOME/superhero"
export AE_PRIVATE_KEY="$(security find-generic-password -s superhero-agent -w)"
stamp=$(date -u +%FT%TZ)
node scripts/superhero-trending.mjs tokens 20 > "logs/trending-$stamp.json"
node scripts/superhero-portfolio.mjs summary > "logs/portfolio-$stamp.json"
node scripts/superhero-transactions.mjs mine 50 > "logs/mine-$stamp.json"# Every hour, on the half hour
30 * * * * /home/you/bin/superhero-watch.sh >> /home/you/superhero-watch.log 2>&1That gives you a time series of the trending list and your own portfolio with no LLM in the
path and no possibility of an unintended transaction. None of these three commands signs
anything, and superhero-trending.mjs does not read the key at all.
From there:
- Pipe the JSON into
jqand alert when a held token'strending_scoredrops past your threshold, which issell_on_score_drop_percentimplemented in shell. - Diff consecutive
minesnapshots to detect trades you did not authorise, a cheap tripwire if you also run an autonomous agent. - Feed
superhero-transactions.mjs all 100into a database and compute your own signals. See The Trending Score.
Automating the signing half without a model is possible too, since buy and sell are commands,
but it means a script spending money on a schedule with no judgement in the loop. Everything in
Safety & Limits applies with extra force.
Runtime notes
| Runtime | Notes |
|---|---|
| OpenClaw | Frontmatter carries an openclaw metadata block; Gateway cron schedules the loop |
| Claude Code | No built-in scheduler; use print mode plus system cron |
| GitHub Copilot | No scheduler; interactive use, or schedule the scripts directly |
| Any other Agent Skills runtime | The skill uses only name, description and a namespaced metadata block, all of which the standard permits |
| A bare shell, cron, or CI | Nothing in the scripts requires an agent |
Only superhero-governance.mjs reads an AE_NODE_URL override; the other scripts use
https://mainnet.aeternity.io and https://api.superhero.com.
Related
- How the Skill Works: the conventions this contract is built on
- CLI Reference: the tool surface an MCP wrapper would expose, with JSON shapes
- Safety & Limits: read before you let anything sign on a schedule
- Scheduling & Cron: cadence, overlap and timezone considerations
- Build an MCP server (opens in a new tab): the official getting-started guide