Get the FREE Ultimate OpenClaw Setup Guide →

activity

npx machina-cli add skill ADWilkinson/peer-tools/activity --openclaw
Files (1)
SKILL.md
2.4 KB
<activity>

You are a ZKP2P activity feed assistant. Fetch and present recent protocol events from the Peerlytics API.

Arguments: $ARGUMENTS

Instructions

  1. Check API key: If PEERLYTICS_API_KEY is not set, tell the user: "Set your API key: export PEERLYTICS_API_KEY=pk_live_your_key -- get one at https://peerlytics.xyz/developers"

  2. Parse natural language filters from arguments into query params:

    • Time: "last hour"/"1h" -> since = 1h ago ISO, "last 24h"/"today" -> 24h ago, "last week"/"7d" -> 7d ago
    • Type: map to type param. Valid values: intent_signaled, intent_fulfilled, intent_pruned, deposit_created, deposit_topup, deposit_withdrawn, deposit_closed, deposit_rate_updated. Common aliases: "fulfilled"/"fulfillments" -> intent_fulfilled, "deposits"/"new deposits" -> deposit_created, "intents"/"signals" -> intent_signaled, "withdrawals" -> deposit_withdrawn, "pruned" -> intent_pruned, "rate updates" -> deposit_rate_updated
    • Address: any 0x... value -> address=0x...
    • Limit: any standalone number -> limit=N (default 20)
    • Multiple filters can combine (e.g., "fulfilled last hour" -> type=intent_fulfilled&since=...)
  3. Fetch data:

curl -s -D /tmp/peerlytics_headers -w '\n%{http_code}' \
  -H "x-api-key: $PEERLYTICS_API_KEY" \
  "https://peerlytics.xyz/api/v1/activity?PARAMS"

Then read credits remaining: grep -i 'x-credits-remaining' /tmp/peerlytics_headers

  1. Handle errors: 401 = bad key, 429 = rate limited. Show the response body for any non-200.

  2. Present results: Inspect the JSON response and present all events returned. Use a table with columns matching whatever fields the API provides. Use relative timestamps for readability, truncate addresses to 0xAbCd...1234, format amounts with $ and commas. Add a brief summary line with event counts. Link relevant entities to the explorer: https://peerlytics.xyz/explorer/deposit/ID.

  3. Footer: Report credits remaining (from X-Credits-Remaining header). Suggest: filter by type or time, /peerlytics:explorer to look up entities from the feed, /peerlytics:analytics for aggregate stats, /peerlytics:market for rates.

</activity>

Source

git clone https://github.com/ADWilkinson/peer-tools/blob/main/peerlytics/skills/activity/SKILL.mdView on GitHub

Overview

This skill fetches recent ZKP2P protocol activity from the Peerlytics API and presents events such as deposits, intents (signaled and fulfilled), and withdrawals. It supports natural-language filters for time, type, and address, and formats results with relative timestamps, truncated addresses, and explorer links to each event.

How This Skill Works

When invoked, the skill checks for the PEERLYTICS_API_KEY. It then parses natural-language filters into API query parameters (time since, type, address, limit), issues a curl request to the Peerlytics API, and presents the JSON results in a readable table with explorer links. It also reports API credit usage and handles 401/429 errors by displaying the response body for troubleshooting.

When to Use It

  • Audit deposits created in the last 24 hours
  • Monitor fulfilled intents or signals to verify activity
  • Track withdrawals or deposit closures for risk assessment
  • Investigate activity by a specific address
  • Assess rate updates and overall liquidity activity

Quick Start

  1. Step 1: Ensure API key is set: export PEERLYTICS_API_KEY=YOUR_KEY
  2. Step 2: Request activity with filters, e.g., 'fulfillment last hour' or 'deposit_created last 24h'
  3. Step 3: Review the resulting table and use explorer links for details

Best Practices

  • Always set and protect the PEERLYTICS_API_KEY environment variable
  • Use precise time and type filters to minimize data and avoid rate limits
  • Limit results to a reasonable number (default 20) for readability
  • Validate and sanitize addresses; rely on truncated UI formatting for display
  • Include explorer links to quickly verify event IDs and entities

Example Use Cases

  • Query deposits created in the last 24 hours for address 0xAbCd...1234
  • Show fulfilled intents in the last hour
  • Fetch all withdrawals for address 0x1234...7890
  • List deposit rate updates in the past 7 days
  • Filter deposits created and intents signaled for a specific address

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers