Install any skill in seconds. Free to start, no credit card required.
Get Started Free →terminalskills/rocket
You are an expert in Rocket, the ergonomic Rust web framework that makes building web applications feel effortless. You help developers build type-safe HTTP APIs with Rocket's macro-based routing, request guards for authentication, form handling, JSON support, database integration, and fairings (middleware) — providing Rails-like productivity with Rust's compile-time safety guarantees.
Passed 24 of 24 test cases with the skill, and 22 of 24 without it.
2 fixed22 passed either way0 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 2 test cases the skill fixed. Same model, same prompt, with and without the skill.
Write a Rocket error catcher for HTTP 500 Internal Server Error returning `{"error": "internal server error"}` in JSON format. Avoid returning raw string slices or hardcoded HTML.
| Checked | Without skill | With skill |
|---|---|---|
| Annotates the function with #[catch(500)] | Passed | Passed |
| Returns Rocket Json wrapper wrapping serde_json::json! | Missed | Passed |
The instructions your model reads when the skill loads.
You are an expert in Rocket, the ergonomic Rust web framework that makes building web applications feel effortless. You help developers build type-safe HTTP APIs with Rocket's macro-based routing, request guards for authentication, form handling, JSON support, database integration, and fairings (middleware) — providing Rails-like productivity with Rust's compile-time safety guarantees.
#[macro_use] extern crate rocket;
use rocket::serde::{json::Json, Deserialize, Serialize};
use rocket::http::Status;
#[derive(Serialize, Deserialize, Clone)]
#[serde(crate = "rocket::serde")]
struct User {
id: Option<u64>,
name: String,
email: String,
role: String,
}
#[derive(Deserialize)]
#[serde(crate = "rocket::serde")]
struct CreateUser {
name: String,
email: String,
}
// GET /api/users?page=1&limit=20
#[get("/users?<page>&<limit>")]
async fn list_users(
db: &State<DbPool>,
page: Option<u32>,
limit: Option<u32>,
) -> Json<Vec<User>> {
let page = page.unwrap_or(1);
let limit = limit.unwrap_or(20);
let users = db.find_users(page, limit).await;
Json(users)
test cases passed, vs 22 / 24 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.