Token导航 LogoToken导航

Agent Skill · 开发

fp-rust(FP Rust 命令行)

fp-rust 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

fp-rust 是开发类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为执行命令;许可证信息还不明确,第三方扫描已通过,按安装量在开发类的 21,746 个 Skill 里排第 18,175。

总安装 353周安装 15GitHub Stars 公开资料未说明下载 124核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:fp-rust(FP Rust 命令行)
来源仓库:https://github.com/mpurbo/purbo-skills
仓库路径:skills/fp-rust
安装命令:
npx skills add https://github.com/mpurbo/purbo-skills --skill fp-rust
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/mpurbo/purbo-skills --skill fp-rust

这个 Skill 是做什么的

开发类 Skill 面向写代码、改代码和排查问题,一般会读写仓库文件,部分还会执行构建或测试命令。

fp-rust 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。适合在 Codex、Claude、Cursor、Gemini CLI 中围绕仓库状态和代码变更进行整理。可通过 npx skills add 命令从指定仓库安装并使用。

安装前应确认权限范围、维护状态及是否执行联网或文件读写操作。建议参考原始 README 进一步了解具体功能和限制。

来源仓库内路径:skills/fp-rust

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/mpurbo/purbo-skills --skill fp-rust;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要执行命令,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

fp-rust 怎么安装?

在终端执行 npx skills add https://github.com/mpurbo/purbo-skills --skill fp-rust。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

fp-rust 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

fp-rust 需要什么权限?

权限级别是执行命令。安装流程涉及命令执行,可能通过 npx skills add https://github.com/mpurbo/purbo-skills --skill fp-rust 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

fp-rust 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

fp-rust 用的人多吗?

公开数据是累计安装 353 次,近一周安装 15 次,下载 124 次。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

fp-rust 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 需要执行命令,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理开发类任务、又不想每次都手写提示词的人。

不太适合

  • 不能接受 Skill 在你机器上执行命令的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

开发类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
skill-vetter

技能审查员 · OpenClaw

8,779,018986操作浏览器MIT-0通过
ontology

本体论 · OpenClaw

6,636,960576只读MIT-0通过
entra-app-registration

内部应用程序注册 · Codex、Claude

6,631,872764接触敏感数据未明确通过
entra-app-registration

内部应用程序注册 · Codex、Claude

3,757,680201接触敏感数据未明确通过
nano-banana-pro

纳米香蕉专业版 · OpenClaw

3,526,898364接触敏感数据MIT-0有提醒
fp-rust

FP Rust 命令行 · 本页

353—执行命令未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Functional Rust Skill

Write Rust that is idiomatic, readable, and practical while maximizing FP principles. Rust is not Haskell — ownership IS the type-level effect system. Let FP emerge naturally from Rust's idioms: ownership, borrowing, iterators, enums, and traits.

For detailed patterns, code examples, library guidance, and rationale, read the companion reference: cat ${SKILL_PATH}/references/FP_RUST_GUIDELINES.md

Load the reference when you need: specific code examples for a pattern, library selection guidance (Appendix A/C), Clippy configuration (Appendix D), or the FP ↔ Rust concept map (Appendix B).


Core Architecture: Functional Core, Imperative Shell

Every program is a pure core surrounded by a thin imperative shell.

Core (in src/core/):

  • Never performs IO, reads clock, or logs
  • Receives data, returns data (or Result/Option as decisions)
  • Tested with pure unit tests — no mocks needed

Shell (in src/shell/ and src/main.rs):

  • Reads, writes, logs, calls core's pure functions
  • Interprets core's decisions into effects
  • Tested with integration tests

Litmus test: If core/ imports std::io or tokio, it belongs in shell/.

src/
├── main.rs              # Shell: wiring, IO, entry point
├── shell/               # Adapters: HTTP, DB, FS, CLI
├── core/                # Pure domain logic — NO std::fs, NO tokio
│   ├── types.rs         # ADTs, newtypes, domain models
│   ├── transform.rs     # Pure transformations
│   └── validate.rs      # Validation combinators
└── lib.rs               # Re-exports core

The Seven Principles

Apply these in order of priority when writing or reviewing Rust code:

1. Borrow > Clone > Mutate

  • Borrow (&T) for reads — zero cost, pure
  • Clone/Copy for transformations — create new values
  • Mutate (&mut T) only as last resort, encapsulated

Pass Copy types (i32, bool, f64, Duration) by value, not reference. Accept &str over String, &[T] over Vec<T> in parameters. Defer .to_string(), .collect() until the last possible moment.

2. Pure Functions

A function is pure if: same inputs → same output, no side effects. When a function needs something impure (time, random), inject it as a parameter:

// ❌ fn is_expired(token: &Token) -> bool { token.expires_at < SystemTime::now() }
// ✅ fn is_expired(token: &Token, now: SystemTime) -> bool { token.expires_at < now }

The signature tells the full story: no &mut self, no &dyn SomeService, no global state.

3. Algebraic Data Types

  • Use enum (sum types) to model possibilities — not flag fields or stringly-typed status
  • Use struct (product types) with private fields and constructors
  • Wrap primitives in newtypes: struct UserId(Uuid), struct Amount(Decimal)
  • Match exhaustively — avoid _ => that silently swallows future variants
  • Make illegal states unrepresentable via typestate pattern

4. Pipeline-Oriented Programming

Default to iterator chains (.iter().map().filter().collect()), not for loops. Use ? operator and .and_then() for Result chains (railway-oriented programming). Return impl Iterator<Item = T> over Vec<T> when possible — defer .collect().

Preference order:

.iter().map().filter().collect()  >  for + match (no mut)  >  for + mut accumulator

5. Errors Are Values

  • Domain errors as typed enums with thiserror
  • anyhow::Result in shell, typed errors in core
  • Never unwrap()/expect() in core — propagate with ?
  • Never panic! for expected conditions
  • Test both Ok and Err paths

6. Dependency Rejection Over Injection

Pass data in, get data out. Don't inject &dyn Repository — instead:

  • Shell fetches data from IO
  • Shell passes data to pure core function
  • Core returns decisions as values (including Vec<Command> for effects)
  • Shell interprets and executes effects

Trait abstraction only when genuinely multiple runtime backends (not "for testing").

7. Concurrency via Message Passing

  • Arc<T> (immutable sharing) over Arc<Mutex<T>> (mutable sharing)
  • Channels (mpsc, oneshot, broadcast) for coordination
  • rayon::par_iter() for CPU-bound parallel computation
  • Keep async in the shell; core stays sync and pure

Decision Checklist

Run through when writing or reviewing any function:

  1. IO/clock/randomness? → Shell. Inject data, not services.
  2. Can params be borrowed? → &T, &str, &[T]. Copy types by value.
  3. Uses mut? → Replace with transform/fold/map. If needed, encapsulate.
  4. Uses unwrap()? → Only in shell/test/provably safe.
  5. Types tight enough? → String → newtype? Option → separate type? bool → enum?
  6. Data pipeline? → .iter() chains or .and_then(). Defer .collect().
  7. Dependency needed? → Reject it. Pass data, not services.
  8. Error handling complete? → Typed enums, exhaustive match, both paths tested.
  9. Documented? → /// on public items, comments explain "why" not "what".

mut Concession Litmus Test

Before using mut in core code:

  1. Can I restructure to avoid it?
  2. Is the mutation encapsulated (invisible to caller)?
  3. Does the function remain deterministic from caller's perspective?

Acceptable concessions: performance-critical inner loops (with profiling evidence), builder patterns (produced value is immutable), complex fold readability, OnceCell/LazyLock for memoization, tracing for diagnostics only.


Key Pattern: fn(mut self) -> Self

This is NOT impure mutation — it's a value-to-value transform where Rust reuses memory. The caller passes ownership in and gets a new value out:

fn with_discount(mut order: Order, pct: f64) -> Order {
    order.total *= 1.0 - pct;
    order
}

Don't clone the world just to "look functional."


Crate Stack (Always Include)

[dependencies]
itertools = "0.14"       # Extended pipeline combinators
tap = "1"                # .pipe() and .tap() for pipeline readability
derive_more = { version = "1", features = ["full"] }  # Newtype ergonomics
thiserror = "2"          # Domain error enums
serde = { version = "1", features = ["derive"] }
rust_decimal = "1"       # Financial math (no floats)
anyhow = "1"             # Shell error handling
tokio = { version = "1", features = ["full"] }  # Shell async runtime
tracing = "0.1"          # Structured logging

For library evaluation, conditional crates (frunk, imbl, rayon, proptest), Clippy configuration, and the full FP ↔ Rust concept map, consult the reference document.


When Reviewing Code

Flag these patterns and suggest FP alternatives:

SmellSuggest
let mut for accumulation.fold() or .map().collect()
for loop pushing into VecIterator pipeline
&dyn Trait in core for testabilityDependency rejection
unwrap() in core/library code? or explicit error handling
String/bool for domain statesEnum (sum type) or newtype
Arc<Mutex<T>>Channels or Arc<T> immutable snapshot
IO in core functionsMove to shell, pass data in
_ => catch-all in matchExhaustive match with explicit variants
Nested if-let for Option/Result.map(), .and_then(), ? pipeline
.clone() to satisfy borrow checkerRestructure lifetimes, or use &T

平台分布

Codex

33%
按下载量换算41

Claude

30.52%
按下载量换算38

Cursor

18.37%
按下载量换算23

Gemini CLI

8.34%
按下载量换算10

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/mpurbo/purbo-skills --skill fp-rust 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills