[REPLACE:SKILLNAME]

anajuliabit2026-10-25查看 1047复制 1493

用于[REPLACE: TOKEN_SYMBOL]的价格和成交量追踪器,当波动超过[REPLACE: ALERT_THRESHOLD_PCT]%时发出异常警报

Download (.md)

📘如何使用这个技能

  1. 1
    复制技能内容·点击上方「Copy SKILL.md」复制全部内容,或 Download 下载到本地
  2. 2
    打开你的 AI 客户端·支持 Claude Code、Trae、Cursor、ChatGPT、DeepSeek、Kimi 等任意 AI 助手
  3. 3
    粘贴为系统提示/知识文件·Claude Code:放入 .claude/skills/ 目录;普通对话:作为首条消息发送并说「请严格按这份技能文档执行」
  4. 4
    直接提出你的需求·AI 会按技能定义的工作流、格式和约束来处理,无需再解释背景

💡 提示:技能生效后,每次对话只需一句需求,AI 会按 SKILL.md 的流程执行。

SKILL.md2571 chars
---
name: [REPLACE: SKILL_NAME]
category: crypto
description: Price and volume tracker for [REPLACE: TOKEN_SYMBOL] with anomaly alerts above [REPLACE: ALERT_THRESHOLD_PCT]% movement
var: ""
tags: [crypto]
requires: [COINGECKO_API_KEY?]
---

> **${var}** — Optional. Pass a different CoinGecko ID to override the default. If empty, tracks the configured token.

Today is ${today}. Track [REPLACE: TOKEN_SYMBOL] price/volume and alert on anomalies.

## Steps

1. **Fetch current state** — query CoinGecko for the latest price, 24h change, 24h volume. Use `COINGECKO_API_KEY` if set, else the keyless endpoint:

   ```bash
   ID="${var:-[REPLACE: COINGECKO_ID]}"
   if [ -n "${COINGECKO_API_KEY:-}" ]; then
     URL="https://pro-api.coingecko.com/api/v3/simple/price?ids=$ID&vs_currencies=usd&include_24hr_change=true&include_24hr_vol=true"
     curl -sf -H "x-cg-pro-api-key: $COINGECKO_API_KEY" "$URL" > .token-cache.json
   else
     URL="https://api.coingecko.com/api/v3/simple/price?ids=$ID&vs_currencies=usd&include_24hr_change=true&include_24hr_vol=true"
     curl -sf "$URL" > .token-cache.json
   fi
   ```

   If `curl` fails (sandbox blocks outbound), use **WebFetch** on the same URL as a fallback.

2. **Read prior state** — last 7 days of `memory/logs/YYYY-MM-DD.md` for previous prices and volumes (parse lines like `**[REPLACE: TOKEN_SYMBOL]**: price=$N, volume_24h=$N`).

3. **Detect anomalies** — flag if `|price_change_24h| >= [REPLACE: ALERT_THRESHOLD_PCT]%` OR if 24h volume is `>= 2x` the 7-day median.

4. **Write `articles/[REPLACE: SKILL_NAME]-${today}.md`** with:
   - Current price, 24h change, 24h volume
   - 7-day price chart (sparkline as `▁▂▃▅▇` characters)
   - Anomaly verdict: `QUIET` / `STEADY` / `ANOMALY` (and which fired)
   - Links: CoinGecko page, Etherscan / explorer page if you know the contract address

5. **Notify** — if `ANOMALY`, send via `./notify` with the verdict + 1-2 sentences of context. Stay silent on QUIET/STEADY days.

6. **Log** — append to `memory/logs/${today}.md`:
   ```
   ## [REPLACE: SKILL_NAME]
   - **[REPLACE: TOKEN_SYMBOL]**: price=$N, change_24h=$N%, volume_24h=$N
   - **Verdict**: QUIET | STEADY | ANOMALY:price | ANOMALY:volume
   ```

## Sandbox note

CoinGecko's keyless endpoint occasionally rate-limits. WebFetch is the fallback when `curl` fails — it bypasses the sandbox network gate.

## Constraints

- Never spam. The `ALERT_THRESHOLD_PCT` gate is there to protect channel signal — don't lower it below 5%.
- Always cite sources in the article. Even a one-line link is better than no link.
来源:skillsdirectory

评论0

登录后参与评论

还没有评论,来抢沙发吧