sky

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Sky Knowledge Base

Sky知识库

Registry

注册表

<!-- Updated by /sky setup — do not edit manually -->
(Not configured yet. Ask a question or run
/sky sync
to set up.)
<!-- 由/sky setup更新——请勿手动编辑 -->
(尚未配置。请提问或运行
/sky sync
进行设置。)

Routing

路由规则

Parse the user's input to determine the subcommand:
  • sync
    Sync flow
  • add repo <url>
    Add Repo flow
  • remove repo <name>
    Remove Repo flow
  • Anything else → Search flow (default)
Do not announce which flow you are running. Just execute it.

解析用户输入以确定子命令:
  • sync
    同步流程
  • add repo <url>
    添加仓库流程
  • remove repo <name>
    移除仓库流程
  • 其他任何输入 → 搜索流程(默认)
请勿告知用户你正在运行哪个流程,直接执行即可。

Setup flow

设置流程

Triggered automatically when the Registry section above says "Not configured yet" and the user runs any command.
  1. Ask where to store the KB using AskUserQuestion — suggest
    ~/sky-kb
    as the default (with the user's actual home directory expanded). Let the user pick or type a custom path.
  2. Clone the repo if the path doesn't exist:
    bash
    git clone https://github.com/arcniko/sky-kb.git <path>
  3. Ask which bundle to install using AskUserQuestion with these options:
    • All (Recommended) — all categories + Atlas (~41 repos). "Full picture: governance, technical, everything."
    • Core — Atlas + protocol docs + core contracts (~18 repos). "Essential protocol documentation."
    • Technical — Core + Spark, Grove, keepers, migration, endgame (~29 repos). "Developer-focused: all code repos, skip governance/community."
  4. Map the bundle to category IDs:
    • All →
      ["laniakea", "core-protocol", "spark", "grove", "migration", "endgame", "keepers", "governance"]
    • Core →
      ["laniakea", "core-protocol"]
    • Technical →
      ["laniakea", "core-protocol", "spark", "grove", "migration", "endgame", "keepers"]
  5. Write
    <path>/.kb_config.json
    :
    json
    {"preset": "sky", "categories": [...selected IDs...], "custom_repos": [], "atlas": true}
  6. Update the Registry section in this SKILL.md — replace the placeholder text with
    <path>
    using the Edit tool.
  7. Run sync:
    bash
    python3 <path>/scripts/sync.py --kb-path <path>
  8. If the user had a question, continue to the Search flow to answer it.

当上方的注册表部分显示“尚未配置”且用户运行任何命令时,自动触发此流程。
  1. 使用AskUserQuestion询问知识库存储位置——建议默认路径为
    ~/sky-kb
    (需替换为用户实际的主目录)。允许用户选择或输入自定义路径。
  2. 若路径不存在则克隆仓库
    bash
    git clone https://github.com/arcniko/sky-kb.git <path>
  3. 使用AskUserQuestion询问要安装的捆绑包,提供以下选项:
    • 全部(推荐) —— 所有分类 + Atlas(约41个仓库)。“完整覆盖:治理、技术及所有内容。”
    • 核心 —— Atlas + 协议文档 + 核心合约(约18个仓库)。“核心协议文档。”
    • 技术 —— 核心 + Spark、Grove、keepers、migration、endgame(约29个仓库)。“开发者聚焦:所有代码仓库,跳过治理/社区内容。”
  4. 将捆绑包映射到分类ID
    • 全部 →
      ["laniakea", "core-protocol", "spark", "grove", "migration", "endgame", "keepers", "governance"]
    • 核心 →
      ["laniakea", "core-protocol"]
    • 技术 →
      ["laniakea", "core-protocol", "spark", "grove", "migration", "endgame", "keepers"]
  5. 写入
    <path>/.kb_config.json
    json
    {"preset": "sky", "categories": [...selected IDs...], "custom_repos": [], "atlas": true}
  6. 更新本SKILL.md中的注册表部分——使用编辑工具将占位文本替换为
    <path>
  7. 运行同步
    bash
    python3 <path>/scripts/sync.py --kb-path <path>
  8. 如果用户原本有问题,继续执行搜索流程来回答。

Search flow

搜索流程

  1. Resolve KB path from the Registry section above. If it says "Not configured yet" → trigger Setup flow automatically.
  2. Read
    <kb-path>/DIRECTORY.md
    to understand what content exists and where.
  3. Target your search — based on DIRECTORY.md, identify the most relevant subdirectories for the question. Grep within those specific directories rather than all of
    content/
    .
  4. Read matching files to find the answer.
  5. For Atlas results: also read the parent scope file for broader context.
  6. For protocol questions: prioritize
    laniakea-docs
    (current), then
    mcd-docs-content
    (legacy).
  7. For smart contract address lookups: read
    <kb-path>/content/chainlog-ui/api/mainnet/active.json
    — this is the live chainlog with all current contract addresses.
  8. Search the forum — if local KB results are incomplete, or the question is about governance discussions/proposals/community sentiment, also search the Sky forum:
    • Use WebFetch to call
      https://sky-forum-proxy.skynav.workers.dev/search?q=<query>&max=5
      with prompt "Return the raw JSON"
    • If a topic looks highly relevant, fetch full content:
      https://sky-forum-proxy.skynav.workers.dev/topic/<id>
      with prompt "Return the raw JSON"
    • For "latest", "recent", or "what's new" questions: call
      https://sky-forum-proxy.skynav.workers.dev/latest?max=5
      first, then fetch full content for the most relevant topics via
      /topic/<id>
    • Skip if local KB already provides a complete, authoritative answer
  1. 从上方的注册表部分解析知识库路径。若显示“尚未配置”→自动触发设置流程。
  2. **读取
    <kb-path>/DIRECTORY.md
    **以了解现有内容及其位置。
  3. 定位搜索目标——根据DIRECTORY.md,确定与问题最相关的子目录。仅在这些特定目录中使用Grep搜索,而非整个
    content/
    目录。
  4. 读取匹配文件以找到答案。
  5. 对于Atlas结果:同时读取父范围文件以获取更广泛的上下文。
  6. 对于协议相关问题:优先使用
    laniakea-docs
    (当前版本),其次是
    mcd-docs-content
    (旧版本)。
  7. 对于智能合约地址查询:读取
    <kb-path>/content/chainlog-ui/api/mainnet/active.json
    ——这是包含所有当前合约地址的实时chainlog。
  8. 搜索论坛——若本地知识库结果不完整,或问题涉及治理讨论/提案/社区意见,同时搜索Sky论坛:
    • 使用WebFetch调用
      https://sky-forum-proxy.skynav.workers.dev/search?q=<query>&max=5
      ,提示语为“返回原始JSON”
    • 若某个主题看起来高度相关,获取完整内容:
      https://sky-forum-proxy.skynav.workers.dev/topic/<id>
      ,提示语为“返回原始JSON”
    • 对于“最新”、“近期”或“新动态”类问题:先调用
      https://sky-forum-proxy.skynav.workers.dev/latest?max=5
      ,然后通过
      /topic/<id>
      获取最相关主题的完整内容
    • 若本地知识库已提供完整、权威的答案,则跳过此步骤

How to answer

回答方式

  • Be specific and cite your sources (Atlas formal ID like
    A.1.2.3
    , or file path for repo docs)
  • Quote relevant passages when helpful
  • When citing forum results, include the topic title and link to the discussion
  • Forum posts are community discussion, not official protocol policy — note this distinction when relevant
  • If the content doesn't contain an answer, say so clearly

  • 回答需具体,并注明来源(如Atlas正式ID
    A.1.2.3
    ,或仓库文档的文件路径)
  • 必要时引用相关段落
  • 引用论坛结果时,需包含主题标题和讨论链接
  • 论坛帖子属于社区讨论,并非官方协议政策——相关情况下需注明此区别
  • 若内容中没有答案,请明确告知用户

Sync flow

同步流程

  1. Resolve KB path from the Registry section above. If it says "Not configured yet" → trigger Setup flow.
  2. Run:
    bash
    python3 <kb-path>/scripts/sync.py --kb-path <kb-path>
  3. Summarize concisely — only mention what changed:
    • Atlas: "updated" or "already up to date"
    • Repos: if ≤5 updated, list their names; if >5, just show the count (e.g. "12 repos updated")
    • If nothing changed: "Everything up to date."
  4. If errors occurred, show them and suggest fixes.

  1. 从上方的注册表部分解析知识库路径。若显示“尚未配置”→触发设置流程。
  2. 运行:
    bash
    python3 <kb-path>/scripts/sync.py --kb-path <kb-path>
  3. 简洁总结——仅提及变更内容:
    • Atlas:“已更新”或“已是最新版本”
    • 仓库:若更新数量≤5,列出仓库名称;若>5,仅显示数量(例如“12个仓库已更新”)
    • 若无变更:“所有内容均为最新版本。”
  4. 若出现错误,显示错误信息并建议修复方案。

Add Repo flow

添加仓库流程

  1. Parse arguments — extract repo URL (required), name (optional, derive from URL), description (optional, ask user).
  2. Resolve KB path from the Registry section above. If it says "Not configured yet" → trigger Setup flow first.
  3. Validate — run
    git ls-remote <url> HEAD
    to confirm accessibility.
  4. Read
    <kb-path>/.kb_config.json
    — check
    custom_repos
    for duplicates.
  5. Add to config — append to the
    custom_repos
    array in
    .kb_config.json
    .
  6. Run sync to clone the new repo.
  7. Report what was added.

  1. 解析参数——提取仓库URL(必填)、名称(可选,从URL推导)、描述(可选,询问用户)。
  2. 从上方的注册表部分解析知识库路径。若显示“尚未配置”→先触发设置流程。
  3. 验证——运行
    git ls-remote <url> HEAD
    以确认仓库可访问。
  4. 读取
    <kb-path>/.kb_config.json
    ——检查
    custom_repos
    中是否存在重复项。
  5. 添加到配置——将条目追加到
    .kb_config.json
    custom_repos
    数组中。
  6. 运行同步以克隆新仓库。
  7. 报告已添加的内容。

Remove Repo flow

移除仓库流程

  1. Parse the repo name from arguments.
  2. Resolve KB path from the Registry section above.
  3. Read
    <kb-path>/.kb_config.json
    — find the repo in
    custom_repos
    .
    • If not found there, check if it's a preset repo. If so, tell the user to remove the category instead.
  4. Remove from config — edit
    .kb_config.json
    to remove the entry.
  5. Delete content:
    rm -rf <kb-path>/content/<name>
  6. Run sync to regenerate DIRECTORY.md.
  7. Report what was removed.
  1. 从参数中解析仓库名称
  2. 从上方的注册表部分解析知识库路径
  3. 读取
    <kb-path>/.kb_config.json
    ——在
    custom_repos
    中查找该仓库。
    • 若未找到,检查是否为预设仓库。若是,告知用户需移除对应的分类。
  4. 从配置中移除——编辑
    .kb_config.json
    删除该条目。
  5. 删除内容
    rm -rf <kb-path>/content/<name>
  6. 运行同步以重新生成DIRECTORY.md。
  7. 报告已移除的内容。