termi: Skill for Cursor

.cursor/skills/audit-unwraps/SKILL.md

audit-unwraps is a skill for Cursor from MannanSaood/termi. It costs 48 tokens per session (795 once invoked), scanned A, original, MIT.

A review method for finding `.unwrap()` and `.expect()` calls in Rust code that runs in production, while leaving normal test code alone.

In plain words
What is it for?
Use it during safety checks or when Rust's `clippy::unwrap_used` warning is difficult to resolve, especially for locks, parsing, and user-provided data.
Why use it?
It helps prevent unexpected panics by showing when to handle errors safely instead of assuming an operation will succeed.

Skill for Cursor

Written for Cursor: installed under .cursor/.

This is MannanSaood/termi's own configuration. It tells Cursor how to work on termi itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything termi configures →

Reuse

Borrowing it

Nothing to install: this file belongs to MannanSaood/termi. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/MannanSaood/termi/main/.cursor/skills/audit-unwraps/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/MannanSaood/termi

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for audit-unwraps

README.md
[![agentmods](https://agentmods.dev/badge/skills/mannansaood/termi/audit-unwraps/github.svg)](https://agentmods.dev/skills/mannansaood/termi/audit-unwraps)
Your own site
<a href="https://agentmods.dev/skills/mannansaood/termi/audit-unwraps"><img src="https://agentmods.dev/badge/skills/mannansaood/termi/audit-unwraps/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for audit-unwraps

Your own site · 80×15
<a href="https://agentmods.dev/skills/mannansaood/termi/audit-unwraps"><img src="https://agentmods.dev/badge/skills/mannansaood/termi/audit-unwraps.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 795 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00048 $0.00795
Opus 5 $0.00024 $0.00398
Sonnet 5 $0.00010 $0.00159
Haiku 4.5 $0.00005 $0.00080

Measured 8d ago against content hash b84caa385a76, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

audit-unwraps scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/skills/audit-unwraps/SKILL.md · 72 lines

How it starts

The opening of the file, as written. The whole thing — 72 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Use this if clippy::unwrap_used flags something and it's not obvious how to fix it, or when doing a periodic safety sweep.

Step 1: find them, excluding test code

cd rust/src
grep -rn "\.unwrap()\|\.expect(" --include="*.rs" . | grep -v "^\./.*test"

This is a rough filter — always manually check whether a hit is actually inside a #[cfg(test)] mod tests { ... } block before treating it as a production issue. .unwrap() in test assertions is normal and expected; the project's mod tests blocks are explicitly annotated with #[allow(clippy::unwrap_used, clippy::expect_used)] for exactly this reason — don't "fix" those.

Step 2: classify each production hit

For each real (non-test) occurrence, ask:

  1. Is this a Mutex::lock()? → use utils::sync_ext::LockExt::lock_safe() instead. See that module's doc comment for the one case where this is NOT appropriate (mutexes protecting real invariants where a torn write could leave data in a genuinely broken state — rare in this codebase, but check).

  2. Is this parsing/converting something that could legitimately fail (user input, file content, JNI-provided data)? → propagate via ? using the appropriate error type from utils::error (VfsError, PtyError, TerminalError, JniErrorCode). If the calling function doesn't return a Result yet, that's the actual fix — change its signature, don't swallow the error with a fallback default silently (silent fallbacks hide real problems just as much as a panic does, they just do it later and more confusingly).

  3. Is this "genuinely can't happen" (e.g. unwrapping a regex you just compiled from a string literal)? → still avoid .unwrap(). Either:

    • Use .expect("clear message about why this can't fail") — this is marginally better since it documents intent, but clippy::expect_used is enforced too, so this still needs a #[allow(clippy::expect_used)] with a comment justifying it, used sparingly and only for genuine invariants, not convenience.
    • Better: restructure so the "can't happen" case is checked once at startup/construction time and stored as an already-valid value, rather than re-asserted on every call.

Read the full file on GitHub · 72 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 72 lines · 48 tokens per session scan A b84caa385a76

Subscribe to this mod's changes

audit-unwraps is a skill published in the GitHub repository MannanSaood/termi (8 stars, last pushed 9d ago), licensed MIT. It adds 48 tokens to every session and 795 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

shepherd

Use when asked to shepherd, babysit, monitor, or poll open pull requests or merge requests, including triaging review feedback, CI failures, and routine follow-up.

chrisbanes/skills · 37 tokens

kotlin-api-design

Use when designing or reviewing Kotlin function ownership, member or extension functions, factories, single-field domain types, value classes, data classes, Kotlin Multiplatform expect/actual declarations, or platform service boundaries.

chrisbanes/skills · 46 tokens

kotlin-concurrency-and-flow

Use when writing or reviewing Kotlin coroutine scope ownership, raw Thread or Executor work, init launches, non-suspending launch APIs, runBlocking, cancellation, StateFlow, SharedFlow, Channel, stateIn, SharingStarted, state updates, or one-shot events.

chrisbanes/skills · 60 tokens

shepherd

Use when asked to shepherd, babysit, monitor, or poll open pull requests or merge requests — including triaging review comments, detecting CI failures, fixing trivial CI issues, and keeping PRs/MRs moving without manual intervention.

ashtanko/compose-android-template · 49 tokens

derive-the-flag-dont-store-and-correct-it

A boolean that is a pure function of state already being collected gets stored as its own mutableStateOf anyway, seeded with a guess and corrected a frame later by a LaunchedEffect — so the first frame renders the guess, and later changing only the seed value does nothing once rememberSaveable has already saved the…

maxrave-dev/kotlin-footguns · 125 tokens

a-stated-rule-needs-annotated-exceptions

A design rule with legitimate exceptions survives only if every exception carries its reason at the call site and the rule itself is greppable — otherwise nothing distinguishes an exception from a violation and the rule silently rots. Covers where the rule statement goes, where the reasons go, scoping the audit to the…

maxrave-dev/kotlin-footguns · 117 tokens