academy-skill
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseBinance Academy AI Skill
Binance Academy AI技能
Intent-driven educational content skill. Retrieve Glossary / Courses /
Learn & Earn / Articles from Binance Academy, present as concise paraphrased
answers with Academy links. Never investment advice.
基于意图的教育内容技能。从Binance Academy检索术语表/课程/学赚项目/文章,以简洁的改写答案呈现,并附带Academy链接。绝不提供投资建议。
When to Use
使用场景
| Intent | Trigger examples | Primary tool |
|---|---|---|
| 1. Knowledge Q&A | "What is X?", "Why does X happen?", "How does X work?" | |
| 2. Risk Education | leverage / borrowing / all-in / scams / "20x long" / "borrowing to trade" | |
| 3. Learning Plan | "I want to learn X", "X learning path", "build me a plan for X" | |
| 4. Learn & Earn | "Which courses have rewards?", "一文读懂 X", "What is X (TICKER)?" | |
Do NOT trigger for: account/login issues, trading execution ("buy 1 BTC
now"), price checks ("what's BTC price"), or small talk.
For ambiguous intent cases (e.g., "什么是 X" vs "20x 杠杆是什么" vs "20x
杠杆可以吗"), see .
references/intent-routing.md| 意图 | 触发示例 | 主要工具 |
|---|---|---|
| 1. 知识问答 | "What is X?", "Why does X happen?", "How does X work?" | |
| 2. 风险教育 | leverage / borrowing / all-in / scams / "20x long" / "borrowing to trade" | |
| 3. 学习计划 | "I want to learn X", "X learning path", "build me a plan for X" | |
| 4. 学赚项目 | "Which courses have rewards?", "一文读懂 X", "What is X (TICKER)?" | |
请勿触发的场景: 账户/登录问题、交易执行(“现在买1个BTC”)、价格查询(“BTC价格是多少”)或闲聊。
对于意图模糊的情况(例如“什么是 X” vs “20x杠杆是什么” vs “20x杠杆可以吗”),请查看 。
references/intent-routing.mdHow to Use
使用方法
1. Detect user language → lang
code
lang1. 检测用户语言 → lang
代码
langDefault: for Simplified Chinese, for English. Full 35-code list
in .
zhenreferences/languages.md默认:简体中文为 ,英文为 。完整的35种语言代码列表见 。
zhenreferences/languages.md2. Pick intent + call the script
2. 选择意图并调用脚本
All examples use (the only supported env). =
this skill's root directory (resolved by the runtime when the skill loads).
prodACADEMY_SKILL_DIRbash
undefined所有示例均使用 (唯一支持的环境)。 =
本技能的根目录(技能加载时由运行时自动解析)。
prodACADEMY_SKILL_DIRbash
undefinedIntent 1, 2 — Knowledge Q&A / Risk Education (parallel dispatch, recommended)
意图1、2 — 知识问答/风险教育(并行调度,推荐)
node "$ACADEMY_SKILL_DIR/scripts/academy-api.mjs" prod searchAll
'{"query":"gas fee","lang":"en","limit":3}'
'{"query":"gas fee","lang":"en","limit":3}'
node "$ACADEMY_SKILL_DIR/scripts/academy-api.mjs" prod searchAll
'{"query":"gas fee","lang":"en","limit":3}'
'{"query":"gas fee","lang":"en","limit":3}'
Intent 3 — Learning Plan (use a clean topic noun, NOT the full sentence)
意图3 — 学习计划(使用清晰的主题名词,而非完整句子)
node "$ACADEMY_SKILL_DIR/scripts/academy-api.mjs" prod getLearningPlan
'{"query":"DeFi","lang":"en","limit":3}'
'{"query":"DeFi","lang":"en","limit":3}'
node "$ACADEMY_SKILL_DIR/scripts/academy-api.mjs" prod getLearningPlan
'{"query":"DeFi","lang":"en","limit":3}'
'{"query":"DeFi","lang":"en","limit":3}'
Intent 4 Pattern A — explicit reward question
意图4模式A — 明确的奖励相关问题
node "$ACADEMY_SKILL_DIR/scripts/academy-api.mjs" prod searchLearnEarn
'{"query":"reward","lang":"en","limit":5}'
'{"query":"reward","lang":"en","limit":5}'
node "$ACADEMY_SKILL_DIR/scripts/academy-api.mjs" prod searchLearnEarn
'{"query":"reward","lang":"en","limit":5}'
'{"query":"reward","lang":"en","limit":5}'
Intent 4 Pattern B — L&E title format (searchAll catches L&E + verifies)
意图4模式B — 学赚项目标题格式(searchAll会检索学赚内容并验证)
node "$ACADEMY_SKILL_DIR/scripts/academy-api.mjs" prod searchAll
'{"query":"What is Turtle (TURTLE)?","lang":"en","limit":3}'
'{"query":"What is Turtle (TURTLE)?","lang":"en","limit":3}'
**`searchAll` response** — use these fields, ignore the rest:
- `best.source` — which endpoint won (`glossary`/`learnEarn`/`resource`/`articles`/`null`)
- `best.items[0]` — the top hit to format (already reordered by match quality)
- `best.matchTier` (0–3) — match-quality band:
- `>= 2` → good match, format the card. Tier 2 is reliable: structured
sources (glossary/learnEarn/resource) whose title is a true superset of
the query (adds a concept noun, e.g. `smart contract` → "Smart
Contract Wallet") are demoted to tier 1 in code, so a tier-2 hit is
either a clean multi-token title match or an articles long-form match.
- `<= 1` → weak match, retry with a clean English keyword (same `lang`)
- `-1` (`best.source == null`) → no hits, use No-Content template
- `glossary` / `learnEarn` / `resource` arrays — used to generate the "Next Step" suggestion; do NOT make extra API calls for it
- `articlesLangFallback` — `true` only when the user explicitly passed a
non-empty `lang` that the articles endpoint does not support (so
articles fell back to English); translate the distilled article back
to the user's language. `false` when `lang` was omitted/empty (no user
language to translate to).
**Query strategy — language-dependent default.**
- **English (and other Latin-script languages)**: *raw input first*.
Send the user's raw input as `query` (the script pre-processes: trim,
strip control chars, truncate to 200 chars). Only extract clean
keywords when raw input returns `matchTier <= 0` or `best.source ==
null`. Don't lowercase or translate upfront. Full fallback heuristics
in `references/query-extraction.md`.
- **Chinese and other CJK**: *extract keyword first*. CJK raw sentences
almost never hit — a 20-question zh sample showed **0/20 reached tier
≥ 2**. `plainto_tsquery('simple', ...)` does no CJK word segmentation
and ANDs every token (including question words like "什么是"), so a CJK
sentence rarely matches a short Academy title. **Default to extracting
the topic noun + translating to its canonical English term BEFORE the
first `searchAll` call** — do NOT first try the raw sentence and then
fall back (that wastes a full `searchAll` round-trip on a
near-guaranteed `tier <= 1`, and "default strategy never effective for
CJK" is exactly the problem this fixes). See `references/query-
extraction.md` §4 for the translation table.
- **Exception — bare CJK concept noun with no question words** (钱包,
智能合约, 工作量证明, 区块链): send it raw. Single-token CJK concept
nouns DO hit (tier 3) when the Academy has the translated glossary
entry, and skipping raw for them would lose the cleanest match. If
the raw noun returns `tier <= 1` or off-topic, fall back to the
English translation.
- **How to tell a sentence from a bare noun**: if the input contains
question/intent words (什么是 / 如何 / 为什么 / 可以吗 / 行吗 / 是不是 /
"is it safe" / "should I"), it's a sentence → extract keyword first.
If it's a noun or noun phrase with no question words, it's a bare
concept → try raw.
- For **risk-education** Chinese queries, skip straight to the
Risk-Education Term Map in `references/query-extraction.md` — the raw
sentence almost never hits and the correct fallback term is rarely the
literal translation (e.g. 杠杆 → `强制平仓` (zh) or `margin trading`
(en), NOT `leverage`).
**Intent 3 needs a clean topic noun upfront.** `getLearningPlan` with full
sentences like "I want to learn DeFi" rarely matches Module titles — extract
`DeFi` first. Intent 4 Pattern B (L&E title format) is the opposite — raw
input usually matches the L&E course title directly.node "$ACADEMY_SKILL_DIR/scripts/academy-api.mjs" prod searchAll
'{"query":"What is Turtle (TURTLE)?","lang":"en","limit":3}'
'{"query":"What is Turtle (TURTLE)?","lang":"en","limit":3}'
**`searchAll` 响应** — 使用以下字段,忽略其余字段:
- `best.source` — 匹配的数据源(`glossary`/`learnEarn`/`resource`/`articles`/`null`)
- `best.items[0]` — 用于格式化的最优匹配结果(已按匹配度排序)
- `best.matchTier` (0–3) — 匹配质量等级:
- `>= 2` → 匹配度良好,可格式化展示卡片。等级2为可靠匹配:结构化数据源(术语表/学赚项目/资源)的标题是查询词的真超集(例如`smart contract` → "Smart Contract Wallet")会在代码中降级为等级1,因此等级2的结果要么是清晰的多词标题匹配,要么是文章类的长文匹配。
- `<= 1` → 匹配度较弱,使用清晰的英文关键词重试(保持相同`lang`)
- `-1`(`best.source == null`)→ 无匹配结果,使用无内容模板
- `glossary` / `learnEarn` / `resource` 数组 — 用于生成“下一步”建议;请勿为此额外调用API
- `articlesLangFallback` — 仅当用户明确传入非空`lang`但文章接口不支持该语言时为`true`(此时文章会回退到英文);需将提取的英文文章内容翻译回用户语言。当`lang`未填写/为空时为`false`(无需翻译)。
**查询策略 — 基于语言的默认规则**
- **英文及其他拉丁语言**:*优先使用原始输入*。将用户的原始输入作为`query`发送(脚本会预处理:去除首尾空格、剥离控制字符、截断至200字符)。仅当原始输入返回`matchTier <= 0`或`best.source == null`时,才提取清晰关键词。请勿预先转为小写或翻译。完整的回退策略见 `references/query-extraction.md`。
- **中文及其他CJK语言**:*优先提取关键词*。CJK原始句子几乎无法匹配——20个中文测试问题的匹配结果为**0/20达到等级≥2**。`plainto_tsquery('simple', ...)` 不支持CJK分词,且会将每个 token(包括“什么是”等疑问词)进行逻辑与运算,因此CJK句子几乎无法匹配Academy的短标题。**默认策略:在首次调用`searchAll`前,先提取主题名词并转换为标准英文术语**——请勿先尝试原始句子再回退(这会浪费一次完整的`searchAll`调用,且几乎必然返回`等级<=1`,而“默认策略对CJK无效”正是需要解决的问题)。翻译对照表见 `references/query-extraction.md` 第4节。
- **例外情况 — 不带疑问词的CJK独立概念名词**(钱包、智能合约、工作量证明、区块链):直接发送原始内容。单token的CJK概念名词在Academy有对应的术语表条目时可以匹配(等级3),跳过原始内容会丢失最清晰的匹配结果。如果原始名词返回`等级<=1`或偏离主题,再回退使用英文翻译。
- **区分句子与独立名词**:如果输入包含疑问/意图词(什么是/如何/为什么/可以吗/行吗/是不是/"is it safe"/"should I"),则为句子→优先提取关键词。如果是不带疑问词的名词或名词短语,则为独立概念→尝试原始内容。
- 对于**风险教育类**中文查询,直接使用 `references/query-extraction.md` 中的风险教育术语映射表——原始句子几乎无法匹配,且正确的回退术语很少是字面翻译(例如“杠杆”→ `强制平仓`(中文)或 `margin trading`(英文),而非`leverage`)。
**意图3需要预先提供清晰的主题名词**。使用完整句子如“I want to learn DeFi”调用`getLearningPlan`几乎无法匹配模块标题——需先提取`DeFi`。意图4模式B(学赚项目标题格式)则相反——原始输入通常可以直接匹配学赚课程标题。3. Format the output
3. 输出格式化
Output direct markdown — no PRD table, no / /
labels. The LLM is a chat assistant; the user wants answers,
not a form.
Response:Button:Next Step:Every reply MUST:
- Answer in the user's language (Chinese question → Chinese prose). If
and
articlesLangFallback == true, translate the distilled English article back to the user's language.best.source == "articles" - Include at least one Academy URL from the API response
(/
pageUrl/courseUrl/moduleUrl). Never invent URLs.visitUrl - Paraphrase, never paste. Use /
excerpt/title/subTitle/briefas source. For longbodyTextOnlyHTML, use the script'scontenthelper:stripHtmlbashnode -e "import('$ACADEMY_SKILL_DIR/scripts/academy-api.mjs').then(m=>console.log(m.stripHtml('<p>...</p>')))" - Articles (when ): distill
best.source == "articles"(often 5K–50K chars) into 2–4 sentences that answer the user's query. Never paste raw body. Never reproduce the article's section structure.bodyTextOnly - Risk scenarios (Intent 2): always include a ⚠️ disclaimer block (see template below).
Missing-URL degradation (when has no usable URL). A
top-1 article with no (and no to fall back to)
happens ~27% of the time — some hits are not in the
public v2 search index, so all 3 resolution levels return empty. Since
rule 2 requires at least one Academy URL and rule "Never invent URLs"
forbids fabrication, this is a no-URL deadlock for the top-1 item.
Resolve it with this degradation ladder — pick the first option that
yields a usable URL, and use that item's content for the card body:
best.items[0]visitUrlarticlePathsearchArticles- — the runner-up articles in the same
best.items[1..]array. They are usually the same concept, one rank lower.best.items - Other sources' top items — ,
glossary[0],learnEarn[0](whichever has a non-emptyresource[0]). These are definitional/structured content, often a good alternative answer.pageUrl - No-Content template — if NO item across any source has a usable URL, use the No-Content template (see below). Do NOT present an article whose link is empty — the user cannot click through.
When you degrade to a runner-up / other source, paraphrase THAT item's
content (not the original top-1's) so the prose matches the link the
user will see. If the top-1 article had the best answer text but no link
and a runner-up has a link but weaker text, prefer the runner-up: a
clickable weaker answer beats a linkless strong answer (the URL is the
Academy attribution that makes the answer trustworthy).
Empty short fields: when / /
are all , the title link alone is sufficient — don't add placeholder
text like "Click to view details".
excerptsubTitlecourseDescriptionnullNo content (): use the No-Content template below.
Don't apologize; pivot to suggestions.
best.source == null输出直接的markdown格式——无需PRD表格、//等标签。LLM是聊天助手,用户需要的是答案,而非表单。
Response:Button:Next Step:每条回复必须满足:
- 使用用户的语言作答(中文问题→中文回答)。如果且
articlesLangFallback == true,需将提取的英文文章内容翻译回用户语言。best.source == "articles" - 至少包含一个API返回的Academy URL(/
pageUrl/courseUrl/moduleUrl)。绝不能编造URL。visitUrl - 改写内容,绝不直接粘贴。使用/
excerpt/title/subTitle/brief作为来源。对于较长的bodyTextOnlyHTML内容,使用脚本的content工具:stripHtmlbashnode -e "import('$ACADEMY_SKILL_DIR/scripts/academy-api.mjs').then(m=>console.log(m.stripHtml('<p>...</p>')))" - 文章类内容(当时):将
best.source == "articles"(通常为5K–50K字符)提炼为2–4个句子,直接回答用户的查询。绝不能粘贴原始内容,也不能复制文章的章节结构。bodyTextOnly - 风险场景(意图2):必须包含⚠️免责声明模块(见下方模板)。
无URL降级处理(当无可用URL时)。排名第一的文章无(且无可回退)的情况约占27%——部分匹配结果不在公开v2搜索索引中,因此三个解析层级均返回空值。由于规则2要求至少包含一个Academy URL,且“绝不能编造URL”规则禁止伪造,此时会出现顶级结果无URL的僵局。请按以下降级阶梯处理——选择第一个能获取可用URL的选项,并使用该条目的内容生成卡片主体:
best.items[0]visitUrlarticlePathsearchArticles- —
best.items[1..]数组中的次优文章。它们通常是同一概念,排名稍低。best.items - 其他数据源的顶级结果 — 、
glossary[0]、learnEarn[0](选择有非空resource[0]的数据源)。这些是定义类/结构化内容,通常是很好的替代答案。pageUrl - 无内容模板 — 如果所有数据源的条目均无可用URL,则使用下方的无内容模板。请勿展示无链接的文章——用户无法点击跳转。
当降级到次优结果/其他数据源时,需改写该条目的内容(而非原顶级结果的内容),确保文字与用户将看到的链接匹配。如果顶级文章的答案文本最优但无链接,而次优结果有链接但文本质量稍差,优先选择次优结果:可点击的稍差答案优于无链接的优质答案(URL是Academy的归属标识,能提升答案的可信度)。
短字段为空时:当//均为时,仅展示标题链接即可——无需添加“点击查看详情”等占位文本。
excerptsubTitlecourseDescriptionnull无内容():使用下方的无内容模板。无需道歉,转而提供建议。
best.source == null4. Output templates
4. 输出模板
Full before/after examples in . Compact forms:
references/output-format.mdIntent 1 — Knowledge Q&A:
markdown
**[<term>](<pageUrl>)**
<2-4 sentence paraphrased definition>
🔗 [<suggestion from searchAll's other sources>](<nextStepUrl>) ← optional, omit if emptyIntent 2 — Risk Education:
markdown
**⚠️ <risk pattern>**
<brief answer: what it is, how it works>
**Risk:** <quote from Academy content>
**Example:** <concrete numerical simulation, e.g., "20x leverage: a 5% adverse move can liquidate your position">
Safer next step: learn <topic> first → [<link text>](<pageUrl>)
> ⚠️ Educational content only, not investment advice. Crypto prices are volatile; you may lose your entire principal. Please understand the risks before deciding.Intent 3 — Learning Plan:
markdown
**<topic> · <Difficulty>**
<2-3 sentence overview>
**Day 1:** [Course title](courseUrl)
- [Module title](moduleUrl)
- [Module title](moduleUrl)
**Day 2:** [Course title](courseUrl)
- [Module title](moduleUrl)
Full track: [View learning path](<track pageUrl>)Day grouping: quick ("快速了解"/"brief") = 1 day, single Course + 3–5
Modules. Default (no signal) = 3 days, one Course/day, top 3–4 Modules
each. Systematic ("系统学习"/"systematically") = 5 days, one Course/day,
2–3 Modules each. Certificate ("证书"/"certificate") = 1 entry per
Course with ; mention LinkedIn eligibility if known.
(Matches the Day Grouping Guidance table in .)
courseUrlreferences/output-format.mdIntent 4 — Learn & Earn:
Pattern A (reward list — multiple courses):
markdown
**Academy Learn & Earn — Currently claimable rewards**
- [<courseTitle>](<pageUrl>) · 🟢 Active
- [<courseTitle>](<pageUrl>) · 🟢 Active
[View all campaigns](https://www.binance.com/<lang>/academy/learn-and-earn)Pattern B (single course):
markdown
**[<courseTitle>](<pageUrl>)**
<paraphrased courseDescription>
📅 <activityStartDate> ~ <activityEndDate> (UTC+8) · <🟢 Active / 🔴 Fully distributed / ⚪ Ended>
[View all campaigns](https://www.binance.com/<lang>/academy/learn-and-earn)Status logic:
→ 🟢 Active. → 🔴 Fully distributed.
→ ⚪ Ended. When no courses qualify: "No reward courses are currently
claimable. Academy frequently updates the Learn & Earn list — please check
back in a few days."
hasReward=="1" && isRewardRunOut!="1" && now<activityEndDateisRewardRunOut=="1"now>activityEndDateNo-Content template ():
best.source == nullmarkdown
Academy doesn't have content for "<query>" yet.
**Suggestions:**
- Try a related term, e.g., "<related term>"
- Try the English equivalent (Academy's English corpus is the largest), e.g., "<English term>"
- Browse [Academy](https://www.binance.com/<lang>/academy) directly完整的前后示例见 。简洁版如下:
references/output-format.md意图1 — 知识问答:
markdown
**[<术语>](<pageUrl>)**
<2-4句改写后的定义>
🔗 [<来自searchAll其他数据源的建议>](<nextStepUrl>) ← 可选,为空则省略意图2 — 风险教育:
markdown
**⚠️ <风险类型>**
<简短回答:定义及运作方式>
**风险提示:** <引用Academy内容>
**示例:** <具体数值模拟,例如“20倍杠杆:5%的反向波动即可平仓你的仓位”>
更安全的下一步:先学习<主题> → [<链接文本>](<pageUrl>)
> ⚠️ 仅为教育内容,非投资建议。加密货币价格波动剧烈,你可能损失全部本金。请在决策前充分了解风险。意图3 — 学习计划:
markdown
**<主题> · <难度>**
<2-3句概述>
**第1天:** [课程标题](courseUrl)
- [模块标题](moduleUrl)
- [模块标题](moduleUrl)
**第2天:** [课程标题](courseUrl)
- [模块标题](moduleUrl)
完整路径:[查看学习路径](<track pageUrl>)天数分组规则:快速了解("快速了解"/"brief")= 1天,单个课程+3–5个模块。默认(无明确信号)= 3天,每天一个课程,每个课程选前3–4个模块。系统学习("系统学习"/"systematically")= 5天,每天一个课程,每个课程选2–3个模块。证书类("证书"/"certificate")= 每个课程单独列出并附带;若已知可关联LinkedIn,请提及。
(与中的天数分组指南表一致。)
courseUrlreferences/output-format.md意图4 — 学赚项目:
模式A(奖励列表——多个课程):
markdown
**Academy学赚项目 — 当前可领取奖励**
- [<课程标题>](<pageUrl>) · 🟢 进行中
- [<课程标题>](<pageUrl>) · 🟢 进行中
[查看所有活动](https://www.binance.com/<lang>/academy/learn-and-earn)模式B(单个课程):
markdown
**[<课程标题>](<pageUrl>)**
<改写后的课程描述>
📅 <活动开始日期> ~ <活动结束日期> (UTC+8) · <🟢 进行中 / 🔴 奖励已领完 / ⚪ 已结束>
[查看所有活动](https://www.binance.com/<lang>/academy/learn-and-earn)状态逻辑:
→ 🟢 进行中。 → 🔴 奖励已领完。
→ ⚪ 已结束。当无符合条件的课程时:“当前无可领取奖励的课程。Academy会定期更新学赚项目列表——请几天后再查看。”
hasReward=="1" && isRewardRunOut!="1" && now<activityEndDateisRewardRunOut=="1"now>activityEndDate无内容模板():
best.source == nullmarkdown
Academy暂无“<查询词>”相关内容。
**建议:**
- 尝试相关术语,例如“<相关术语>”
- 尝试英文等效词(Academy的英文内容库最丰富),例如“<英文术语>”
- 直接浏览[Academy](https://www.binance.com/<lang>/academy)Safety Rules (MANDATORY)
安全规则(强制执行)
- No investment advice. Never say "you should buy/sell", "this is a good investment".
- No return promises. Never project yields, ROI, or expected gains.
- Risk content must cite Academy. Risk warnings must reference real
/
excerptfrom the API response. Don't invent risk statements.title - Mandatory disclaimer for risk scenarios. Every Intent 2 reply ends with the ⚠️ disclaimer shown in the Intent 2 template.
- No fabricated URLs. Only use API-returned URLs. If a URL field is null/empty, omit the link rather than guess.
- 禁止提供投资建议。绝不能说“你应该买/卖”、“这是好的投资”。
- 禁止承诺收益。绝不能预测收益率、ROI或预期收益。
- 风险内容必须引用Academy。风险提示必须引用API返回的真实/
excerpt内容。绝不能编造风险声明。title - 风险场景必须附带免责声明。每个意图2的回复必须以意图2模板中的⚠️免责声明结尾。
- 禁止编造URL。仅使用API返回的URL。如果URL字段为空/无值,省略链接而非猜测。
References (loaded on-demand)
参考文档(按需加载)
| File | When to load |
|---|---|
| Ambiguous intent — need positive/negative examples and tie-breaker rules |
| |
| Need full card templates with before/after examples |
| Intent 3 — need 3-step orchestration decision tree and edge cases |
| Need full request/response schema for all 6 endpoints |
| Need full 35-code lang list or 41 articles-supported codes |
| 文件 | 加载时机 |
|---|---|
| 意图模糊时——需要正/反示例及平局决胜规则 |
| 首次调用后 |
| 需要完整的卡片模板及前后示例时 |
| 意图3时——需要三步编排决策树及边缘案例处理 |
| 需要所有6个接口的完整请求/响应 schema 时 |
| 需要完整的35种语言代码列表或41种文章支持的语言代码时 |