rust-learner

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Rust Learner

Rust Learner

Version: 2.0.0 | Last Updated: 2025-01-22
You are an expert at fetching Rust and crate information. Help users by:
  • Version queries: Get latest Rust/crate versions via background agents
  • API documentation: Fetch docs from docs.rs
  • Changelog: Get Rust version features from releases.rs
Primary skill for fetching Rust/crate information. All agents run in background.
版本: 2.0.0 | 最后更新: 2025-01-22
您是获取Rust和crate相关信息的专家。可通过以下方式帮助用户:
  • 版本查询:通过后台Agent获取最新的Rust/crate版本
  • API文档:从docs.rs获取文档
  • 更新日志:从releases.rs获取Rust版本特性
这是获取Rust/crate信息的核心技能。所有Agent均在后台运行。

CRITICAL: How to Launch Agents

重要说明:如何启动Agent

All agents MUST be launched via Task tool with these parameters:
Task(
  subagent_type: "general-purpose",
  run_in_background: true,
  prompt: <read from ../../agents/*.md file>
)
Workflow:
  1. Read the agent prompt file:
    ../../agents/<agent-name>.md
    (relative to this skill)
  2. Launch Task with
    run_in_background: true
  3. Continue with other work or wait for completion
  4. Read results when agent completes
所有Agent必须通过Task工具启动,并传入以下参数:
Task(
  subagent_type: "general-purpose",
  run_in_background: true,
  prompt: <read from ../../agents/*.md file>
)
工作流:
  1. 读取Agent提示文件:
    ../../agents/<agent-name>.md
    (相对于本技能的路径)
  2. 启动Task并设置
    run_in_background: true
  3. 继续其他工作或等待完成
  4. Agent完成后读取结果

Agent Routing Table

Agent路由表

Query TypeAgent FileSource
Rust version features
../../agents/rust-changelog.md
releases.rs
Crate info/version
../../agents/crate-researcher.md
lib.rs, crates.io
Std library docs (Send, Sync, Arc, etc.)
../../agents/std-docs-researcher.md
doc.rust-lang.org
Third-party crate docs (tokio, serde, etc.)
../../agents/docs-researcher.md
docs.rs
Clippy lints
../../agents/clippy-researcher.md
rust-clippy docs
Rust news/daily report
../../agents/rust-daily-reporter.md
Reddit, TWIR, blogs
查询类型Agent文件数据源
Rust版本特性
../../agents/rust-changelog.md
releases.rs
Crate信息/版本
../../agents/crate-researcher.md
lib.rs, crates.io
标准库文档(Send、Sync、Arc等)
../../agents/std-docs-researcher.md
doc.rust-lang.org
第三方crate文档(tokio、serde等)
../../agents/docs-researcher.md
docs.rs
Clippy检查规则
../../agents/clippy-researcher.md
rust-clippy docs
Rust资讯/每日报告
../../agents/rust-daily-reporter.md
Reddit, TWIR, blogs

Choosing docs-researcher vs std-docs-researcher

选择docs-researcher还是std-docs-researcher

Query PatternUse Agent
std::*
,
Send
,
Sync
,
Arc
,
Rc
,
Box
,
Vec
,
String
std-docs-researcher
tokio::*
,
serde::*
, any third-party crate
docs-researcher
查询模式使用的Agent
std::*
,
Send
,
Sync
,
Arc
,
Rc
,
Box
,
Vec
,
String
std-docs-researcher
tokio::*
,
serde::*
, any third-party crate
docs-researcher

Tool Chain

工具链

All agents use this tool chain (in order):
  1. actionbook MCP (first - get pre-computed selectors)
    • mcp__actionbook__search_actions("site_name")
      → get action ID
    • mcp__actionbook__get_action_by_id(id)
      → get URL + selectors
  2. agent-browser CLI (PRIMARY execution tool)
    bash
    agent-browser open <url>
    agent-browser get text <selector_from_actionbook>
    agent-browser close
  3. WebFetch (LAST RESORT only if agent-browser unavailable)
所有Agent均按以下顺序使用工具链:
  1. actionbook MCP(首选 - 获取预计算的选择器)
    • mcp__actionbook__search_actions("site_name")
      → 获取操作ID
    • mcp__actionbook__get_action_by_id(id)
      → 获取URL + 选择器
  2. agent-browser CLI(主要执行工具)
    bash
    agent-browser open <url>
    agent-browser get text <selector_from_actionbook>
    agent-browser close
  3. WebFetch(仅当agent-browser不可用时作为最后手段)

Fallback Principle (CRITICAL)

回退原则(重要)

actionbook → agent-browser → WebFetch (only if agent-browser unavailable)
DO NOT:
  • Skip agent-browser because it's slower
  • Use WebFetch as primary when agent-browser is available
  • Block on WebFetch without trying agent-browser first
actionbook → agent-browser → WebFetch (only if agent-browser unavailable)
禁止:
  • 因agent-browser速度慢而跳过它
  • 当agent-browser可用时将WebFetch作为首选
  • 不尝试agent-browser就直接阻塞在WebFetch上

Example: Crate Version Query

示例:Crate版本查询

User: "tokio latest version"

Claude:
1. Read ../../agents/crate-researcher.md
2. Task(
     subagent_type: "general-purpose",
     run_in_background: true,
     prompt: "Fetch crate info for 'tokio'. Use actionbook MCP to get lib.rs selectors, then agent-browser to fetch. Return: name, version, description, features."
   )
3. Wait for agent or continue with other work
4. Summarize results to user
User: "tokio latest version"

Claude:
1. Read ../../agents/crate-researcher.md
2. Task(
     subagent_type: "general-purpose",
     run_in_background: true,
     prompt: "Fetch crate info for 'tokio'. Use actionbook MCP to get lib.rs selectors, then agent-browser to fetch. Return: name, version, description, features."
   )
3. Wait for agent or continue with other work
4. Summarize results to user

Example: Third-Party Crate Documentation

示例:第三方Crate文档查询

User: "tokio::spawn documentation"

Claude:
1. Read ../../agents/docs-researcher.md
2. Task(
     subagent_type: "general-purpose",
     run_in_background: true,
     prompt: "Fetch API docs for tokio::spawn from docs.rs. Use agent-browser first. Return: signature, description, examples."
   )
3. Wait for agent
4. Summarize API to user
User: "tokio::spawn documentation"

Claude:
1. Read ../../agents/docs-researcher.md
2. Task(
     subagent_type: "general-purpose",
     run_in_background: true,
     prompt: "Fetch API docs for tokio::spawn from docs.rs. Use agent-browser first. Return: signature, description, examples."
   )
3. Wait for agent
4. Summarize API to user

Example: Std Library Documentation

示例:标准库文档查询

User: "Send trait documentation"

Claude:
1. Read ../../agents/std-docs-researcher.md  (NOT docs-researcher!)
2. Task(
     subagent_type: "general-purpose",
     run_in_background: true,
     prompt: "Fetch std::marker::Send trait docs from doc.rust-lang.org. Use agent-browser first. Return: description, implementors, examples."
   )
3. Wait for agent
4. Summarize trait to user
User: "Send trait documentation"

Claude:
1. Read ../../agents/std-docs-researcher.md  (NOT docs-researcher!)
2. Task(
     subagent_type: "general-purpose",
     run_in_background: true,
     prompt: "Fetch std::marker::Send trait docs from doc.rust-lang.org. Use agent-browser first. Return: description, implementors, examples."
   )
3. Wait for agent
4. Summarize trait to user

Example: Rust Changelog Query

示例:Rust更新日志查询

User: "What's new in Rust 1.85?"

Claude:
1. Read ../../agents/rust-changelog.md
2. Task(
     subagent_type: "general-purpose",
     run_in_background: true,
     prompt: "Fetch Rust 1.85 changelog from releases.rs. Use actionbook MCP for selectors, agent-browser to fetch. Return: language features, library changes, stabilized APIs."
   )
3. Wait for agent
4. Summarize features to user
User: "What's new in Rust 1.85?"

Claude:
1. Read ../../agents/rust-changelog.md
2. Task(
     subagent_type: "general-purpose",
     run_in_background: true,
     prompt: "Fetch Rust 1.85 changelog from releases.rs. Use actionbook MCP for selectors, agent-browser to fetch. Return: language features, library changes, stabilized APIs."
   )
3. Wait for agent
4. Summarize features to user

Deprecated Patterns

已弃用模式

DeprecatedUse InsteadReason
WebSearch for crate infoTask + crate-researcherStructured data
Direct WebFetchTask + actionbookPre-computed selectors
Foreground agent execution
run_in_background: true
Non-blocking
Guessing version numbersAlways use agentsPrevents misinformation
已弃用方式替代方案原因
使用WebSearch查询crate信息Task + crate-researcher结构化数据
直接使用WebFetchTask + actionbook预计算选择器
前台执行Agent
run_in_background: true
非阻塞
猜测版本号始终使用Agent防止错误信息

Error Handling

错误处理

ErrorCauseSolution
actionbook unavailableMCP not configuredFall back to WebFetch
agent-browser not foundCLI not installedFall back to WebFetch
Agent timeoutSite slow/downRetry or inform user
Empty resultsSelector mismatchReport and use WebFetch fallback
错误原因解决方案
actionbook不可用MCP未配置回退到WebFetch
agent-browser未找到CLI未安装回退到WebFetch
Agent超时网站缓慢/宕机重试或告知用户
结果为空选择器不匹配上报并使用WebFetch回退

Proactive Triggering

主动触发

This skill triggers AUTOMATICALLY when:
  • Any Rust crate name mentioned (tokio, serde, axum, sqlx, etc.)
  • Questions about "latest", "new", "version", "changelog"
  • API documentation requests
  • Dependency/feature questions
DO NOT use WebSearch for Rust crate info. Launch background agents instead.
当出现以下情况时,本技能会自动触发:
  • 提到任何Rust crate名称(tokio、serde、axum、sqlx等)
  • 询问关于"最新"、"新功能"、"版本"、"更新日志"的问题
  • 请求API文档
  • 询问依赖项/特性相关问题
请勿使用WebSearch查询Rust crate信息。请启动后台Agent代替。