craftbag

io.github.craftbagv0.2.1更新於 Oct 4, 2026

MCP server to list, load, explain, and validate Agent Skills.

已驗證STDIO僅桌面Developer ToolsKnowledge & Memory

概覽

AI 產生的概覽

讓助理探索、列出、載入、解釋並驗證本機 Agent Skills(SKILL.md)。

功能
craftbag 會走訪專案與家目錄下的技能樹(例如 .agents),並可選擇走訪 Claude、Cursor、Grok、Bline 的廠商目錄。透過 MCP stdio 提供 skills_list、skills_load、skills_why、skills_validate 四個工具。skills_load 可回傳完整技能內容、標題大綱或單一標題。skills_why 解釋技能為何會被啟用,skills_validate 驗證技能套件。
適用情境
適合宿主或助理需要在不依賴特定代理產品的情況下編目、檢視或驗證本機 Agent Skills 時使用。適用於技能放在 .agents 或廠商目錄中、助理需要判斷哪個技能適用於目前任務的情境。
執行需求
在 macOS、Linux 或 Windows 上執行的本機程序,可透過 Homebrew、Scoop 或 Rust 工具鏈安裝(MSRV 1.85)。MCP 宿主以 stdio 啟動 craftbag-mcp;macOS 圖形應用在 PATH 為空時可能需要完整路徑。未宣告帳號、API 金鑰或環境變數。
安裝前請注意
它會讀取本機技能目錄,預設包含 cwd 到 git 的 .agents 與 $HOME/.agents,廠商目錄僅在明確選擇時讀取。啟動參數 --path、--vendor、--user-dir、--no-implicit-roots 會在工具呼叫未提供該欄位時決定走訪範圍,請檢查以避免掃描非預期目錄。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 craftbag,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

craftbag

Discover, list, load, and explain Agent Skills (SKILL.md) for CLI and MCP hosts.

[CI] [Security] [crates.io] [docs.rs] [License]

[OpenSSF Best Practices] [OpenSSF Scorecard] [FOSSA Status] [Release]

What it does

craftbag walks project and home skill trees (.agents, plus optional vendor trees for Claude, Cursor, Grok, and Bline). It then:

  • catalogs skills (list)
  • prints one skill body (load), or heading keys / one heading (load --outline, load --section KEY)
  • explains why a skill would activate (why)
  • checks a package (validate)

The same operations exist over MCP stdio (skills_list, skills_load, skills_why, skills_validate). Hosts can filter, rank, and load skills without taking a dependency on any one agent product.

Install

macOS and Linux (Homebrew):

bash
brew install craftbag/tap/craftbag

Windows (Scoop):

powershell
scoop bucket add craftbag https://github.com/craftbag/scoop-bucketscoop install craftbag/craftbag

Both commands install craftbag and craftbag-mcp. The MCP host then runs craftbag-mcp (on macOS GUI apps, use the full path if PATH is empty: /opt/homebrew/bin/craftbag-mcp).

From a Rust toolchain (crates.io):

bash
cargo install --locked craftbag-clicargo install --locked craftbag-mcp

Library dependency:

toml
craftbag = "0.2"

From git (unreleased tip):

bash
cargo install --locked --git https://github.com/craftbag/craftbag craftbag-clicargo install --locked --git https://github.com/craftbag/craftbag craftbag-mcp

MSRV is 1.85.

Getting started

Default list walks cwd-to-git .agents / vendor trees and $HOME/.agents / vendor trees. This clone has no project .agents. When those directories are absent, craftbag list exits 0 and says no skills were found. Point --path at the demo tree (same catalog as the demo GIF):

bash
git clone https://github.com/craftbag/craftbagcd craftbagcraftbag list --no-implicit-roots --path demo/workspace/.agents/skills --catalogcraftbag load review-pr --no-implicit-roots --path demo/workspace/.agents/skillscraftbag load review-pr --no-implicit-roots --path demo/workspace/.agents/skills --outlinecraftbag load review-pr --no-implicit-roots --path demo/workspace/.agents/skills --section review-a-pull-requestcraftbag why review-pr --no-implicit-roots --path demo/workspace/.agents/skills --context reviewcraftbag validate demo/workspace/.agents/skills/review-pr

If craftbag is not on PATH yet, cargo build -p craftbag-cli --locked and use ./target/debug/craftbag in those commands.

In a project that already has skills under .agents/skills:

bash
craftbag list --catalogcraftbag load NAMEcraftbag why NAME --context reviewcraftbag validate ./path/to/my-skill

Claude, Cursor, Grok, or Bline trees are opt-in:

bash
craftbag list --vendor claude --catalog

Demo

[craftbag catalog and load]

MCP

craftbag-mcp speaks JSON-RPC on stdio. Tools: skills_list, skills_load, skills_why, skills_validate. After brew install or scoop install, craftbag-mcp --help names them.

Claude Desktop (claude_desktop_config.json) and other hosts that take a stdio command:

json
{  "mcpServers": {    "craftbag": {      "command": "craftbag-mcp",      "args": ["--vendor", "claude"]    }  }}

Launch --path, --vendor, --user-dir, and --no-implicit-roots are the walk when a tool call omits that field. The host cwd is still the implicit walk root unless you pass --no-implicit-roots. skills_load accepts outline and section (same as load --outline / --section KEY).

Library

rust
use craftbag::{discover, DiscoveryOptions};
fn main() -> std::io::Result<()> {    let cwd = std::env::current_dir()?;    let report = discover(&cwd, &DiscoveryOptions::default());    for skill in &report.skills {        println!("{} {}", skill.name, skill.description);    }    Ok(())}

implicit_roots is on by default (cwd-to-git .agents and $HOME/.agents). Set it to false and put collection roots in paths for leftover-only hosts. format_load_view can print an outline or one heading instead of the whole body.

Contributing

See CONTRIBUTING.md. Security reports go to SECURITY.md. Roadmap and governance are in ROADMAP.md and GOVERNANCE.md.

License

Apache-2.0 or MIT. You may choose either. See LICENSE and LICENSE-APACHE.

來源:README.md,提交 ea02fc9

工具

0
工具後設資料尚未被收錄。

版本歷史

1
  1. v0.2.1最新Oct 4, 2026