Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.
Shared Pre-flight Checks
This file is shared across all onchainos skills. Follow these steps, in order, before the first
onchainoscommand each session. Do not echo routine command output to the user; give a brief status update only when installing, updating, or handling a failure.
Resolve latest stable version: Fetch the latest stable release tag from the GitHub API:
curl -sSL "https://api.github.com/repos/okx/onchainos-skills/releases/latest"Extract the
tag_namefield (e.g.,v1.0.5) intoLATEST_TAG. If the API call fails andonchainosis already installed locally, skip steps 2-3 and continue with step 4 (the user may be offline or rate-limited; a stale binary is better than blocking). Ifonchainosis not installed, stop and tell the user to check their network connection or install manually from https://github.com/okx/onchainos-skills.Install or update:
- Already installed → run
onchainos upgrade --throttle --skill-version "<this skill's frontmatter version>"(handles the 12h throttle, channel selection, beta→stable graduation, checkout switching, and its own cache refresh). If the JSON output has anactionfield, perform it and re-read SKILL.md. On failure, keep the current binary. Skip the installer bullets below. - Not installed → download the installer and its checksum file from the latest release tag:
- macOS/Linux:
curl -sSL "https://raw.githubusercontent.com/okx/onchainos-skills/${LATEST_TAG}/install.sh" -o /tmp/onchainos-install.shcurl -sSL "https://github.com/okx/onchainos-skills/releases/download/${LATEST_TAG}/installer-checksums.txt" -o /tmp/installer-checksums.txt - Windows:
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/okx/onchainos-skills/${LATEST_TAG}/install.ps1" -OutFile "$env:TEMP\onchainos-install.ps1"Invoke-WebRequest -Uri "https://github.com/okx/onchainos-skills/releases/download/${LATEST_TAG}/installer-checksums.txt" -OutFile "$env:TEMP\installer-checksums.txt"
- macOS/Linux:
- Verify the installer's SHA256 against
installer-checksums.txt. On mismatch, stop and warn — the installer may have been tampered with. - Execute:
sh /tmp/onchainos-install.sh(or& "$env:TEMP\onchainos-install.ps1"on Windows). If the active skill's frontmatterversioncontains-beta, append--betaso beta skills install the matching beta CLI. The installer handles version comparison internally and only downloads the binary if needed. - On other failures, point to https://github.com/okx/onchainos-skills.
- Already installed → run
Verify binary integrity (once per session): Run
onchainos --versionto get the installed version (e.g.,1.0.5or2.0.0-beta.0). Construct the installed tag asv<version>. Downloadchecksums.txtfor the installed version's tag (not necessarily LATEST_TAG):curl -sSL "https://github.com/okx/onchainos-skills/releases/download/v<version>/checksums.txt" -o /tmp/onchainos-checksums.txtLook up the platform target and compare the installed binary's SHA256 against the checksum. On mismatch, reinstall (step 2) and re-verify. If still mismatched, stop and warn.- Platform targets — macOS:
arm64->aarch64-apple-darwin,x86_64->x86_64-apple-darwin; Linux:x86_64->x86_64-unknown-linux-gnu,aarch64->aarch64-unknown-linux-gnu,i686->i686-unknown-linux-gnu,armv7l->armv7-unknown-linux-gnueabihf; Windows:AMD64->x86_64-pc-windows-msvc,x86->i686-pc-windows-msvc,ARM64->aarch64-pc-windows-msvc - Hash command — macOS/Linux:
shasum -a 256 ~/.local/bin/onchainos; Windows:(Get-FileHash "$env:USERPROFILE\.local\bin\onchainos.exe" -Algorithm SHA256).Hash.ToLower()
- Platform targets — macOS:
Version drift check — REQUIRED, run even if steps 1-3 were skipped.
- Run
onchainos --version→ CLI version (e.g.,2.2.9) - Read
versionfield from the active skill's YAML frontmatter (e.g.,version: "2.0.0"at the top of SKILL.md) - If CLI version > skill version → warn the user and offer to refresh skills:
"⚠️ Skill outdated (skill vX.Y.Z < CLI vA.B.C). Run
onchainos upgradeto refresh both the CLI and any locally cloned skill checkouts (~/.codex/onchainos-skills,~/.openclaw/onchainos-skills,~/.cursor/onchainos-skills,~/.opencode/onchainos-skills). For skills installed via a plugin manager (Claude Code/plugin, npm, Cursor marketplace), update through that manager instead —onchainos upgradewill skip those paths and print guidance." - After the user re-runs the skill (or confirms they've updated), re-read SKILL.md so subsequent steps use the fresh content.
- Continue to the user's command.
- Run
Do NOT auto-reinstall on command failures. Report errors and suggest
onchainos --versionor manual reinstall from https://github.com/okx/onchainos-skills.Rate limit errors. If a command hits rate limits, the shared API key may be throttled. Suggest creating a personal key at the OKX Developer Portal. If the user creates a
.envfile, remind them to add.envto.gitignore.