Actix-web Framework

High-performance Rust web framework with actor model foundation.

16 stars

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

$curl -o ~/.claude/skills/actix-web-framework/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/development/actix-web-framework/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/actix-web-framework/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How Actix-web Framework Compares

Feature / AgentActix-web FrameworkStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/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 tests

Related Skills

agent-framework-azure-ai-py

16
from diegosouzapw/awesome-omni-skill

Build Azure AI Foundry agents using the Microsoft Agent Framework Python SDK (agent-framework-azure-ai). Use when creating persistent agents with AzureAIAgentsProvider, using hosted tools (code int...

Advanced Playwright E2E Framework

16
from diegosouzapw/awesome-omni-skill

Enterprise-grade Playwright test automation framework using 8-layer architecture with Page Object Model, Module Pattern, custom fixtures, API testing layer, structured logging, data generators, multi-browser support, Docker, CI/CD pipelines, and custom HTML reporting.

account-health-framework

16
from diegosouzapw/awesome-omni-skill

Use to score accounts, flag risks, and standardize remediation triggers.

9d-framework

16
from diegosouzapw/awesome-omni-skill

9D product development framework

agricultural-easement-negotiation-frameworks

16
from diegosouzapw/awesome-omni-skill

Expert in negotiating utility easements with farmers including farm operation impact assessment (crop production, livestock, equipment), compensation structure design (one-time vs. recurring, mitigation works), and multi-generational farm psychology. Use when negotiating transmission line, pipeline, or drainage easements with agricultural landowners. Key terms include agricultural easement, farm operation impacts, tower placement, crop loss, irrigation impacts, easement compensation, farm succession

microsoft-agent-framework

16
from diegosouzapw/awesome-omni-skill

Expert guidance for implementing AI agents and multi-agent workflows using Microsoft Agent Framework. Use when adding AI agent capabilities, implementing multi-agent orchestration patterns, integrating MCP tools, or building intelligent automation systems. Emphasizes gathering up-to-date information from official documentation before implementation.

data-quality-frameworks

16
from diegosouzapw/awesome-omni-skill

Implement data quality validation with Great Expectations, dbt tests, and data contracts. Use when building data quality pipelines, implementing validation rules, or establishing data contracts.

agent-os-framework

16
from diegosouzapw/awesome-omni-skill

Generate standardized .agent-os directory structure with product documentation, mission, tech-stack, roadmap, and decision records. Enables AI-native workflows.

ab-test-framework-ml

16
from diegosouzapw/awesome-omni-skill

Эксперт A/B тестирования. Используй для статистических тестов, экспериментов и ML-оптимизации.

startup-metrics-framework

16
from diegosouzapw/awesome-omni-skill

This skill should be used when the user asks about \\\"key startup metrics", "SaaS metrics", "CAC and LTV", "unit economics", "burn multiple", "rule of 40", "marketplace metrics", or requests...

sla-management-framework

16
from diegosouzapw/awesome-omni-skill

SLAs for rev ops: response times, escalation, enforcement. Use when defining or managing sales and marketing SLAs.

Django Framework

16
from diegosouzapw/awesome-omni-skill

Build production-ready web applications with Django MVC, ORM, authentication, and REST APIs