Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Use when adding, changing, testing, or reviewing security-sensitive Rust web service behavior, especially login flows, password hashing, credential checks, session cookies, flash messages, admin route protection, auth middleware, user enumeration defenses, or moving CPU-heavy password work off async executors.
.claude/skills/hashgraph-online-rust-service-security/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-03 | ✗→✓ | ▲ Improved | -8% | 0% |
| case-11 | ✗→✓ | ▲ Improved | 54% | 0% |
| case-16 | ✗→✓ | ▲ Improved | -29% | 0% |
| case-09 | ✓→✓ | = Same ✓ | 6% | 0% |
| case-02 | ✓→✓ | = Same ✓ | 11% | 0% |
Use this skill when a Rust service handles identity, credentials, sessions, cookies, privileged routes, or sensitive user data. Prefer explicit threat checks and tests over optimistic handler code.
password change, reset token, private data, or privileged operation.
session mutation, redirects/responses, logs, and tests.
tokens, signing keys, and session secrets.
CPU-heavy work off async reactor threads.
reveal whether the account exists.
HttpOnly, Secure,SameSite, path, lifetime, signing/encryption, and store backend.
ad-hoc checks in every handler.
token, and logout/session rotation behavior.
Read references/password-auth.md before implementing or changing password storage or verification.
hasher; never store plaintext or reversible encrypted passwords.
tokio::task::spawn_blocking or a dedicated blocking abstraction forexpensive password operations.
Read references/cookies-sessions.md when setting, reading, deleting, signing, or persisting cookies and sessions.
Set-Cookie headers.Read references/auth-middleware.md when adding admin routes, extractors, guards, or framework middleware.
Keep handlers typed:
rustpub async fn admin_dashboard(user: AuthenticatedUser) -> Result<HttpResponse, AppError> { // Handler can assume authentication succeeded. Ok(HttpResponse::Ok().finish()) }
Avoid optional user lookups in handlers that require authentication; make the missing-user case impossible at the handler signature when the framework allows it.
references/password-auth.md: Argon2, PHC strings, user enumeration, andblocking password work.
references/cookies-sessions.md: cookie flags, signed messages, server-sidesessions, and logout.
references/auth-middleware.md: route guards, extractors, and typed sessionaccess.
Other measured skills in the registry, with their headline benchmark lift.