Smartclaws Reader

v1.0.1

Read and analyze IoT sensor data from SKALE blockchain via SmartClaws. Use when: querying sensor readings, asking about temperature or other measurements, an...

0· 122·1 current·1 all-time
byDmytro@dmytrotkk

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for dmytrotkk/smartclaws-reader.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "Smartclaws Reader" (dmytrotkk/smartclaws-reader) from ClawHub.
Skill page: https://clawhub.ai/dmytrotkk/smartclaws-reader
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install smartclaws-reader

ClawHub CLI

Package manager switcher

npx clawhub@latest install smartclaws-reader
Security Scan
Capability signals
CryptoRequires wallet
These labels describe what authority the skill may exercise. They are separate from suspicious or malicious moderation verdicts.
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
medium confidence
Purpose & Capability
Name/description (read on-chain IoT data) matches the instructions (calls to a smartclaws CLI to read channels). Required binaries (curl/wget) and the proposed CLI install are coherent with the stated purpose.
Instruction Scope
Instructions stay within the stated purpose (install CLI, init, read channel data). They do instruct the agent/user to run 'smartclaws init', which generates a local wallet/config (~/.smartclaws/config.json) and thus creates private key material on disk. The doc notes reads are read-only and don't require sFUEL, but it does not provide guidance about protecting the generated private key. Also the examples run subprocesses and parse CLI JSON output — expected for a CLI-based reader.
Install Mechanism
The install uses a GitHub releases URL (https://github.com/.../releases/latest/download/...), which is a known release host. This still involves downloading and installing a binary and making it executable (network fetch → local execution), which carries the usual trust/risk tradeoffs, but the mechanism itself is proportionate to the described CLI usage.
Credentials
No environment variables or external credentials are requested (consistent). However, the CLI 'init' step creates a local wallet/config containing private key material — this is not an environment variable but is sensitive local state. The skill does not request unrelated credentials or config paths.
Persistence & Privilege
The skill does not request always-on status and is user-invocable. It directs installation of a binary and creation of a per-user config/wallet under the user's home directory — appropriate for a CLI tool, but it will persist files on disk that the user should protect.
Assessment
This skill appears to do what it says (reads SmartClaws data) but it asks you to download and install a binary and to run 'smartclaws init', which will generate a local wallet/config (private key) in your home directory. Before installing, verify the GitHub release (check publisher and release checksums/signatures if available), prefer installing from your OS package manager or verified release when possible, and avoid running any 'register' or transaction-sending commands unless you understand implications. Treat the generated ~/.smartclaws files as sensitive: protect their file permissions, back them up securely if needed, and consider running the CLI in an isolated environment (container or VM) if you don't want private keys on your main host.

Like a lobster shell, security has layers — review code before you run it.

Runtime requirements

📊 Clawdis
Any bincurl, wget
latestvk97ezsk829wq4d8280cv132bx984de8q
122downloads
0stars
2versions
Updated 3w ago
v1.0.1
MIT-0

SmartClaws Reader

Read and analyze IoT sensor data published to the SKALE blockchain via the SmartClaws protocol. This skill handles reading on-chain data, parsing sensor readings, and answering natural-language questions about measurements.

Installation

Check if the CLI is available:

smartclaws --version

If not installed, download the binary for the current platform:

PLATFORM="$(uname -s | tr '[:upper:]' '[:lower:]')-$(uname -m | sed 's/aarch64/arm64/')"
curl -fL -o /usr/local/bin/smartclaws \
  "https://github.com/skalenetwork/smartclaws/releases/latest/download/smartclaws-${PLATFORM}"
chmod +x /usr/local/bin/smartclaws

If /usr/local/bin requires root, use ~/.local/bin/smartclaws instead and ensure it's on PATH.

Setup

Initialize the CLI (creates config and wallet):

smartclaws init

Expected output:

Config created at ~/.smartclaws/config.json
  Network:   SKALE Sandbox
  RPC URL:   https://base-sepolia-testnet.skalenodes.com/v1/vigilant-snappy-arcturus
  Chain ID:  196243392
  Contract:  0x18B62f70ddaA2666FA5933a7b6Ff3943e69ca690
  Wallet:    0xAbC123... (generated)

After init, show the wallet address to the user:

smartclaws wallet info

The reader machine does not need to run smartclaws register — it only reads data, it doesn't own devices. The wallet does not need sFUEL for read-only operations.

Channel Address

To read data, you need the channel address from the producer. This is the Outgoing address printed when the producer registered the device. Ask the user for this address if not already known.

Example channel address: 0x222333444555666777888999AAABBBCCCDDDEEEF

Reading Data

Latest reading

smartclaws read --channel <address> --limit 1 --json

Multiple recent readings

smartclaws read --channel <address> --limit 20 --json

Read from specific offset

smartclaws read --channel <address> --offset 5 --limit 10 --json

Human-readable output (no --json)

smartclaws read --channel <address> --limit 5

Outputs:

Messages: 42 total (offsets 0..41)
Reading: 37..41

[37] 2026-03-28T10:00:00.000Z temp-sensor/temperature {"temp":22.1,"humidity":55}
[38] 2026-03-28T10:00:30.000Z temp-sensor/temperature {"temp":22.3,"humidity":54}
[39] 2026-03-28T10:01:00.000Z temp-sensor/temperature {"temp":22.5,"humidity":54}
[40] 2026-03-28T10:01:30.000Z temp-sensor/temperature {"temp":22.4,"humidity":55}
[41] 2026-03-28T10:02:00.000Z temp-sensor/temperature {"temp":22.6,"humidity":53}

JSON Output Schema

When using --json, the output structure is:

{
  "device": null,
  "channel": "0x222...",
  "total": 42,
  "oldest": 0,
  "latest": 41,
  "messages": [
    {
      "offset": 41,
      "v": 1,
      "ts": 1711612920,
      "dev": "temp-sensor",
      "topic": "temperature",
      "p": {
        "temp": 22.6,
        "humidity": 53
      }
    }
  ]
}

Field reference:

  • device: device name (null when using --channel instead of --device)
  • channel: the on-chain channel address
  • total: total number of messages in the channel
  • oldest / latest: offset range of available messages
  • messages[].v: envelope version (always 1)
  • messages[].ts: Unix timestamp in seconds
  • messages[].dev: device name set by the producer
  • messages[].topic: message topic (e.g., "temperature", "sensor")
  • messages[].p: the payload object with sensor values

Data Truthfulness

When answering questions about sensor readings, do not imply that test/mock data is real device data. If the producer was configured with a mock/test publisher, be explicit that the readings are simulated.

Answering Data Questions

"What's the current temperature?"

smartclaws read --channel <address> --limit 1 --json

Parse the output, extract messages[0].p.temp (or the relevant field). Report the value and convert messages[0].ts to a human-readable timestamp.

Example response: "The current temperature is 22.6C, recorded at 10:02 AM UTC."

"What was the average temperature today / in the last N hours?"

smartclaws read --channel <address> --limit 200 --json

Read a large batch, then filter by timestamp and compute the mean:

import json, subprocess, time

result = subprocess.run(
    ["smartclaws", "read", "--channel", "<address>", "--limit", "200", "--json"],
    capture_output=True, text=True
)
data = json.loads(result.stdout)

cutoff = time.time() - 3600  # last hour
temps = [m["p"]["temp"] for m in data["messages"] if m["ts"] >= cutoff]

if temps:
    avg = sum(temps) / len(temps)
    print(f"Average: {avg:.1f}C over {len(temps)} readings")
else:
    print("No readings in the requested period")

"Has the temperature gone above X?"

Read recent messages and check for threshold crossings:

threshold = 28.0
above = [m for m in data["messages"] if m["p"]["temp"] > threshold]
if above:
    peak = max(above, key=lambda m: m["p"]["temp"])
    print(f"Yes, reached {peak['p']['temp']}C at {peak['ts']}")
else:
    print(f"No, all readings are at or below {threshold}C")

"Show the trend" / "Describe what's happening"

Read a window of data and compute basic statistics:

temps = [m["p"]["temp"] for m in data["messages"]]
if len(temps) >= 2:
    direction = "rising" if temps[-1] > temps[0] else "falling" if temps[-1] < temps[0] else "stable"
    print(f"Trend: {direction}")
    print(f"  Min: {min(temps):.1f}C, Max: {max(temps):.1f}C, Avg: {sum(temps)/len(temps):.1f}C")
    print(f"  From {temps[0]:.1f}C to {temps[-1]:.1f}C over {len(temps)} readings")

Multiple Sensors

If the channel carries data from multiple devices or topics, filter by the dev and topic fields in the envelope before analysis:

# Filter for a specific device
sensor_data = [m for m in data["messages"] if m["dev"] == "temp-sensor"]

# Filter for a specific topic
temp_data = [m for m in data["messages"] if m["topic"] == "temperature"]

Reading from a Local Device

If the device was registered on this machine (both producer and reader on same machine), you can use --device instead of --channel:

smartclaws read --device temp-sensor --limit 1 --json

This looks up the channel address from ~/.smartclaws/devices/temp-sensor.json automatically.

Common Errors

ErrorCauseFix
Not initialized. Run 'smartclaws init' first.No configRun smartclaws init
Provide --device or --channel.Neither flag givenAdd --channel <addr> or --device <name>
No messages.Channel is emptyProducer hasn't published yet, or wrong channel
Contract revert on readInvalid channel addressVerify the address with the producer
RPC connection errorNetwork issueCheck internet connection; verify RPC URL in config

Comments

Loading comments...