AI Agents
Other Agents & Runtimes

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

  1. 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
  2. Install the two dependencies:

    cd superhero && npm install

    This resolves @aeternity/aepp-sdk (^14.1.0) and bignumber.js (^10.0.2).

  3. Export the key into the process environment:

    export AE_PRIVATE_KEY=<your_secret_key>

    Every script reads process.env.AE_PRIVATE_KEY and nothing else. There is no config file, no keyring integration, no --key flag. Read-only commands work without it; see the requirements table in the CLI Reference.

  4. Point the agent at SKILL.md as 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.

  5. 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

GuaranteeDetail
JSON on stdoutEvery successful command prints one JSON.stringify result and nothing else
Human text on stderrProgress lines and errors. Safe to discard, or to surface as a log
Exit 0 or 1Nothing else. 1 means the command did not do what you asked
Idempotent readsEvery read-only command can be re-run freely; none costs gas
One key, from the environmentNo 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_tokens and superhero_token_buy are 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_KEY in 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, register and 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>&1

That 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 jq and alert when a held token's trending_score drops past your threshold, which is sell_on_score_drop_percent implemented in shell.
  • Diff consecutive mine snapshots to detect trades you did not authorise, a cheap tripwire if you also run an autonomous agent.
  • Feed superhero-transactions.mjs all 100 into 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

RuntimeNotes
OpenClawFrontmatter carries an openclaw metadata block; Gateway cron schedules the loop
Claude CodeNo built-in scheduler; use print mode plus system cron
GitHub CopilotNo scheduler; interactive use, or schedule the scripts directly
Any other Agent Skills runtimeThe skill uses only name, description and a namespaced metadata block, all of which the standard permits
A bare shell, cron, or CINothing 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