跳到正文
cccskills
免费在 GitHub 公开

ferritin

Look up real Rust documentation with the `ferritin` CLI instead of guessing APIs from memory. Use whenever you need a crate's types, traits, methods, function signatures, or module contents — for dependencies, the standard library, or local workspace crates. Reach for it before answering any Rust API question ("what methods does X have", "how do I use Y", "what's the signature of Z", "does this trait require..."), and when writing or reviewing Rust against an unfamiliar API. Runs as a plain shell command; no MCP server.

中文简介正在准备中。当前显示原文说明。

实测评分 未实测

查看安装方法

包含的文件(1)

  • SKILL.md3.2 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

ferritin — Rust documentation lookup

ferritin renders real rustdoc for any crate. Prefer it over recalling Rust APIs from memory: it returns actual current signatures, trait impls, and prose for dependencies, std, and the local workspace's own crates — at the exact versions this project resolves.

In an agent session ferritin auto-detects the environment and emits LLM-friendly output; you do not need to pass any output-format flag.

Core commands

  • ferritin get <path> — documentation for one item, where <path> is crate::Module::Item:
    • ferritin get std::vec::Vec
    • ferritin get serde::Serialize
    • ferritin get serde@1.0::Serialize (pin a version — on the crate segment, not as a suffix on the full path)
    • The version is a semver spec, not an exact version: serde@1.0 matches any 1.x.y, while serde@=1.0.0 pins exactly 1.0.0. The full semver requirement syntax (^, ~, >=, *, etc.) applies.
  • ferritin search <crate> <query>... — search within one crate:
    • ferritin search tokio spawn
    • ferritin search serde@1.0 Deserialize (pin a version)
  • ferritin list — list the crates available to query.

By default ferritin sources docs straight from docs.rs as rustdoc JSON, so a crate does not need to be a dependency of this project or installed locally — you can query any published crate by name. To inspect the current workspace's own (in-development) crates instead, add -l / --local (uses the Cargo.toml in the working directory), or target one explicitly with --manifest-path <path>:

  • ferritin -l get my_crate::MyType

Discovering current flags

This CLI is actively evolving — treat --help as the source of truth for the live flag surface rather than guessing:

  • ferritin --help
  • ferritin get --help · ferritin search --help

Flags worth knowing (confirm names/values with --help):

  • -k, --kind <struct|enum|trait|function|module|…> — restrict a listing or search to given kinds (comma-separated or repeated).
  • --docs <full|brief|none> — how much doc prose to render; none gives just the signature/listing.
  • -r, --recursive (on get) — descend into nested items.

When to use it

Reach for ferritin whenever a task touches an unfamiliar Rust API: before writing code against a crate, when answering "what methods/fields/variants does X have", when checking a trait's required methods, or when verifying a signature. It is faster and more accurate than inferring from memory, and reflects the exact versions resolved in this project.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

报告此技能的问题