协作头脑风暴
brainstorming
在实现前澄清需求、探索设计选择,并形成清晰的开发方向。
relay-for-telegram【开发与工程】ALWAYS use this skill whenever the user asks about their Telegram history/messages/chats/DMs (search Telegram, find a message, summarize a chat, extract action items, who said what, recap last week). Uses the Relay API to query the user's synced Telegram messages.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Search and chat with your Telegram message history using AI. Access your synced messages, search conversations, and get AI-powered insights.
If the user asks anything that depends on their Telegram message history (searching, recalling, summarizing, action items, "what did X say?", "find the link", "what did we decide?"), you MUST use Relay via this skill.
If the skill is not eligible (missing RELAY_API_KEY or the user has not synced chats), respond with setup steps (Register First + syncing) and then retry once credentials are available.
/relay find "action items" from last week/skill relay find "action items" from last week| File | Description |
|---|---|
| SKILL.md | This file (bundled with ClawHub, web copy at https://relayfortelegram.com/skill.md) |
Base URL: https://relayfortelegram.com/api/v1
Relay uses Telegram phone verification. You'll need access to receive SMS codes.
curl -X POST https://relayfortelegram.com/api/v1/auth/request-code \
-H "Content-Type: application/json" \
-d '{"phone": "+1234567890"}'
Response:
{
"success": true,
"authId": "abc123",
"message": "Verification code sent to Telegram"
}
curl -X POST https://relayfortelegram.com/api/v1/auth/verify \
-H "Content-Type: application/json" \
-d '{"authId": "abc123", "code": "12345"}'
If 2FA is enabled on your Telegram account:
curl -X POST https://relayfortelegram.com/api/v1/auth/verify \
-H "Content-Type: application/json" \
-d '{"authId": "abc123", "code": "12345", "password": "your2FApassword"}'
Response:
{
"success": true,
"apiKey": "rl_live_xxxxxxxxxxxx",
"userId": "user-uuid",
"message": "Authentication successful. Store your API key securely - it won't be shown again."
}
⚠️ Save your apiKey immediately! It's shown only once.
Recommended: Save to ~/.config/relay/credentials.json:
{
"api_key": "rl_live_xxxxxxxxxxxx",
"phone": "+1234567890"
}
All requests require your API key:
curl https://relayfortelegram.com/api/v1/chats \
-H "Authorization: Bearer YOUR_API_KEY"
Search through your synced Telegram messages:
curl "https://relayfortelegram.com/api/v1/search?q=meeting+notes&limit=25" \
-H "Authorization: Bearer YOUR_API_KEY"
Query parameters:
q (required) - Search querychatId (optional) - Limit search to specific chatlimit (optional) - Max results (default: 50, max: 100 for Pro)Response:
{
"query": "action items",
"count": 5,
"results": [
{
"id": "msg-uuid",
"chatId": "chat-uuid",
"chatName": "Work Team",
"content": "Here are the action items from today...",
"senderName": "Alice",
"messageDate": "2025-01-30T14:30:00Z",
"isOutgoing": false
}
],
"plan": "pro"
}
Get your synced Telegram chats:
curl https://relayfortelegram.com/api/v1/chats \
-H "Authorization: Bearer YOUR_API_KEY"
Response:
{
"count": 10,
"totalAvailable": 25,
"plan": "pro",
"chats": [
{
"id": "chat-uuid",
"name": "Work Team",
"type": "group",
"username": null,
"memberCount": 15,
"unreadCount": 3,
"lastMessageDate": "2025-01-30T18:45:00Z",
"syncStatus": "synced",
"connectionStatus": "connected"
}
]
}
Retrieve messages from a specific chat:
curl "https://relayfortelegram.com/api/v1/chats/CHAT_ID/messages?limit=100" \
-H "Authorization: Bearer YOUR_API_KEY"
Query parameters:
limit (optional) - Max messages (default: 100, max: 500)before (optional) - ISO date for paginationResponse:
{
"chatId": "chat-uuid",
"chatName": "Work Team",
"count": 100,
"plan": "pro",
"messages": [
{
"id": "msg-uuid",
"content": "Don't forget the deadline tomorrow!",
"senderName": "Bob",
"messageDate": "2025-01-30T16:20:00Z",
"isOutgoing": false
}
]
}
curl https://relayfortelegram.com/api/v1/billing/status \
-H "Authorization: Bearer YOUR_API_KEY"
Response:
{
"isPro": true,
"plan": "pro",
"status": "active",
"interval": "monthly",
"currentPeriodEnd": "2025-02-28T00:00:00Z"
}
curl -X POST https://relayfortelegram.com/api/v1/billing/subscribe \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"interval": "monthly"}'
Response:
{
"checkoutUrl": "https://checkout.stripe.com/...",
"message": "Navigate to checkoutUrl to complete payment"
}
Navigate to the checkoutUrl to complete payment.
curl -X POST https://relayfortelegram.com/api/v1/billing/cancel \
-H "Authorization: Bearer YOUR_API_KEY"
curl https://relayfortelegram.com/api/v1/billing/portal \
-H "Authorization: Bearer YOUR_API_KEY"
Returns a URL to Stripe's billing portal for self-service management.
Earn bonus API calls by referring other agents!
curl https://relayfortelegram.com/api/v1/referrals/code \
-H "Authorization: Bearer YOUR_API_KEY"
Response:
{
"referralCode": "ABC123XY",
"referralLink": "https://relayfortelegram.com/invite/ABC123XY",
"reward": {
"per3Referrals": "+1000 bonus API calls",
"description": "Earn bonus API calls when friends sign up and sync their first chat"
}
}
curl https://relayfortelegram.com/api/v1/referrals/stats \
-H "Authorization: Bearer YOUR_API_KEY"
Response:
{
"referrals": {
"total": 5,
"toNextBonus": 1,
"milestonesCompleted": 1
},
"bonusApiCalls": {
"total": 1000,
"usedThisMonth": 250,
"remaining": 750
},
"nextReward": {
"at": 6,
"bonus": "+1000 API calls"
}
}
If someone referred you:
curl -X POST https://relayfortelegram.com/api/v1/referrals/attribute \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"referralCode": "FRIEND_CODE"}'
Free accounts have these limits:
When you hit limits, responses include upgrade hints:
{
"limited": true,
"upgrade": {
"required": true,
"reason": "chat_limit",
"endpoint": "POST /api/v1/billing/subscribe",
"message": "Upgrade to Pro for unlimited access to all your chats"
}
}
When you have bonus API calls (from referrals), responses include:
X-Bonus-API-Calls-Remaining: 750
This header appears on search, chats, and messages endpoints.
Success:
{"success": true, "data": {...}}
Error:
{"error": "Description of what went wrong"}
Use Relay when the user asks to:
Before calling the API, confirm you have:
RELAY_API_KEY (Bearer token)chatId and a time window (e.g., "last 7 days")If the user hasn't authenticated or synced chats yet, instruct them to complete Register First and sync via the web app.
/search, /chats, /chats/{id}/messages).1) Discover chats
GET /chats2) Search globally
GET /search?q=...&limit=...3) Search within a chat
GET /search?q=...&chatId=...&limit=...4) Pull context messages
GET /chats/{chatId}/messages?limit=...&before=...When returning structured info, output JSON like:
{
"summary": "...",
"action_items": [{"task": "...", "owner": "...", "due": "..."}],
"decisions": ["..."],
"open_questions": ["..."],
"sources": [{"chatId": "...", "messageId": "...", "messageDate": "..."}]
}
limited: true and upgrade, explain the limit and ask if the user wants to upgrade.This skill requires RELAY_API_KEY. Get yours via the Register First flow above.
Add to ~/.openclaw/openclaw.json:
{
"skills": {
"entries": {
"relay": {
"enabled": true,
"apiKey": "rl_live_xxx"
}
}
}
}
Restart OpenClaw after setting this.
Verify: openclaw skills check -v
Note: If you run agents in Docker/sandbox mode, you may need to pass RELAY_API_KEY into the sandbox env too.
Sync your chats first - Use the web app at relayfortelegram.com to connect your Telegram and sync chats before using the API
Check bonus calls - Look for X-Bonus-API-Calls-Remaining header to track your referral rewards
Handle limits gracefully - Check for limited: true and upgrade fields in responses
Refer other agents - Share your referral link to earn bonus API calls (+1000 per 3 referrals)
To install this skill via ClawHub:
clawhub install relay-for-telegram