termi: Skill for Cursor

.cursor/skills/run-tests-and-fix/SKILL.md

run-tests-and-fix is a skill for Cursor from MannanSaood/termi. It costs 48 tokens per session (794 once invoked), scanned A, original, MIT.

A checklist for running the Rust project’s formatting checks, tests, lint checks, and Android build checks. Rust is a programming language, and Android checks verify code intended to work with Android.

In plain words
What is it for?
Use it after substantial Rust changes or when fixing issues to run the same checks as continuous integration, including strict handling of unwrap and expect calls.
Why use it?
It catches formatting, test, lint, and platform-specific problems before changes are considered ready.

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/run-tests-and-fix/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 run-tests-and-fix

README.md
[![agentmods](https://agentmods.dev/badge/skills/mannansaood/termi/run-tests-and-fix.svg)](https://agentmods.dev/skills/mannansaood/termi/run-tests-and-fix)
Your own site
<a href="https://agentmods.dev/skills/mannansaood/termi/run-tests-and-fix"><img src="https://agentmods.dev/badge/skills/mannansaood/termi/run-tests-and-fix.svg" alt="Measured on agentmods" 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 794 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.00794
Opus 5 $0.00024 $0.00397
Sonnet 5 $0.00010 $0.00159
Haiku 4.5 $0.00005 $0.00079

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

Security

Grade A, and why

run-tests-and-fix 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/run-tests-and-fix/SKILL.md · 71 lines

How it starts

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

This is the "make sure everything is actually green" playbook — run this after any non-trivial change, or when asked to "test and fix issues."

Step-by-step

cd rust

# 1. Format check (fast, catches nothing functional but keeps diffs clean)
cargo fmt --check
# if this fails: cargo fmt   (then review the diff, don't blindly trust it)

# 2. Core test suite — no Android SDK/NDK needed
cargo test --verbose

# 3. Lint with the same flags CI uses — unwrap/expect are hard errors here
cargo clippy --all-targets -- -D warnings -D clippy::unwrap_used -D clippy::expect_used

# 4. Verify the JNI boundary still type-checks (doesn't run it, just compiles it)
cargo check --features android --all-targets
cargo clippy --features android -- -D warnings -D clippy::unwrap_used -D clippy::expect_used

# 4b. Android *target* type-check (host `--features android` is not enough:
#     it still uses host libc. TIOCGPTN / ioctl i32 vs u64 only fail here.)
#     Needs `rustup target add aarch64-linux-android`. No NDK required.
if rustup target list --installed | grep -q aarch64-linux-android; then
  cargo check --target aarch64-linux-android --features android --lib
else
  echo "SKIP: aarch64-linux-android target not installed (CI android-feature-check runs this)"
fi

# 5. Release build sanity check
cargo build --release

If cargo-clippy isn't installed in your environment (e.g. a minimal apt-installed Rust toolchain without the clippy component), you won't be able to run steps 3/5 locally — say so explicitly rather than skipping them silently, and rely on CI (.github/workflows/rust_tests.yml) to catch what you couldn't check locally. cargo test and cargo check work with any standard Rust install and should always be run regardless.

If something fails

  • Test failure → see .cursor/skills/debug-rust-panic/SKILL.md.
  • Clippy failure on unwrap_used/expect_used → replace with proper error propagation (? + the relevant *Error enum in utils/error.rs) or LockExt::lock_safe() for mutex locks. Don't #[allow(...)] your way around it outside a test module — that defeats the point of the lint.
  • cargo check --features android failure → likely a jni-crate-typed value leaked outside a #[cfg(feature = "android")] block, or a genuine signature mismatch after a Kotlin-side JNI method change. Check android_jni.rs and the corresponding Kotlin external fun declaration agree on the signature.
  • cargo fmt --check failure → just run cargo fmt, this one's safe to auto-fix.

Read the full file on GitHub · 71 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 · 71 lines · 48 tokens per session scan A 05f9e1ef5102

Subscribe to this mod's changes

run-tests-and-fix is a skill published in the GitHub repository MannanSaood/termi (8 stars, last pushed 8d ago), licensed MIT. It adds 48 tokens to every session and 794 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

compose-ui-testing-patterns

Use when writing or reviewing Jetpack Compose UI tests, screenshot tests, previews, semantics assertions, fake image loading, keyboard input, focus assertions, interaction state (hover/pressed/focused), or tests for plain state-driven UI composables.

chrisbanes/skills · 54 tokens

verify-android-change

Select and run proportionate checks for changes in this Android and Kotlin repository. Use after modifying Kotlin, Compose, Gradle, resources, shell scripts, tests, dependencies, screenshots, benchmarks, or AI guidance; when diagnosing a failed local check; or before reporting an implementation complete.

ashtanko/compose-android-template · 61 tokens

config-fails-open-verify-artifact

Verifying a config-driven feature against the generated artifact instead of against the config, for formats that fail open and ignore unknown keys — the two-build A/B diff, the artifact fingerprint to grep for, and the CI assertion that keeps it from regressing. Reach for it when a config key looks correct, the build…

maxrave-dev/kotlin-footguns · 88 tokens

native-artifact-for-embedding

Producing a native shared library a JVM app can actually load and ship — why a prebuilt portable bundle usually is not a loadable library at all, building on the oldest base system you support, run-path choice, which libraries to deliberately leave out of the bundle, and gating the build on a load-and-initialize smoke…

maxrave-dev/kotlin-footguns · 111 tokens

fixthis-release-smoke

Run FixThis release and trust-loop smoke checks.

beyondwin/FixThis · 16 tokens

compose-ui-testing-patterns

Use when writing or reviewing Jetpack Compose UI tests, screenshot tests, previews, semantics assertions, fake image loading, keyboard input, focus assertions, interaction state (hover/pressed/focused), or tests for plain state-driven UI composables.

ashtanko/compose-android-template · 54 tokens