---
name: lucy
description: Analyze crypto tokens by address and generate analysis reports
homepage: https://api.dify.ai
metadata: { "openclaw": { "emoji": "📊", "requires": { "bins": ["curl"] }, "primaryEnv": "LUCY_API_KEY" } }
---

# Lucy Token Analyzer

Analyze cryptocurrency tokens by their contract address and generate comprehensive analysis reports via Lucy AI.

## When to Use This Skill

Use this skill when the user:
- Provides a token contract address for analysis
- Asks "Analyze this token: 0x..."
- Wants to check a token's safety, metrics, or details
- Says "Lucy, analyze..." or "Ask Lucy about..."
- Needs a token analysis report

## How to Use

### Basic Token Analysis Request

```bash
curl -X POST 'https://api.dify.ai/v1/chat-messages' \
  --header 'Authorization: Bearer app-PXCAFwirJclPkKOE75ZTeLft' \
  --header 'Content-Type: application/json' \
  --data-raw '{
    "inputs": {},
    "query": "Analyze token: ${TOKEN_ADDRESS}",
    "response_mode": "blocking",
    "conversation_id": "",
    "user": "claude-code-user"
  }'
```

### Continue Conversation

To maintain conversation context, use the `conversation_id` from the previous response:

```bash
curl -X POST 'https://api.dify.ai/v1/chat-messages' \
  --header 'Authorization: Bearer app-PXCAFwirJclPkKOE75ZTeLft' \
  --header 'Content-Type: application/json' \
  --data-raw '{
    "inputs": {},
    "query": "${FOLLOW_UP_QUESTION}",
    "response_mode": "blocking",
    "conversation_id": "${PREVIOUS_CONVERSATION_ID}",
    "user": "claude-code-user"
  }'
```

## Request Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
| `query` | string | The token address or analysis question |
| `conversation_id` | string | Session ID, empty for new conversation |
| `user` | string | Unique user identifier |
| `response_mode` | string | `blocking` (complete response) or `streaming` (real-time) |
| `inputs` | object | Additional input parameters |
| `files` | array | Optional image base64 array |

## Response Format

The API returns JSON containing:
- `answer`: Lucy's token analysis report
- `conversation_id`: Session ID for follow-up questions
- `message_id`: Unique message identifier
- `created_at`: Timestamp

### Example Response

```json
{
  "answer": "Token Analysis Report for 0x123...:\n- Contract Safety: ...\n- Liquidity: ...\n- Holder Distribution: ...",
  "conversation_id": "abc-123-def",
  "message_id": "msg-xyz",
  "created_at": 1234567890
}
```

## Usage Example

User: "Analyze this token: 0x1234567890abcdef..."

Steps:
1. Extract the token address from user input
2. Call Lucy API with the token address
3. Parse the `answer` field from response
4. Present the token analysis report to user
5. Save `conversation_id` for follow-up questions

## Error Handling

- **400 Error**: Invalid request parameters
- **401 Error**: Invalid or expired API Key
- **429 Error**: Rate limit exceeded, retry later
- **500 Error**: Server error, please retry

## Notes

- Pass empty string for `conversation_id` when starting a new analysis
- Use previous `conversation_id` to ask follow-up questions about the same token
- Recommend using `blocking` mode for complete analysis reports
- The `user` parameter helps track different user sessions
