Actix-web Framework
High-performance Rust web framework with actor model foundation.
Best use case
Actix-web Framework is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
High-performance Rust web framework with actor model foundation.
Teams using Actix-web Framework should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/actix-web/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How Actix-web Framework Compares
| Feature / Agent | Actix-web Framework | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
High-performance Rust web framework with actor model foundation.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Actix-web Standards
## Handler Functions
```rust
use actix_web::{web, HttpResponse, Result};
// Path parameters
async fn get_user(path: web::Path<u64>) -> Result<HttpResponse> {
let user_id = path.into_inner();
Ok(HttpResponse::Ok().json(user))
}
// Query parameters
#[derive(Deserialize)]
struct Pagination {
page: Option<u32>,
limit: Option<u32>,
}
async fn list_users(query: web::Query<Pagination>) -> Result<HttpResponse> {
let page = query.page.unwrap_or(1);
Ok(HttpResponse::Ok().json(users))
}
// JSON body
async fn create_user(body: web::Json<CreateUser>) -> Result<HttpResponse> {
let user = body.into_inner();
Ok(HttpResponse::Created().json(created))
}
```
## Extractors
| Extractor | Purpose |
|-----------|---------|
| `web::Path<T>` | URL path parameters |
| `web::Query<T>` | Query string |
| `web::Json<T>` | JSON request body |
| `web::Form<T>` | Form data |
| `web::Data<T>` | Application state |
| `HttpRequest` | Full request access |
**Custom Extractors**:
```rust
impl FromRequest for AuthUser {
type Error = Error;
type Future = Ready<Result<Self, Self::Error>>;
fn from_request(req: &HttpRequest, _: &mut Payload) -> Self::Future {
// Extract and validate auth header
}
}
```
## State Management
```rust
struct AppState {
db: PgPool,
cache: RedisPool,
}
#[actix_web::main]
async fn main() -> std::io::Result<()> {
let state = web::Data::new(AppState {
db: create_pool().await,
cache: create_cache().await,
});
HttpServer::new(move || {
App::new()
.app_data(state.clone())
.service(handlers)
})
.bind("127.0.0.1:8080")?
.run()
.await
}
// Access in handlers
async fn handler(state: web::Data<AppState>) -> Result<HttpResponse> {
let conn = state.db.acquire().await?;
Ok(HttpResponse::Ok().finish())
}
```
## Middleware
```rust
use actix_web::middleware::{Logger, Compress, NormalizePath};
App::new()
.wrap(Logger::default())
.wrap(Compress::default())
.wrap(NormalizePath::trim())
.wrap(custom_middleware)
// Custom middleware
async fn auth_middleware(
req: ServiceRequest,
srv: &Service,
) -> Result<ServiceResponse, Error> {
// Validate token
srv.call(req).await
}
```
## Error Handling
```rust
use actix_web::{error, HttpResponse};
#[derive(Debug, thiserror::Error)]
enum ApiError {
#[error("Not found")]
NotFound,
#[error("Database error")]
Database(#[from] sqlx::Error),
}
impl error::ResponseError for ApiError {
fn error_response(&self) -> HttpResponse {
match self {
ApiError::NotFound => HttpResponse::NotFound().json({"error": "Not found"}),
ApiError::Database(_) => HttpResponse::InternalServerError().finish(),
}
}
}
```
## Routing
```rust
App::new()
.route("/", web::get().to(index))
.service(
web::scope("/api/v1")
.route("/users", web::get().to(list_users))
.route("/users/{id}", web::get().to(get_user))
.route("/users", web::post().to(create_user))
)
```
## Best Practices
1. **Concurrency**: Use `.workers(N)` to control thread pool size
2. **Timeouts**: Configure `keep_alive` and client timeouts
3. **Graceful Shutdown**: Handle SIGTERM properly
4. **Testing**: Use `actix_web::test` for integration testsRelated Skills
account-health-framework
Use to score accounts, flag risks, and standardize remediation triggers.
ab-test-framework-ml
Эксперт A/B тестирования. Используй для статистических тестов, экспериментов и ML-оптимизации.
9d-framework
9D product development framework
thor-skills
An entry point and router for AI agents to manage various THOR-related cybersecurity tasks, including running scans, analyzing logs, troubleshooting, and maintenance.
grail-miner
This skill assists in setting up, managing, and optimizing Grail miners on Bittensor Subnet 81, handling tasks like environment configuration, R2 storage, model checkpoint management, and performance tuning.
chrome-debug
This skill empowers AI agents to debug web applications and inspect browser behavior using the Chrome DevTools Protocol (CDP), offering both collaborative (headful) and automated (headless) modes.
whisper-transcribe
Transcribes audio and video files to text using OpenAI's Whisper CLI, enhanced with contextual grounding from local markdown files for improved accuracy.
lets-go-rss
A lightweight, full-platform RSS subscription manager that aggregates content from YouTube, Vimeo, Behance, Twitter/X, and Chinese platforms like Bilibili, Weibo, and Douyin, featuring deduplication and AI smart classification.
ontopo
An AI agent skill to search for Israeli restaurants, check table availability, view menus, and retrieve booking links via the Ontopo platform, acting as an unofficial interface to its data.
astro
This skill provides essential Astro framework patterns, focusing on server-side rendering (SSR), static site generation (SSG), middleware, and TypeScript best practices. It helps AI agents implement secure authentication, manage API routes, and debug rendering behaviors within Astro projects.
vly-money
Generate crypto payment links for supported tokens and networks, manage access to X402 payment-protected content, and provide direct access to the vly.money wallet interface.
tech-blog
Generates comprehensive technical blog posts, offering detailed explanations of system internals, architecture, and implementation, either through source code analysis or document-driven research.