agentsclimarketplace

Lens rust

Skill vynazevedo/first-plan/skills/lens-rust

Stack lens para Rust. Use durante Discovery quando Cargo.toml for detectado. Cobre binários, libs, async runtimes (tokio/async-std), error handling, web frameworks (axum, actix-web, rocket).From its SKILL.md

Install
npx -y skills add vynazevedo/first-plan --skill lens-rust

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 21 stars21 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

2.7 KB, as published. Nobody here has run it

Lens Rust

Detecção fina

SinalVariante
[[bin]] em Cargo.toml ou src/main.rsBinário
[lib] em Cargo.toml ou src/lib.rsLib
axum / actix-web / rocket / warp em depsHTTP API
tonic em depsgRPC
tokio em depsAsync runtime tokio
async-std em depsAsync runtime async-std
clap em deps + binCLI
tauri em depsTauri (desktop)
bevyGame/3D
[workspace] em Cargo.tomlWorkspace (monorepo Rust)

Extração de padrões

Estrutura

  • src/main.rs ou src/bin/<name>.rs
  • src/lib.rs + módulos
  • Workspaces - quais crates, dependências entre eles
  • tests/ integration tests
  • examples/ exemplos
  • benches/ benchmarks

Error handling

  • thiserror (typed errors)
  • anyhow (boxed errors em apps)
  • ? operator usage
  • Custom Error enums

Async

  • Runtime: tokio vs async-std vs smol
  • Send + Sync constraints
  • Spawning tasks (tokio::spawn)
  • Channels (tokio::sync::mpsc, crossbeam)

Macros

  • derive macros customizados (sinal: dependências de proc-macro crates)
  • macro_rules! definidos no projeto

Testing

  • #[test] unit tests inline
  • tests/ integration
  • criterion para benchmarks
  • proptest, quickcheck (property testing)
  • mockall (mocks)
  • wiremock (HTTP mocks)

Web

axum:

  • Handlers como funções async fn(...) -> impl IntoResponse
  • Extractors (State, Json, Path, Query)
  • Routers compostos

actix-web:

  • Handlers com web::Data, web::Json
  • App factory

Logging

  • tracing ecosystem (tracing + tracing-subscriber + tracing-opentelemetry)
  • log crate + env_logger (legacy)

Build / config

  • cargo-make, just em vez de Makefile
  • clippy.toml, rustfmt.toml
  • Edition (2018, 2021, 2024)
  • MSRV (minimum supported Rust version)

Output

Padrão. Atenção:

  • 02-conventions/errors.md - thiserror vs anyhow vs custom
  • 02-conventions/di.md - Rust geralmente usa State/Context structs em vez de DI clássico

Confidence rules

Aumentar:

  • clippy.toml strict + zero warnings nos commits recentes
  • Padrão consistente de error handling

Reduzir:

  • unsafe blocks em código não-justificado por SAFETY: comment
  • unwrap() / expect() em produção sem justificativa

Anti-padrões comuns

  • unwrap() sem expect("razão") em produção
  • clone() excessivo (smell de fight com borrow checker)
  • Arc<Mutex<T>> quando RwLock ou channel resolveria melhor
  • panic! em lib (deveria retornar Result)

Keep looking

Skills are one crate of 627,801. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.