Agent skill

Rust No Unwrap

by shencangsheng in shencangsheng/easydb_app

Enforces strict avoidance of unwrap() in Rust code. An agent skill from shencangsheng/easydb_app.

MITAuto-check passedDocuments & Office

Install Rust No Unwrap

skills CLI
$ npx skills add shencangsheng/easydb_app --skill rust-no-unwrap -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install shencangsheng/easydb_app rust-no-unwrap --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/shencangsheng/easydb_app.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.cursor/skills/rust-no-unwrap .claude/skills/rust-no-unwrap && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
rust-no-unwrap
GitHub stars
590
Token cost
~802 tokens
SKILL.md length
272 words
Files
1
Skills in repo
3
Repo updated
First seen
Licence
MIT

At a glance

Enforces strict avoidance of unwrap() in Rust code. An agent skill from shencangsheng/easydb_app.

  • Works in 2 steps: Never use unwrap() on values that can… → unwrap() is only acceptable when the…
  • Reviewing Rust (.rs) code in this project
  • SKILL.md covers Rule, Alternatives, Decision Flow and Review Checklist, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Rust No Unwrap is an agent skill from shencangsheng/easydb_app. Enforces strict avoidance of unwrap() in Rust code. Use when writing, editing, or reviewing Rust (.rs) code in this project. Prevents unsafe panic-prone patterns and promotes proper error handling alternatives.

Its SKILL.md is about 800 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Documents & Office, covering CSV and tabular files. It works with Rust, Tauri and SQL. The repository describes itself as: EasyDB is a lightweight desktop app built with Tauri + Rust, powered by Apache DataFusion. Query local CSV, TSV, Text, NdJson, Excel, Parquet files and MySQL databases directly…. The licence is MIT.

When your agent uses it

  • Reviewing Rust (.rs) code in this project
  • Tasks that involve CSV and tabular files

Example prompts

  • “Use the rust-no-unwrap skill to enforce strict avoidance of unwrap() in Rust code. An agent skill from shencangsheng/easydb_app”
  • “/rust-no-unwrap”

Workflow steps

2 steps, taken from the first numbered list in SKILL.md.

  1. Never use unwrap() on values that can reasonably fail — file I/O, network calls, user input, parsing, indexing, HashMap lookups, etc.
  2. unwrap() is only acceptable when the code can mathematically prove the value is always present, e.g.

What it can do on your machine

Read from SKILL.md and the folder at commit 1c461a3. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are rust).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Rust No Unwrap loads about 802 tokens when it runs. Until then it costs about 56 tokens; SKILL.md has 272 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~56
When it runs · the whole SKILL.md, loaded when a task matches
~802

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from shencangsheng/easydb_app at commit 1c461a3, republished under its MIT licence (© shencangsheng). 272 words, ~802 tokens.

Download SKILL.mdSave it as .claude/skills/rust-no-unwrap/SKILL.md (or your agent's skills folder).
name
rust-no-unwrap
description
Enforces strict avoidance of unwrap() in Rust code. Use when writing, editing, or reviewing Rust (.rs) code in this project. Prevents unsafe panic-prone patterns and promotes proper error handling alternatives.

Rust: Avoid unwrap()

Rule

Do not use .unwrap() on Option or Result types unless absolutely certain the value is always present.

When writing or editing Rust code in this project:

  1. Never use unwrap() on values that can reasonably fail — file I/O, network calls, user input, parsing, indexing, HashMap lookups, etc.
  2. unwrap() is only acceptable when the code can mathematically prove the value is always present, e.g.:
    • Some(x) that was just constructed in the same expression
    • A Result from an operation that by construction cannot fail (e.g., 1_usize.checked_add(0).unwrap())
    • Test code where panicking on unexpected states is intentional

Alternatives

Replace unwrap() with one of the following, depending on context:

SituationReplacementExample
Need the value, want to propagate errors? operatorlet val = result?;
Need the value, have a sensible default.unwrap_or() / .unwrap_or_default()map.get(k).unwrap_or(0)
Need the value, want to provide context on failure.expect("reason")file.expect("config must be readable")
Need the value, custom error type.map_err() then ?`result.map_err(
Want to handle both branchesmatchmatch opt { Some(v) => ..., None => ... }
Want to handle both branches with fallback.or_else() / .or()`opt.or_else(
Option on a collection lookup.get() + fallbackmap.get(key).copied().unwrap_or_default()

Decision Flow

Can the value ever be None/Err in practice?
  → YES: Use ? or match or unwrap_or/expect with clear reason
  → UNCERTAIN: Assume YES — use ? or match or unwrap_or
  → NO (provably always Ok/Some): unwrap() is acceptable

Review Checklist

When reviewing or editing Rust files, check:

  • No .unwrap() calls on I/O results, parse results, collection lookups, or any fallible operation
  • Every .expect() has a meaningful, specific reason string (not just "should work")
  • Error types implement proper conversion so ? chains cleanly
  • Test code that intentionally uses unwrap() is clearly in a #[test] or test helper context

Examples

Bad — panics on missing key:

rust
let config = settings.get("host").unwrap();

Good — provides fallback:

rust
let config = settings.get("host").unwrap_or("localhost");

Bad — panics on file read:

rust
let data = fs::read_to_string(path).unwrap();

Good — propagates error:

rust
let data = fs::read_to_string(path)?;

Bad — vague expect:

rust
let port = str::parse::<u16>(s).expect("parse failed");

Good — specific expect:

rust
let port = str::parse::<u16>(s).expect("port number must be valid u16");

Acceptable — provably safe:

rust
// Just created this Option, it is always Some
Some(42).unwrap()

© shencangsheng, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .cursor/skills/rust-no-unwrap of shencangsheng/easydb_app.

Open the folder on GitHubat commit 1c461a3

Compare with similar skills

Rust No Unwrap next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Rust No Unwrap compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Rust No Unwrap this skillshencangsheng/easydb_app590—~802Automated safety check: PassMIT
Database Opsbkywksj/knowledge-base330—~1.9kAutomated safety check: PassCustom licence
Data Processingjeremylongshore/tons-of-skills-marketplace2.8k—~1.3kAutomated safety check: PassMIT
Mendix Odata Pushdownmendixlabs/mxcli129—~2.5kAutomated safety check: PassApache-2.0
Dataautonomous-ai/openharness1.2k—~1.2kAutomated safety check: PassMIT
Spreadsheet QAOneWave-AI/claude-skills336—~2.2kAutomated safety check: PassMIT

Similar skills

  • Database Ops

    bkywksj/knowledge-base

    Tauri 本地数据库操作技能,使用 rusqlite 进行 SQLite 数据库操作. An agent skill from bkywksj/knowledge-base.

    330 GitHub stars~1.9k tokensUpdated today
    DatabasesAuto-check passed
  • Data Processing

    jeremylongshore/tons-of-skills-marketplace

    A skill your agent uses when working with structured data files (CSV, JSON, YAML, TOML, Parquet) — querying, transforming, filtering, aggregating, or converting between formats

    2.8k GitHub stars~1.3k tokensUpdated today
    Documents & OfficeAuto-check passed
  • Mendix Odata Pushdown

    mendixlabs/mxcli

    Push OData query options into the SQL of a Mendix resource served by a read microflow, so $filter, $orderby, $top, $skip, $count and the key lookup reach the database instead of being silently…

    129 GitHub stars~2.5k tokensUpdated today
    DatabasesAuto-check passed
  • Data

    autonomous-ai/openharness

    Turn user CSV files and a question into a typed, joined, repeatable local SQLite analysis with traceable records, browser revisions and verified portable exports.

    1.2k GitHub stars~1.2k tokensUpdated today
    DatabasesAuto-check passed
  • Spreadsheet QA

    OneWave-AI/claude-skills

    Answers business questions about the user's own spreadsheet or data export (CSV, TSV, XLSX from a CRM, Shopify, Stripe, QuickBooks, ad platforms, HR or payroll systems) correctly and auditably.

    336 GitHub stars~2.2k tokensUpdated 8 days ago
    Documents & OfficeAuto-check passed
  • Dummy Dataset

    killvxk/pm-skills-zh

    生成用于测试的逼真虚拟数据集,支持自定义列、约束条件及输出格式(CSV、JSON、SQL、Python 脚本)。适用于创建测试数据、构建模拟数据集,或为开发和演示生成示例数据。

    167 GitHub stars~595 tokensUpdated 6 mo ago
    DatabasesAuto-check passed

More from shencangsheng/easydb_app

  • Resolve PR Review

    shencangsheng/easydb_app

    Resolve pull request code review comments end-to-end. An agent skill from shencangsheng/easydb_app.

    590 GitHub stars~2.4k tokensUpdated 1 mo ago
    Auto-check passed
  • Rust SQL Test

    shencangsheng/easydb_app

    Enforces unit test requirements for the Rust data-processing modules in src-tauri/src/sql/ (generator.rs, parse.rs) and src-tauri/src/reader/ (excel.rs and other readers).

    590 GitHub stars~1.2k tokensUpdated 1 mo ago
    Auto-check passed

Works with

Questions about Rust No Unwrap

What does Rust No Unwrap do?

Enforces strict avoidance of unwrap() in Rust code. An agent skill from shencangsheng/easydb_app. Rust No Unwrap is an agent skill from shencangsheng/easydb_app. Enforces strict avoidance of unwrap() in Rust code.

When should I use Rust No Unwrap?

Rust No Unwrap fits situations like: reviewing Rust (.rs) code in this project; tasks that involve CSV and tabular files.

How do I install Rust No Unwrap in Claude Code?

Run `npx skills add shencangsheng/easydb_app --skill rust-no-unwrap -a claude-code`. Or copy the skill folder (.cursor/skills/rust-no-unwrap in shencangsheng/easydb_app) into .claude/skills/rust-no-unwrap in your project. Claude Code loads it when a task matches its description.

How do I install Rust No Unwrap in Codex?

Run `npx skills add shencangsheng/easydb_app --skill rust-no-unwrap -a codex`. Or copy the skill folder (.cursor/skills/rust-no-unwrap in shencangsheng/easydb_app) into .agents/skills/rust-no-unwrap in your project. Codex loads it when a task matches its description.

Can I use Rust No Unwrap in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add shencangsheng/easydb_app --skill rust-no-unwrap -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/rust-no-unwrap, .gemini/skills/rust-no-unwrap, .github/skills/rust-no-unwrap and .opencode/skills/rust-no-unwrap in your project.

What does Rust No Unwrap need to run?

SKILL.md names no scripts, command-line tools or credentials: Rust No Unwrap is instructions for the agent only.

Does Rust No Unwrap access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Rust No Unwrap safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Rust No Unwrap use?

Rust No Unwrap is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Rust No Unwrap use?

About 802 tokens (SKILL.md is roughly 3.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Rust No Unwrap?

Skills that share tags, products or a category with Rust No Unwrap: Database Ops (bkywksj/knowledge-base, 330 stars), Data Processing (jeremylongshore/tons-of-skills-marketplace, 2.8k stars), Mendix Odata Pushdown (mendixlabs/mxcli, 129 stars) and Data (autonomous-ai/openharness, 1.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Rust No Unwrap?

shencangsheng (a GitHub user) maintains it in shencangsheng/easydb_app, which has 590 GitHub stars. The repository holds 3 skills in this directory. The repository was last updated on August 14, 2026.

Source: shencangsheng/easydb_app on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.