Logo von Moonpay Wallet Statusline

Moonpay Wallet Statusline

Organisation
moonpay
moonpay-wallet-statusline

Show MoonPay wallet balances in a compatible CLI status line using a local cache and refresh script. Use when the user asks to "show balances in the status bar", "add wallet to the CLI status line", or wants a persistent balance display while working.

Übersicht

Herausgebermoonpay
Repositoryskills
Skill-Namemoonpay-wallet-statusline
Sterne
112
Forks
30
Mitgelieferte Dateien
Nur Anweisungen
LizenzMIT
Links
  • Anweisungen in Markdown

    Eine SKILL.md-Datei, die das Modell bei Bedarf lädt. So werden nur dann Token verbraucht, wenn eine Anfrage tatsächlich dazu passt.

  • Funktioniert mit jedem LLM

    KI-Skills bestehen aus reinem Markdown, nicht aus anbieterspezifischem Code. Daher funktionieren sie mit GPT, Claude, Gemini, Grok oder einem lokalen Modell.

  • In sich abgeschlossen

    Alles, was das Modell braucht, steht in den Anweisungen — keine zusätzlichen Dateien zum Synchronisieren.

  • Open Source

    Von moonpay auf GitHub veröffentlicht. Prüfen Sie vor der Installation die Quelldateien.

Installation

Installieren Sie den KI-Skill Moonpay Wallet Statusline in TypingMind, um ihn mit jedem LLM zu nutzen, oder fügen Sie ihn einem anderen Agenten hinzu, der SKILL.md lesen kann.

1

In TypingMind installieren

TypingMind installiert einen Skill direkt aus seinem GitHub-Ordner. Dabei liest die App SKILL.md, bündelt die Ressourcendateien und speichert das Ergebnis lokal.

  1. Öffnen Sie die App und gehen Sie zu Plugins → Skills.
  2. Wählen Sie „Von GitHub installieren“.
  3. Fügen Sie die unten angegebene URL des Skill-Ordners ein und bestätigen Sie.
    https://github.com/moonpay/skills/tree/main/skills/moonpay-wallet-statusline
  4. Aktivieren Sie den Skill in jedem Chat, in dem er verfügbar sein soll.
Plugins → Skills → Skill hinzufügen → Über GitHub-URL. Fügen Sie dann die Ordner-URL ein und klicken Sie auf „Weiter“.
2

In einem anderen Agenten installieren

Jeder Agent, der das Agent-Skills-Format unterstützt, kann diesen Skill nutzen. Kopieren Sie den Ordner in das Skill-Verzeichnis des jeweiligen Agenten.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/moonpay/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/skills/moonpay-wallet-statusline .claude/skills/moonpay-wallet-statusline
Starten Sie Claude Code nach dem Kopieren neu, damit der neue Skill erkannt wird.

In TypingMind verwenden

Aktivieren Sie Moonpay Wallet Statusline in einem beliebigen Chat in TypingMind. Den Rest übernimmt das Modell. Name und Beschreibung des Skills stehen im System-Prompt. Sobald eine Anfrage passt, lädt das Modell selbstständig die vollständigen Anweisungen — Sie müssen den Skill nie manuell aufrufen, und er verbraucht erst Token, wenn er tatsächlich genutzt wird.

Das Modell lädt Moonpay Wallet Statusline automatisch, sobald eine passende Anfrage gestellt wird.

Funktioniert mit jedem KI-Modell

KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher ist Moonpay Wallet Statusline nicht an das Modell gebunden, für das der Skill geschrieben wurde. Installieren Sie ihn einmal in TypingMind und nutzen Sie ihn mit GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder einem selbst betriebenen lokalen Modell — alles mit Ihren eigenen API-Schlüsseln.

  • Wird nur bei Bedarf geladen

    Der System-Prompt enthält nur den Namen und die Beschreibung. Die Anweisungen werden bei der ersten passenden Anfrage geladen. Ein ungenutzter Skill verursacht daher keine Kosten.

  • Modell im laufenden Chat wechseln

    Da der Skill aus Anweisungen statt aus Code besteht, funktioniert er auch nach einem Modellwechsel — das nächste Modell liest dieselbe SKILL.md-Datei.

Skill-Anweisungen

Dies ist der Inhalt von SKILL.md, den das Modell lädt. Lesen Sie ihn vor der Installation — ein Skill besteht aus Anweisungen, denen Ihr Modell folgt.

Wallet status line

Goal

Display cached MoonPay wallet balances in a compatible CLI status line. This skill creates:

  • ~/.config/moonpay/statusline.json — tracked wallets, chains, and format
  • ~/.config/moonpay/refresh-statusline.sh — refreshes balances from the MoonPay CLI
  • ~/.config/moonpay/statusline-cache.txt — pre-rendered ANSI output for the status line

Any compatible status display can read the cache file directly.

Prerequisites

  • MoonPay CLI installed: npm i -g @moonpay/cli
  • Authenticated: mp login then mp verify
  • At least one wallet: mp wallet list
  • jq installed: which jq
  • bc installed: which bc
  • For status line integration: the target CLI supports a command-based status line or any equivalent scriptable status bar

Commands

bash
# List wallets
mp wallet list
mp --json wallet list

# Fetch balances (used by the refresh script)
mp --json bitcoin balance retrieve --wallet <btc-address>
mp --json token balance list --wallet <address> --chain <chain>

# Refresh the status line cache
bash ~/.config/moonpay/refresh-statusline.sh

Supported chains

solana, ethereum, base, polygon, arbitrum, optimism, bnb, avalanche, tron, bitcoin, ton, filecoin

Bitcoin uses a separate command (mp bitcoin balance retrieve) and does not return USD values, so it is excluded from USD totals.

Workflow

1. Verify prerequisites

Run:

bash
mp verify
mp wallet list
which jq
which bc

If the user wants integration with a specific CLI, verify that CLI's status line entry point too.

Examples:

bash
# Claude Code
test -f ~/.claude/statusline.sh && echo "statusline script present"

# Cursor CLI
test -f ~/.cursor/statusline.sh && echo "cursor statusline script present"

If the target CLI does not yet have a status line configured, help the user set that up first, then come back to this skill.

2. Select wallet addresses and chains

Run mp wallet list and ask the user which wallet address(es) to track. Create one config entry per address and per chain.

Skip testnets/devnets by default. Exclude chains containing:

  • testnet
  • devnet
  • sepolia
  • amoy
  • tempo

3. Select display format

  • amount — symbol + balance (example: BTC 0.00071)
  • amount+usd — symbol + balance + USD when available (example: mpSOL 0.00092 ($0.08))
  • total+breakdown — total USD first, then token breakdown (example: $12.48 | SOL 0.03 ($4.55) | USDC 7.93 ($7.93))

If the same symbol appears on multiple chains, keep separate entries rather than merging them.

4. Write config

Create the config directory if needed:

bash
mkdir -p ~/.config/moonpay

Write ~/.config/moonpay/statusline.json. Each entry must represent exactly one wallet address on exactly one chain. Prefer storing the resolved address directly instead of a wallet name.

json
{
  "entries": [
    {
      "label": "btc-wallet",
      "address": "bc1qexample...",
      "chain": "bitcoin"
    },
    {
      "label": "base-wallet",
      "address": "0x1234...abcd",
      "chain": "base"
    },
    {
      "label": "sol-wallet",
      "address": "So1anaExamplePubkey...",
      "chain": "solana"
    }
  ],
  "format": "amount+usd"
}

5. Create refresh script

Write ~/.config/moonpay/refresh-statusline.sh, then make it executable with chmod +x ~/.config/moonpay/refresh-statusline.sh.

This script:

  1. Reads ~/.config/moonpay/statusline.json
  2. Validates that each config entry has one address and one chain
  3. Fetches balances per configured address and chain
  4. Aborts on any configured fetch error, preserving the previous cache
  5. Formats ANSI-colored output for the status line
  6. Writes the cache atomically
  7. Deletes the cache if no balances are found
bash
#!/usr/bin/env bash
set -euo pipefail

CONFIG="$HOME/.config/moonpay/statusline.json"
CACHE="$HOME/.config/moonpay/statusline-cache.txt"
TMP_CACHE="$(mktemp "${CACHE}.tmp.XXXXXX")"

BOLD_CYAN=$'\033[1;36m'
WHITE=$'\033[0;37m'
DIM_GREEN=$'\033[2;32m'
DIM=$'\033[2m'
RESET=$'\033[0m'

cleanup() {
  rm -f "$TMP_CACHE"
}
trap cleanup EXIT

require_bin() {
  command -v "$1" >/dev/null 2>&1 || {
    echo "missing dependency: $1" >&2
    exit 1
  }
}

trim_number() {
  printf "%s" "$1" | sed -E 's/(\.[0-9]*[1-9])0+$/\1/; s/\.0+$//'
}

format_usd() {
  printf '$%.2f' "${1:-0}"
}

join_by() {
  local separator="$1"
  shift
  local first=1
  for item in "$@"; do
    if [[ $first -eq 1 ]]; then
      printf "%s" "$item"
      first=0
    else
      printf "%s%s" "$separator" "$item"
    fi
  done
}

require_bin mp
require_bin jq
require_bin bc

[[ -f "$CONFIG" ]] || exit 1

FORMAT="$(jq -r '.format // "amount"' "$CONFIG")"
ENTRY_COUNT="$(jq '.entries | length' "$CONFIG")"
[[ "$ENTRY_COUNT" -gt 0 ]] || {
  rm -f "$CACHE"
  exit 0
}

declare -a RENDERED=()
USD_TOTAL="0"
HAS_USD_TOTAL=0

while IFS= read -r entry; do
  entry_label="$(jq -r '.label // empty' <<<"$entry")"
  wallet_address="$(jq -r '.address // empty' <<<"$entry")"
  chain="$(jq -r '.chain // empty' <<<"$entry")"

  [[ -n "$wallet_address" && -n "$chain" ]] || {
    echo "invalid config entry: each item needs address and chain" >&2
    exit 1
  }

  if [[ "$chain" == "bitcoin" ]]; then
    if ! btc_json="$(mp --json bitcoin balance retrieve --wallet "$wallet_address" 2>/dev/null)"; then
      echo "failed to fetch bitcoin balance for ${entry_label:-$wallet_address}" >&2
      exit 1
    fi

    btc_amount="$(jq -r '.total.btc // empty' <<<"$btc_json")"
    [[ -n "$btc_amount" && "$btc_amount" != "0" ]] || continue

    amount_display="$(trim_number "$btc_amount")"
    RENDERED+=("${BOLD_CYAN}₿@bitcoin${RESET} ${WHITE}${amount_display}${RESET}")
    continue
  fi

  if ! token_json="$(mp --json token balance list --wallet "$wallet_address" --chain "$chain" 2>/dev/null)"; then
    echo "failed to fetch token balances for ${entry_label:-$wallet_address} on ${chain}" >&2
    exit 1
  fi

  while IFS= read -r token_entry; do
    symbol="$(jq -r '.symbol // empty' <<<"$token_entry")"
    amount="$(jq -r '.balance.amount // empty' <<<"$token_entry")"
    usd_value="$(jq -r '.balance.value // empty' <<<"$token_entry")"

    [[ -n "$symbol" && -n "$amount" ]] || continue
    amount_display="$(trim_number "$amount")"
    token_label="${symbol}@${chain}"

    if [[ -n "$usd_value" && "$usd_value" != "null" ]]; then
      USD_TOTAL="$(echo "$USD_TOTAL + $usd_value" | bc -l)"
      HAS_USD_TOTAL=1
    fi

    case "$FORMAT" in
      amount)
        RENDERED+=("${BOLD_CYAN}${token_label}${RESET} ${WHITE}${amount_display}${RESET}")
        ;;
      amount+usd)
        if [[ -n "$usd_value" && "$usd_value" != "null" ]]; then
          RENDERED+=("${BOLD_CYAN}${token_label}${RESET} ${WHITE}${amount_display}${RESET} ${DIM_GREEN}($(format_usd "$usd_value"))${RESET}")
        else
          RENDERED+=("${BOLD_CYAN}${token_label}${RESET} ${WHITE}${amount_display}${RESET}")
        fi
        ;;
      total+breakdown)
        if [[ -n "$usd_value" && "$usd_value" != "null" ]]; then
          RENDERED+=("${BOLD_CYAN}${token_label}${RESET} ${WHITE}${amount_display}${RESET} ${DIM_GREEN}($(format_usd "$usd_value"))${RESET}")
        else
          RENDERED+=("${BOLD_CYAN}${token_label}${RESET} ${WHITE}${amount_display}${RESET}")
        fi
        ;;
      *)
        RENDERED+=("${BOLD_CYAN}${token_label}${RESET} ${WHITE}${amount_display}${RESET}")
        ;;
    esac
  done < <(
    jq -c '
      (.items // . // [])[]
      | select(((.balance.amount // "0") | tonumber? // 0) > 0)
    ' <<<"$token_json"
  )
done < <(jq -c '.entries[]' "$CONFIG")

if [[ ${#RENDERED[@]} -eq 0 ]]; then
  rm -f "$CACHE"
  exit 0
fi

SEPARATOR="${DIM} | ${RESET}"
TOKENS_LINE="$(join_by "$SEPARATOR" "${RENDERED[@]}")"

if [[ "$FORMAT" == "total+breakdown" && "$HAS_USD_TOTAL" -eq 1 ]]; then
  printf "%s%s%s" "${DIM_GREEN}$(format_usd "$USD_TOTAL")${RESET}" "$SEPARATOR" "$TOKENS_LINE" >"$TMP_CACHE"
else
  printf "%s" "$TOKENS_LINE" >"$TMP_CACHE"
fi

mv "$TMP_CACHE" "$CACHE"

6. Run initial refresh

bash
bash ~/.config/moonpay/refresh-statusline.sh

Verify the cache file:

bash
cat ~/.config/moonpay/statusline-cache.txt

For plain text:

bash
sed 's/\x1b\[[0-9;]*m//g' ~/.config/moonpay/statusline-cache.txt

7. Wire into a compatible CLI

The generic pattern is:

  1. Find the status line script or inline command used by the target CLI
  2. Read ~/.config/moonpay/statusline-cache.txt
  3. Append that cached output to the existing status line
  4. Preserve ANSI colors if the CLI supports them

Any CLI that can run a script on status line render can use the cached output directly:

bash
cat ~/.config/moonpay/statusline-cache.txt

If the target CLI does not support ANSI colors, strip them first:

bash
sed 's/\x1b\[[0-9;]*m//g' ~/.config/moonpay/statusline-cache.txt
Claude Code example

Add this block to ~/.claude/statusline.sh before the final render/output section. Match the surrounding script style if variable names differ.

bash
# Wallet balances
WALLET_CACHE="$HOME/.config/moonpay/statusline-cache.txt"
WALLET_STR=""
if [ -f "$WALLET_CACHE" ]; then
  WALLET_STR="$(cat "$WALLET_CACHE")"
fi

if [ -n "$WALLET_STR" ]; then
  [ -n "$LINE3" ] && LINE3="${LINE3}${SEP}"
  LINE3="${LINE3}${WALLET_STR}"
fi

Optional on Claude Code v2.1.85+: add a PostToolUse hook to ~/.claude/settings.json so balance-moving MoonPay commands refresh the cache automatically.

json
{
  "hooks": {
    "PostToolUse": [
      {
        "matcher": "Bash",
        "hooks": [
          {
            "type": "command",
            "if": "Bash(mp token swap:*)",
            "command": "bash ~/.config/moonpay/refresh-statusline.sh 2>/dev/null || true",
            "async": true
          },
          {
            "type": "command",
            "if": "Bash(mp token send:*)",
            "command": "bash ~/.config/moonpay/refresh-statusline.sh 2>/dev/null || true",
            "async": true
          },
          {
            "type": "command",
            "if": "Bash(mp token bridge:*)",
            "command": "bash ~/.config/moonpay/refresh-statusline.sh 2>/dev/null || true",
            "async": true
          },
          {
            "type": "command",
            "if": "Bash(mp bitcoin send:*)",
            "command": "bash ~/.config/moonpay/refresh-statusline.sh 2>/dev/null || true",
            "async": true
          },
          {
            "type": "command",
            "if": "Bash(mp buy:*)",
            "command": "bash ~/.config/moonpay/refresh-statusline.sh 2>/dev/null || true",
            "async": true
          }
        ]
      }
    ]
  }
}
Cursor CLI example

Cursor CLI uses ~/.cursor/cli-config.json with a statusLine.command entry that typically points at ~/.cursor/statusline.sh. Add the same cache-read pattern to that script, for example:

bash
WALLET_CACHE="$HOME/.config/moonpay/statusline-cache.txt"
WALLET_STR=""
if [ -f "$WALLET_CACHE" ]; then
  WALLET_STR="$(cat "$WALLET_CACHE")"
fi

if [ -n "$WALLET_STR" ]; then
  [ -n "$LINE3" ] && LINE3="${LINE3}${SEP}"
  LINE3="${LINE3}${WALLET_STR}"
fi

If the user's script uses different variable names or a single-line layout, adapt the snippet to match the existing format.

Other CLIs

For any other CLI tool with a scriptable status line:

  • locate the script or command used for the status line
  • append cat ~/.config/moonpay/statusline-cache.txt or the ANSI-stripped variant
  • if the tool supports command hooks or post-command automation, wire bash ~/.config/moonpay/refresh-statusline.sh into that mechanism

8. Confirm

Tell the user:

  • The cache file is ~/.config/moonpay/statusline-cache.txt
  • Run moonpay-wallet-statusline-refresh to refresh manually
  • Changes appear in the target CLI on the next status line render or next session, depending on local setup

Other agents

Any agent with a terminal status display can read the cache file directly:

bash
cat ~/.config/moonpay/statusline-cache.txt

If the target status display does not support ANSI colors, strip ANSI codes first:

bash
sed 's/\x1b\[[0-9;]*m//g' ~/.config/moonpay/statusline-cache.txt

Error handling

ErrorCauseFix
mp: command not foundMoonPay CLI not installednpm i -g @moonpay/cli
jq: command not foundjq not installedInstall via package manager
bc: command not foundbc not installedInstall via package manager
mp verify failedNot authenticated or expired authRun mp login then mp verify
Empty cache after refreshNo balances found on configured entriesCheck configured addresses/chains and verify the wallet has funds
Status line does not update in the target CLICLI status line not set up yet or cache not wired inConfigure that CLI's status line first, then add the wallet cache block

Related skills

Häufig gestellte Fragen

Was macht der KI-Skill Moonpay Wallet Statusline?

Show MoonPay wallet balances in a compatible CLI status line using a local cache and refresh script. Use when the user asks to "show balances in the status bar", "add wallet to the CLI status line", or wants a persistent balance display while working.

Warum Moonpay Wallet Statusline in TypingMind nutzen?

Weil Sie den Skill einmal installieren und mit jedem Modell verwenden können. Moonpay Wallet Statusline besteht aus reinem Markdown statt aus anbieterspezifischem Code. So funktioniert derselbe Skill mit GPT-5, Claude, Gemini, Grok oder einem lokalen Modell – und Sie können das Modell mitten im Chat wechseln, ohne dass der Skill seine Funktion verliert. TypingMind verwendet Ihre eigenen API-Schlüssel. Sie bezahlen die Anbieter daher direkt statt über ein Abonnement pro Nutzerplatz, und Ihre Skills und Chats bleiben in Ihrem eigenen Speicher.

Wie installiere ich Moonpay Wallet Statusline in TypingMind?

Öffnen Sie in TypingMind Plugins → Skills → Von GitHub installieren und fügen Sie https://github.com/moonpay/skills/tree/main/skills/moonpay-wallet-statusline ein. TypingMind liest die Datei SKILL.md und installiert den Skill, den Sie für jeden Chat einzeln aktivieren können.

Welche KI-Modelle können Moonpay Wallet Statusline nutzen?

Jedes Modell, das Sie mit TypingMind verbinden. KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher können GPT, Claude, Gemini, Grok und lokale Modelle diesen Skill laden, wenn eine Anfrage dazu passt.

Wie viele KI-Modelle kann ich mit Moonpay Wallet Statusline verwenden?

So viele Sie möchten. In TypingMind können Sie Moonpay Wallet Statusline mit jedem Modell verwenden, das Skills unterstützt, etwa mit GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama. Dabei nutzen Sie Ihre eigenen API-Schlüssel.

Ist der KI-Skill Moonpay Wallet Statusline kostenlos?

Ja. Der Skill wird von moonpay auf GitHub unter der Lizenz MIT veröffentlicht. Sie bezahlen nur Ihren eigenen KI-Anbieter für die verwendeten Token.

Was sind KI-Skills?

Ein KI-Skill ist ein wiederverwendbares Anweisungspaket, das einem KI-Modell vermittelt, wie es eine bestimmte Aufgabe erledigt. Es folgt dem offenen Format Agent Skills: Die Datei SKILL.md enthält den Namen und die Beschreibung des Skills. Hinzu kommen bei Bedarf Skripte, Vorlagen oder Referenzdateien für das Modell. Das Modell liest die Anweisungen nur, wenn Ihre Anfrage zum Skill passt. Ein installierter Skill verursacht daher erst Kosten, wenn er verwendet wird.

Wie unterscheiden sich KI-Skills von Plugins oder MCP-Servern?

Ein Plugin oder MCP-Server stellt einem Modell neue aufrufbare Tools bereit – Code, der auf einem System ausgeführt wird und ein Ergebnis zurückgibt. Ein KI-Skill vermittelt dem Modell stattdessen Wissen und Vorgehensweisen: wie es eine Aufgabe angeht, welche Schritte es befolgt und wie eine gute Ausgabe aussieht. Skills bestehen aus reinem Markdown und kommen daher ohne Server, API-Schlüssel und Laufzeitumgebung aus. Sie funktionieren mit jedem Modell.

Alle anzeigen

Jetzt eigenen KI-Arbeitsbereich einrichten

Abonnieren Sie unseren Newsletter und erfahren Sie mehr über neue Funktionen und kommende Gewinnspiele 👇