Rust Skill Creator

作者 actionbook5c40d3ad7851无许可证1.5K 个星标收录于 2026年10月8日更新于 2026年10月8日仓库6周前更新

Use when creating skills for Rust crates or std library documentation. Keywords: create rust skill, create crate skill, create std skill, 创建 rust skill, 创建 crate skill, 创建 std skill, 动态 rust skill, 动态 crate skill, skill for tokio, skill for serde, skill for axum, generate rust skill, rust 技能, crate 技能, 从文档创建skill, from docs create skill

仅含说明AI & Agents
AI 生成的概览

通过抓取官方文档,创建用于记录 Rust crate 或标准库条目的智能体技能。

功能
该技能用于为 Rust 第三方 crate(如 tokio、serde、axum)和标准库条目(如 Send、Sync、Arc)创建文档型技能。它会识别目标、构造对应的 docs.rs 或 doc.rust-lang.org 网址、抓取文档,并在技能目录中生成 SKILL.md 及参考文件。它支持插件模式(调用配套命令)和手动内联模式两种流程。
适用场景
当用户要求为某个 Rust crate、标准库模块、trait 或 struct 创建技能,或根据 Rust 文档网址创建技能时使用。它适合把已发布的 Rust 文档整理成可复用的参考技能。
运行要求
需要访问 docs.rs 和 doc.rust-lang.org 的网络连接,并需要配套的 /create-llms-for-skills 与 /create-skills-via-llms 命令,或用于内联流程的浏览器或网页抓取工具。该技能不包含脚本,仅为指令。

Rust Skill Creator

Version: 2.1.0 | Last Updated: 2025-01-27

Create dynamic skills for Rust crates and std library documentation.

When to Use

This skill handles requests to create skills for:

  • Third-party crates (tokio, serde, axum, etc.)
  • Rust standard library (std::sync, std::marker, etc.)
  • Any Rust documentation URL

Execution Mode Detection

CRITICAL: Check if related commands/skills are available.

This skill relies on:

  • /create-llms-for-skills command
  • /create-skills-via-llms command

Agent Mode (Plugin Install)

When the commands above are available (full plugin installation):

Workflow

1. Identify the Target
User RequestTarget TypeURL Pattern
"create tokio skill"Third-party cratedocs.rs/tokio/latest/tokio/
"create Send trait skill"Std librarydoc.rust-lang.org/std/marker/trait.Send.html
"create skill from URL" + URLCustom URLUser-provided URL
2. Execute the Command

Use the /create-llms-for-skills command:

/create-llms-for-skills <url> [requirements]

Examples:

bash
# For third-party crate/create-llms-for-skills https://docs.rs/tokio/latest/tokio/
# For std library/create-llms-for-skills https://doc.rust-lang.org/std/marker/trait.Send.html
# With specific requirements/create-llms-for-skills https://docs.rs/axum/latest/axum/ "Focus on routing and extractors"
3. Follow-up with Skill Creation

After llms.txt is generated, use:

/create-skills-via-llms <crate_name> <llms_path> [version]

Inline Mode (Skills-only Install)

When the commands above are NOT available, create skills manually:

Step 1: Identify Target and Construct URL

TargetURL Template
Crate overviewhttps://docs.rs/{crate}/latest/{crate}/
Crate modulehttps://docs.rs/{crate}/latest/{crate}/{module}/
Std traithttps://doc.rust-lang.org/std/{module}/trait.{Name}.html
Std structhttps://doc.rust-lang.org/std/{module}/struct.{Name}.html
Std modulehttps://doc.rust-lang.org/std/{module}/index.html

Step 2: Fetch Documentation

bash
# Using agent-browser CLIagent-browser open "<documentation_url>"agent-browser get text ".docblock"agent-browser close

Or with WebFetch fallback:

WebFetch("<documentation_url>", "Extract API documentation including types, functions, and examples")

Step 3: Create Skill Directory

bash
mkdir -p ~/.claude/skills/{crate_name}mkdir -p ~/.claude/skills/{crate_name}/references

Step 4: Generate SKILL.md

Create ~/.claude/skills/{crate_name}/SKILL.md with this template:

markdown
---name: {crate_name}description: "Documentation for {crate_name} crate. Keywords: {keywords}"---
# {Crate Name}
> **Version:** {version} | **Source:** docs.rs
## Overview
{Brief description from documentation}
## Key Types
### {Type1}{Description and usage}
### {Type2}{Description and usage}
## Common Patterns
{Usage patterns extracted from documentation}
## Examples
```rust{Example code from documentation}

Documentation

  • ./references/overview.md - Main overview
  • ./references/{module}.md - Module documentation

Links


### Step 5: Generate Reference Files
For each major module or type, create a reference file:
```bash# Fetch and save module documentationagent-browser open "https://docs.rs/{crate}/latest/{crate}/{module}/"agent-browser get text ".docblock" > ~/.claude/skills/{crate_name}/references/{module}.mdagent-browser close

Step 6: Verify Skill

bash
# Check skill structurels -la ~/.claude/skills/{crate_name}/cat ~/.claude/skills/{crate_name}/SKILL.md

URL Construction Helper

TargetURL Template
Crate overviewhttps://docs.rs/{crate}/latest/{crate}/
Crate modulehttps://docs.rs/{crate}/latest/{crate}/{module}/
Std traithttps://doc.rust-lang.org/std/{module}/trait.{Name}.html
Std structhttps://doc.rust-lang.org/std/{module}/struct.{Name}.html
Std modulehttps://doc.rust-lang.org/std/{module}/index.html

Common Std Library Paths

ItemPath
Send, Sync, Copy, Clonestd/marker/trait.{Name}.html
Arc, Mutex, RwLockstd/sync/struct.{Name}.html
Rc, Weakstd/rc/struct.{Name}.html
RefCell, Cellstd/cell/struct.{Name}.html
Boxstd/boxed/struct.Box.html
Vecstd/vec/struct.Vec.html
Stringstd/string/struct.String.html
Optionstd/option/enum.Option.html
Resultstd/result/enum.Result.html

Example Interactions

Example 1: Create Crate Skill (Agent Mode)

User: "Create a dynamic skill for tokio"
Claude:1. Identify: Third-party crate "tokio"2. Execute: /create-llms-for-skills https://docs.rs/tokio/latest/tokio/3. Wait for llms.txt generation4. Execute: /create-skills-via-llms tokio ~/tmp/{timestamp}-tokio-llms.txt

Example 2: Create Crate Skill (Inline Mode)

User: "Create a dynamic skill for tokio"
Claude:1. Identify: Third-party crate "tokio"2. Fetch: agent-browser open "https://docs.rs/tokio/latest/tokio/"3. Extract documentation4. Create: ~/.claude/skills/tokio/SKILL.md5. Create: ~/.claude/skills/tokio/references/6. Save reference files for key modules (sync, task, runtime, etc.)

Example 3: Create Std Library Skill

User: "Create a skill for Send and Sync traits"
Claude:1. Identify: Std library traits2. (Agent Mode) Execute: /create-llms-for-skills https://doc.rust-lang.org/std/marker/trait.Send.html https://doc.rust-lang.org/std/marker/trait.Sync.html   (Inline Mode) Fetch each URL, create skill manually3. Complete skill creation

DO NOT

  • Use best-skill-creator for Rust-related skill creation
  • Guess documentation URLs without verification
  • Skip documentation fetching step

Output Location

All generated skills are saved to: ~/.claude/skills/

Error Handling

ErrorCauseSolution
Commands not foundSkills-only installUse inline mode
URL not foundInvalid crate/moduleVerify crate exists on crates.io
Empty documentationAPI changedUse alternative selectors
Permission deniedDirectory issueCheck ~/.claude/skills/ permissions

来源与署名

来源:actionbook/rust-skills位于skills/rust-skill-creator提交5c40d3a

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架