mcpField
R
rust-skill-creator

rust-skill-creator

github.com/actionbookエージェントワークフロー1.6k3.1k 回インストール9 週間前に更新
リポジトリ

rust-skill-creator について

crate、Rust 標準ライブラリ、または指定されたドキュメント URL を基に、ドキュメント参照スキルを作成します。関連コマンドがあればコマンドを使い、なければ手動手順でファイルを生成します。

主な機能

  1. 01Rust crate 向けスキルの作成
  2. 02標準ライブラリ API 向けスキルの作成
  3. 03任意のドキュメント URL に対応
  4. 04SKILL.md と参照ファイルの生成
  5. 05コマンドまたは手動の手順

活用シーン

  1. 01tokio などの crate 用スキル作成
  2. 02Rust 標準ライブラリ型のスキル作成
  3. 03ドキュメント URL からスキルを作成

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/actionbook/rust-skills --skill rust-skill-creator

インストール後、Claude Code で/rust-skill-creatorを入力して読み込まれたか確認します。

詳細

Rust Skill Creator

バージョン: 2.1.0 | 最終更新日: 2025-01-27

Rust のクレートと標準ライブラリのドキュメントに対応する動的なスキルを作成します。

使用するタイミング

このスキルは、次の対象のスキルを作成するリクエストに対応します。

  • サードパーティ製クレート(tokio、serde、axum など)
  • Rust 標準ライブラリ(std::sync、std::marker など)
  • 任意の Rust ドキュメント URL

実行モードの判定

重要:関連するコマンド/スキルが利用可能か確認してください。

このスキルは次のコマンドに依存します。

  • /create-llms-for-skills コマンド
  • /create-skills-via-llms コマンド

エージェントモード(プラグインをインストール済み)

上記のコマンドが利用可能な場合(プラグインを完全にインストール済み):

ワークフロー
1. 対象を特定する
ユーザーのリクエスト対象の種類URL パターン
"create tokio skill"サードパーティ製クレートdocs.rs/tokio/latest/tokio/
"create Send trait skill"標準ライブラリdoc.rust-lang.org/std/marker/trait.Send.html
"create skill from URL" + URLカスタム URLユーザーが指定した URL
2. コマンドを実行する

/create-llms-for-skills コマンドを使用します。

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

例:

# 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. スキル作成を続けて行う

llms.txt が生成されたら、次を使用します。

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

インラインモード(スキルのみをインストール済み)

上記のコマンドが利用できない場合は、スキルを手動で作成します。

ステップ 1:対象を特定して URL を組み立てる
対象URL テンプレート
クレートの概要https://docs.rs/{crate}/latest/{crate}/
クレートのモジュールhttps://docs.rs/{crate}/latest/{crate}/{module}/
標準ライブラリのトレイトhttps://doc.rust-lang.org/std/{module}/trait.{Name}.html
標準ライブラリの構造体https://doc.rust-lang.org/std/{module}/struct.{Name}.html
標準ライブラリのモジュールhttps://doc.rust-lang.org/std/{module}/index.html
ステップ 2:ドキュメントを取得する
# Using agent-browser CLI
agent-browser open "<documentation_url>"
agent-browser get text ".docblock"
agent-browser close

または、WebFetch をフォールバックとして使用します。

WebFetch("<documentation_url>", "Extract API documentation including types, functions, and examples")
ステップ 3:スキルディレクトリを作成する
mkdir -p ~/.claude/skills/{crate_name}
mkdir -p ~/.claude/skills/{crate_name}/references
ステップ 4:SKILL.md を生成する

次のテンプレートを使用して ~/.claude/skills/{crate_name}/SKILL.md を作成します。

---
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}

ドキュメント

  • ./references/overview.md - 主な概要
  • ./references/{module}.md - モジュールのドキュメント

リンク


### Step 5: Generate Reference Files

For each major module or type, create a reference file:

```bash
# Fetch and save module documentation
agent-browser open "https://docs.rs/{crate}/latest/{crate}/{module}/"
agent-browser get text ".docblock" > ~/.claude/skills/{crate_name}/references/{module}.md
agent-browser close
ステップ 6:スキルを検証する
# Check skill structure
ls -la ~/.claude/skills/{crate_name}/
cat ~/.claude/skills/{crate_name}/SKILL.md

URL 組み立てヘルパー

対象URL テンプレート
クレートの概要https://docs.rs/{crate}/latest/{crate}/
クレートのモジュールhttps://docs.rs/{crate}/latest/{crate}/{module}/
標準ライブラリのトレイトhttps://doc.rust-lang.org/std/{module}/trait.{Name}.html
標準ライブラリの構造体https://doc.rust-lang.org/std/{module}/struct.{Name}.html
標準ライブラリのモジュールhttps://doc.rust-lang.org/std/{module}/index.html

標準ライブラリでよく使われるパス

項目パス
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

やり取りの例

例 1:クレートのスキルを作成する(エージェントモード)
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 generation
4. Execute: /create-skills-via-llms tokio ~/tmp/{timestamp}-tokio-llms.txt
例 2:クレートのスキルを作成する(インラインモード)
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 documentation
4. Create: ~/.claude/skills/tokio/SKILL.md
5. Create: ~/.claude/skills/tokio/references/
6. Save reference files for key modules (sync, task, runtime, etc.)
例 3:標準ライブラリのスキルを作成する
User: "Create a skill for Send and Sync traits"

Claude:
1. Identify: Std library traits
2. (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 manually
3. Complete skill creation

禁止事項

  • Rust 関連のスキル作成に best-skill-creator を使用しないでください
  • 検証せずにドキュメント URL を推測しないでください
  • ドキュメントの取得手順を省略しないでください

出力先

生成されたスキルはすべて ~/.claude/skills/ に保存されます。

エラー処理

エラー原因解決策
コマンドが見つからないスキルのみのインストールインラインモードを使用する
URL が見つからない無効なクレート/モジュールcrates.io でクレートの存在を確認する
ドキュメントが空API が変更された代替セレクターを使用する
権限が拒否されたディレクトリの問題~/.claude/skills/ の権限を確認する

コメント