sorin-skill
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePre-flight Dependencies (auto-injected by Plugin Store CI)
预启动依赖项(由Plugin Store CI自动注入)
Run once per session before first use. These checks ensure required tools are installed.
首次使用前,每个会话运行一次。这些检查确保所需工具已安装。
Version check (auto-injected)
版本检查(自动注入)
AI Agent Instruction: Run this version check before executing any commands from this skill. If an update is applied, re-read this SKILL.md before proceeding — the instructions may have changed.
bash
undefinedAI Agent 指令:执行此技能的任何命令前,先运行此版本检查。如果应用了更新,请在继续操作前重新阅读本SKILL.md——说明内容可能已变更。
bash
undefinedCheck for skill updates (1-hour cache)
Check for skill updates (1-hour cache)
UPDATE_CACHE="$HOME/.plugin-store/update-cache/sorin-skill"
CACHE_MAX=3600
LOCAL_VER="1.0.0"
DO_CHECK=true
if [ -f "$UPDATE_CACHE" ]; then
CACHE_MOD=$(stat -f %m "$UPDATE_CACHE" 2>/dev/null || stat -c %Y "$UPDATE_CACHE" 2>/dev/null || echo 0)
NOW=$(date +%s)
AGE=$(( NOW - CACHE_MOD ))
[ "$AGE" -lt "$CACHE_MAX" ] && DO_CHECK=false
fi
if [ "$DO_CHECK" = true ]; then
REMOTE_VER=$(curl -sf --max-time 3 "https://raw.githubusercontent.com/okx/plugin-store/main/skills/sorin-skill/plugin.yaml" | grep '^version' | head -1 | tr -d '"' | awk '{print $2}')
if [ -n "$REMOTE_VER" ]; then
mkdir -p "$HOME/.plugin-store/update-cache"
echo "$REMOTE_VER" > "$UPDATE_CACHE"
fi
fi
REMOTE_VER=$(cat "$UPDATE_CACHE" 2>/dev/null || echo "$LOCAL_VER")
if [ "$REMOTE_VER" != "$LOCAL_VER" ]; then
echo "Update available: sorin-skill v$LOCAL_VER -> v$REMOTE_VER. Updating..."
npx skills add okx/plugin-store --skill sorin-skill --yes --global 2>/dev/null || true
echo "Updated sorin-skill to v$REMOTE_VER. Please re-read this SKILL.md."
fi
---UPDATE_CACHE="$HOME/.plugin-store/update-cache/sorin-skill"
CACHE_MAX=3600
LOCAL_VER="1.0.0"
DO_CHECK=true
if [ -f "$UPDATE_CACHE" ]; then
CACHE_MOD=$(stat -f %m "$UPDATE_CACHE" 2>/dev/null || stat -c %Y "$UPDATE_CACHE" 2>/dev/null || echo 0)
NOW=$(date +%s)
AGE=$(( NOW - CACHE_MOD ))
[ "$AGE" -lt "$CACHE_MAX" ] && DO_CHECK=false
fi
if [ "$DO_CHECK" = true ]; then
REMOTE_VER=$(curl -sf --max-time 3 "https://raw.githubusercontent.com/okx/plugin-store/main/skills/sorin-skill/plugin.yaml" | grep '^version' | head -1 | tr -d '"' | awk '{print $2}')
if [ -n "$REMOTE_VER" ]; then
mkdir -p "$HOME/.plugin-store/update-cache"
echo "$REMOTE_VER" > "$UPDATE_CACHE"
fi
fi
REMOTE_VER=$(cat "$UPDATE_CACHE" 2>/dev/null || echo "$LOCAL_VER")
if [ "$REMOTE_VER" != "$LOCAL_VER" ]; then
echo "Update available: sorin-skill v$LOCAL_VER -> v$REMOTE_VER. Updating..."
npx skills add okx/plugin-store --skill sorin-skill --yes --global 2>/dev/null || true
echo "Updated sorin-skill to v$REMOTE_VER. Please re-read this SKILL.md."
fi
---Sorin Skill
Sorin Skill
Overview
概述
Sorin Skill helps answer crypto-related questions about tokens, pools, chains, protocols, and projects through Sahara's Sorin DeFi AI Services Gateway.
It identifies the user's intent, selects the most relevant gateway endpoint, and returns concise, data-backed analysis with assumptions and risks.
Sorin Skill 借助Sahara的Sorin DeFi AI服务网关,帮助解答关于代币、资金池、区块链、协议和项目的加密货币相关问题。它识别用户意图,选择最相关的网关端点,并返回简洁、有数据支撑的分析,同时说明假设和风险。
Gateway
网关
- Base URL:
https://defi-tools-proxy.saharaa.info - API key env var:
DEFI_TOOLS_API_KEY - Auth header:
Authorization: Bearer ${DEFI_TOOLS_API_KEY} - Accept header:
accept: text/plain
Default request template:
bash
GET https://defi-tools-proxy.saharaa.info/<path>?<query>
Headers:
accept: text/plain
Authorization: Bearer ${DEFI_TOOLS_API_KEY}Pool analysis example:
bash
GET https://defi-tools-proxy.saharaa.info/pool/analysis?chain=Ethereum
Headers:
accept: text/plain
Authorization: Bearer ${DEFI_TOOLS_API_KEY}- 基础URL:
https://defi-tools-proxy.saharaa.info - API密钥环境变量:
DEFI_TOOLS_API_KEY - 认证请求头:
Authorization: Bearer ${DEFI_TOOLS_API_KEY} - 接受请求头:
accept: text/plain
默认请求模板:
bash
GET https://defi-tools-proxy.saharaa.info/<path>?<query>
Headers:
accept: text/plain
Authorization: Bearer ${DEFI_TOOLS_API_KEY}资金池分析示例:
bash
GET https://defi-tools-proxy.saharaa.info/pool/analysis?chain=Ethereum
Headers:
accept: text/plain
Authorization: Bearer ${DEFI_TOOLS_API_KEY}Quick Start
快速开始
- Run .
sorin-skill quickstart - Verify is set in the agent runtime.
DEFI_TOOLS_API_KEY - Check gateway connectivity using the pool analysis example.
- If successful, confirm Sorin Skill is ready and suggest a token, pool, chain, protocol, or project analysis prompt.
- If failed, return the gateway status and exact error message.
- 运行 。
sorin-skill quickstart - 验证 是否已在Agent运行时中设置。
DEFI_TOOLS_API_KEY - 使用资金池分析示例检查网关连通性。
- 如果成功,确认Sorin Skill已准备就绪,并建议用户输入代币、资金池、区块链、协议或项目的分析提示。
- 如果失败,返回网关状态和确切错误信息。
Intention Routing
意图路由
- Detect user intention from natural language.
- Select exactly one primary API first (add secondary APIs only when needed).
- Validate required inputs. If missing, ask only the minimum follow-up question.
- Call API and parse ,
success,data.error
- 从自然语言中检测用户意图。
- 首先选择恰好一个主API(仅在需要时添加次要API)。
- 验证所需输入。如果缺失,仅询问最必要的补充问题。
- 调用API并解析、
success、data字段。error
Intention -> API Mapping
意图 -> API映射
1) Token fundamentals / price / holders / technicals
1) 代币基本面/价格/持有者/技术指标
- API:
tokenTool - Use when: user asks token market analysis (macro liquidity + micro market structure).
- Input:
- (required): token symbol, e.g.
token_symbol,BTCETH - (optional, default
quote_currency): quote currency for the pairUSDT
- Request:
bash
GET https://defi-tools-proxy.saharaa.info/token/analysis?token_symbol=ETH"e_currency=USDT
Headers:
accept: text/plain
Authorization: Bearer ${DEFI_TOOLS_API_KEY}- API:
tokenTool - 适用场景:用户询问代币市场分析(宏观流动性+微观市场结构)。
- 输入参数:
- (必填):代币符号,例如
token_symbol、BTCETH - (可选,默认值
quote_currency):交易对的计价货币USDT
- 请求示例:
bash
GET https://defi-tools-proxy.saharaa.info/token/analysis?token_symbol=ETH"e_currency=USDT
Headers:
accept: text/plain
Authorization: Bearer ${DEFI_TOOLS_API_KEY}2) Yield/staking pool discovery and scoring
2) 收益/质押资金池发现与评分
- API:
poolTool - Use when: user asks where to stake, best APY pools, pool comparison, TVL/APY trends.
- Input (all optional filters):
- (optional): chain id string, e.g.
chain,156 - (optional): project slug, e.g.
project,lidoaave-v3 - (e.g.
protocol,lido)aave-v3 - (e.g.
token_symbol,ETH)USDC - (optional): unique pool identifier
pool_id - (optional): pool category filter
pool_category
- Request:
bash
GET https://defi-tools-proxy.saharaa.info/pool/analysis?chain=Ethereum&protocol=lido&token_symbol=ETH
Headers:
accept: text/plain
Authorization: Bearer ${DEFI_TOOLS_API_KEY}- API:
poolTool - 适用场景:用户询问质押地点、最佳APY资金池、资金池对比、TVL/APY趋势。
- 输入参数(均为可选筛选条件):
- (可选):区块链ID字符串,例如
chain、156 - (可选):项目别名,例如
project、lidoaave-v3 - (例如
protocol、lido)aave-v3 - (例如
token_symbol、ETH)USDC - (可选):唯一资金池标识符
pool_id - (可选):资金池类别筛选条件
pool_category
- 请求示例:
bash
GET https://defi-tools-proxy.saharaa.info/pool/analysis?chain=Ethereum&protocol=lido&token_symbol=ETH
Headers:
accept: text/plain
Authorization: Bearer ${DEFI_TOOLS_API_KEY}3) Chain-level DEX and TVL landscape
3) 区块链级DEX与TVL全景分析
- API:
chainTool - Use when: user asks chain DEX volume trends, TVL changes, protocol dominance on a chain.
- Input (optional, provide one when possible):
- (integer): chain id, e.g.
chainId1 - (string): chain name, e.g.
chainNameEthereum
- Request:
bash
GET https://defi-tools-proxy.saharaa.info/chain/analysis?chainName=Ethereum
Headers:
accept: text/plain
Authorization: Bearer ${DEFI_TOOLS_API_KEY}- API:
chainTool - 适用场景:用户询问区块链DEX交易量趋势、TVL变化、链上协议占比。
- 输入参数(可选,尽可能提供其中一项):
- (整数):区块链ID,例如
chainId1 - (字符串):区块链名称,例如
chainNameEthereum
- 请求示例:
bash
GET https://defi-tools-proxy.saharaa.info/chain/analysis?chainName=Ethereum
Headers:
accept: text/plain
Authorization: Bearer ${DEFI_TOOLS_API_KEY}4) Protocol-level financial analysis
4) 协议级财务分析
- API:
protocolTool - Use when: user asks protocol TVL/fees/revenue/capital flow and comprehensive metrics.
- Request:
bash
GET https://defi-tools-proxy.saharaa.info/protocol/analysis?protocol=aave
Headers:
accept: text/plain
Authorization: Bearer ${DEFI_TOOLS_API_KEY}- API:
protocolTool - 适用场景:用户询问协议TVL/手续费/收入/资金流及综合指标。
- 请求示例:
bash
GET https://defi-tools-proxy.saharaa.info/protocol/analysis?protocol=aave
Headers:
accept: text/plain
Authorization: Bearer ${DEFI_TOOLS_API_KEY}5) Prediction market and project outlook
5) 预测市场与项目前景
- API:
projectTool - Use when: user asks project odds, FDV expectations, short/long-term target prices, market sentiment for a project.
- Input:
- (required): project name, e.g.
projectNameberachain
- Request:
bash
GET https://defi-tools-proxy.saharaa.info/project/analysis?projectName=berachain
Headers:
accept: text/plain
Authorization: Bearer ${DEFI_TOOLS_API_KEY}- API:
projectTool - 适用场景:用户询问项目概率、FDV预期、短期/长期目标价格、项目市场情绪。
- 输入参数:
- (必填):项目名称,例如
projectNameberachain
- 请求示例:
bash
GET https://defi-tools-proxy.saharaa.info/project/analysis?projectName=berachain
Headers:
accept: text/plain
Authorization: Bearer ${DEFI_TOOLS_API_KEY}Output Style for End Users
面向终端用户的输出格式
Use this response structure:
- What I queried: API name and key parameters.
- Key findings: 3-5 bullets with metrics.
- Interpretation: trend/risk/opportunity in plain language.
- Actionable next step: one concrete follow-up.
- Confidence and caveats: missing fields, stale windows, low liquidity effects.
采用以下响应结构:
- 查询内容:API名称及关键参数。
- 核心发现:3-5条带指标的要点。
- 解读:用通俗易懂的语言说明趋势/风险/机遇。
- 可执行下一步:一个具体的后续建议。
- 可信度与注意事项:缺失字段、数据更新窗口、低流动性影响等。
Decision Heuristics
决策规则
- If question is asset-specific, start with .
tokenTool - If question is yield-focused, start with .
poolTool - If question is chain ecosystem-focused, use .
chainTool - If question is protocol financial health-focused, use .
protocolTool - If question is project narrative or valuation-focused, use .
projectTool
- 如果问题针对特定资产,优先使用。
tokenTool - 如果问题聚焦收益,优先使用。
poolTool - 如果问题关注区块链生态,使用。
chainTool - 如果问题聚焦协议财务健康,使用。
protocolTool - 如果问题关注项目叙事或估值,使用。
projectTool
Safety Rules
安全规则
- Never invent prices, holders, APY, TVL, or tx outcomes.
- If API returns failure, surface the exact reason and suggest one retry path.
- Ask follow-up questions only for missing required parameters.
- Keep chain IDs explicit when ambiguity exists.
- 切勿编造价格、持有者数量、APY、TVL或交易结果。
- 如果API返回失败,明确说明原因并提供一条重试路径。
- 仅在缺失必填参数时询问补充问题。
- 存在歧义时,明确标注区块链ID。