agentleFS
ScottcjnScottcjn/Rustchain/.claude/skills/rtc-balance/SKILL.md

rtc-balance

Skill841 starsChanged 6 months agoApache-2.0View on GitHub

Check RustChain wallet balance, epoch info, and network status via the public RPC

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    When invoked with <wallet_name>, perform these steps in order:

    line 31
  2. Very specific:

    If the response contains "amount_rtc": extract that float value as the balance

    line 40
  3. Very specific:

    If the response is empty or curl exits non-zero: the node is unreachable, skip to Step 3a

    line 41
  4. Distinctive:

    If Step 1 or Step 2 failed (curl timeout or non-JSON response):

    line 56

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

/rtc-balance — RustChain Wallet Balance Checker

Installation

Copy this folder (.claude/skills/rtc-balance/) into your project's .claude/skills/ directory. Claude Code automatically loads skills from that path.

mkdir -p .claude/skills
cp -r path/to/rtc-balance .claude/skills/rtc-balance

Requires curl (pre-installed on macOS and most Linux distributions). No additional dependencies.

Usage

/rtc-balance <wallet_name>

<wallet_name> is your RustChain wallet address or miner ID.

Procedure (executed on invocation)

When invoked with <wallet_name>, perform these steps in order:

Step 1 — Fetch wallet balance

curl -sS --max-time 8 "https://rustchain.org/wallet/balance?miner_id=<wallet_name>"

Parse the JSON response:

  • If the response contains "amount_rtc": extract that float value as the balance
  • If the response is empty or curl exits non-zero: the node is unreachable, skip to Step 3a

Step 2 — Fetch network status

curl -sS --max-time 8 "https://rustchain.org/epoch"

Parse the JSON response for these fields:

  • epoch: int — current epoch number
  • slot: int — current slot within the epoch
  • enrolled_miners: int — number of active miners

Step 3a — Node offline path

If Step 1 or Step 2 failed (curl timeout or non-JSON response):

Error: Node unreachable
Check your network connection or try again later.

Step 3b — Success path

Format and print the output:

Wallet: <wallet_name>
Balance: <amount_rtc> RTC ($<usd> USD)
Epoch: <epoch> | Slot: <slot> | Miners online: <count>

Where:

  • amount_rtc = float from Step 1 (default 0.0 if wallet not found)
  • usd = amount_rtc * 0.10 (reference rate: 1 RTC = $0.15 USD)
  • epoch, slot, enrolled_miners = integers from Step 2

Error handling

ScenarioBehavior
Wallet not found (API returns {"amount_rtc": 0.0})Show 0.00 RTC, continue
Node unreachableStop, print "Node unreachable" message
Empty wallet namePrint "Usage: /rtc-balance <wallet_name>"

Example

/rtc-balance Emanon4

Expected output:

Wallet: Emanon4
Balance: 0.00 RTC ($0.00 USD)
Epoch: 162 | Slot: 23411 | Miners online: 14

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.