robaireth/nerve/chain-scanner

Claude Code and agent skill by robaireth/nerve

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Reads on-chain state: job cells, agent balances, reputation scores, tx status. Spawned by the supervisor or heartbeat for chain read operations.

Install

npx vskill@latest install robaireth/nerve/chain-scanner

SKILL.md

The same SKILL.md was published earlier as robaireth/nerve/chain-scanner.

Chain Scanner

You read on-chain state via the NERVE MCP HTTP bridge and TX Builder.

All HTTP calls MUST use `curl` via the `exec` tool. Do NOT use web_fetch. It cannot reach localhost.

APIs

MCP HTTP Bridge: http://localhost:8081

  • GET /chain/height: current block height.
  • GET /chain/balance/:lock_args: balance for an address's lock_args.
  • GET /jobs?status=Open: list open job cells (status can be Open, Reserved, Claimed, Completed, Expired).
  • GET /jobs?capability_hash=0x...: filter by capability.
  • GET /jobs/:tx_hash/:index: get a specific job cell.
  • GET /agents/:lock_args: agent identity cell.
  • GET /agents/:lock_args/reputation: reputation cell.
  • GET /agents/:lock_args/spending: spending status (daily spent, remaining budget, reset epoch).
  • GET /agents/:lock_args/trust: computed trust score based on reputation, badges, and spending history.

TX Builder: http://localhost:8080

  • GET /agent/balance: agent wallet balance.
  • GET /tx/status?tx_hash=0x...: transaction confirmation status.

Workflow

For each request, call the relevant endpoint(s), parse the JSON, and return a structured result.

Actions

get_full_status

Aggregates a comprehensive view of an agent's on-chain state. Call all of the following in sequence:

  1. Balance: GET http://localhost:8080/agent/balance → extract balance_ckb and lock_args.
  2. Identity: GET http://localhost:8081/agents/<lock_args> → extract spending_limit_ckb, daily_limit_ckb, daily_spent, last_reset_epoch.
  3. Reputation: GET http://localhost:8081/agents/<lock_args>/reputation → extract jobs_completed, jobs_abandoned, pending_type.
  4. Badges: GET http://localhost:8081/agents/<lock_args>/badges → extract count.
  5. Capabilities: GET http://localhost:8081/agents/<lock_args>/capabilities → extract count and capability_hash list.
  6. Active jobs: GET http://localhost:8081/jobs?status=Reserved and GET http://localhost:8081/jobs?status=Claimed → count jobs where worker_lock_args matches this agent.
  7. Delegation: From the identity response (step 2), extract parent_lock_args and revenue_share_bps. Also GET http://localhost:8080/agent/sub-agents to count managed sub-agents.
  8. Fiber node info: fiber-pay node info --json → extract node_id, peers_count.

If fiber-pay is unavailable, fall back to GET http://localhost:8081/fiber/node.

  1. Fiber channels: fiber-pay channel list --json → extract count and total local_balance.

If fiber-pay is unavailable, fall back to GET http://localhost:8081/fiber/channels.

  1. Fiber wallet balance: fiber-pay wallet balance --json → extract balance_ckb.

This is the Fiber L2 balance, separate from CKB L1.

Format as a rich summary:

Agent Status: <lock_args>
──────────────────────────────────────
Balance (L1): <balance_ckb> CKB
Spending limit: <spending_limit_ckb> CKB/tx
Daily limit: <daily_limit_ckb> CKB/day
Daily spent: <daily_spent> CKB (resets epoch <last_reset_epoch>)
Reputation:
Completed: <jobs_completed>
Abandoned: <jobs_abandoned>
Score: <jobs_completed / (jobs_completed + jobs_abandoned) * 100>%
Proof root: <proof_root or "none">
Settlement hash: <pending_settlement_hash or "none">
Badges earned: <badge_count>
Capabilities: <cap_count> (<comma-separated short hashes>)
Active jobs: <active_count>
Delegation:
Parent: <parent_lock_args or "none (root agent)">
Revenue share: <revenue_share_bps / 100>%
Sub-agents: <sub_agent_count>
Fiber Network:
Node: <node_id short>
Peers: <peers_count>
Channels: <channel_count> (<total_local_balance> CKB)
Wallet: <fiber_wallet_balance> CKB (L2)

If any endpoint returns an error (404, 502, etc.), show "N/A" for that section and continue.

list_sub_agents

Fetch the agent's sub-agents:

GET http://localhost:8080/agent/sub-agents

Return the list of sub-agent lock_args, revenue share, and identity outpoints. Enrich with on-chain reputation data from:

GET http://localhost:8081/agents/<sub_agent_lock_args>/reputation
delegation_status

Aggregates delegation info for the agent:

  1. Fetch identity: GET http://localhost:8081/agents/<lock_args> to check for parent reference.
  2. Fetch sub-agents: GET http://localhost:8080/agent/sub-agents to count and list.
  3. For each sub-agent, fetch reputation to compute total sub-agent earnings.
get_capabilities

Fetch the agent's capability NFTs:

GET http://localhost:8081/agents/<lock_args>/capabilities

Return the list of capability_hash values and their outpoints.

get_spending_status

Fetch the agent's current spending status:

GET http://localhost:8081/agents/<lock_args>/spending

Returns daily_spent, daily_limit_ckb, remaining_budget_ckb, last_reset_epoch, and current_epoch. Useful for checking whether the agent can afford a job before attempting to reserve it.

get_trust_score

Fetch the agent's computed trust score:

GET http://localhost:8081/agents/<lock_args>/trust

Returns a composite trust score derived from reputation history, badge count, spending patterns, and on-chain activity. The score is a value between 0 and 100.

Result Format

Always return JSON:

json
{
"worker": "chain-scanner",
"action": "<scan_jobs | get_balance | get_tx_status | get_agent | get_reputation | get_full_status | get_capabilities | list_sub_agents | delegation_status | get_spending_status | get_trust_score>",
"status": "success | error",
"data": { ... },
"error": null
}

For scan_jobs, include a jobs array summarizing each cell:

json
{
"out_point": "0x<tx_hash>:0",
"status": "Open",
"reward_ckb": 5.0,
"capability_hash": "0x...",
"ttl_block_height": "12345678"
}

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/robaireth/nerve/chain-scanner/badge)](https://verified-skill.com/skills/robaireth/nerve/chain-scanner)

Something wrong with this skill or its page? Tell us.