{"id":50490867,"url":"https://github.com/melonask/axum-skills","last_synced_at":"2026-06-02T02:31:18.554Z","repository":{"id":353009087,"uuid":"1216488764","full_name":"melonask/axum-skills","owner":"melonask","description":"Rust Web Framework Skill","archived":false,"fork":false,"pushed_at":"2026-05-04T21:07:09.000Z","size":81,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-04T23:20:16.265Z","etag":null,"topics":["axum","http","routing","rust","skills"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/melonask.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-21T00:44:40.000Z","updated_at":"2026-05-04T21:07:20.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/melonask/axum-skills","commit_stats":null,"previous_names":["melonask/axum-skills"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/melonask/axum-skills","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/melonask%2Faxum-skills","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/melonask%2Faxum-skills/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/melonask%2Faxum-skills/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/melonask%2Faxum-skills/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/melonask","download_url":"https://codeload.github.com/melonask/axum-skills/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/melonask%2Faxum-skills/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33803734,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-02T02:00:07.132Z","response_time":109,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["axum","http","routing","rust","skills"],"created_at":"2026-06-02T02:31:17.996Z","updated_at":"2026-06-02T02:31:18.537Z","avatar_url":"https://github.com/melonask.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# axum-skills\n\nA comprehensive skill for building web applications and APIs with [axum](https://github.com/tokio-rs/axum) (by tokio-rs). This skill enables LLM developers to build production-ready HTTP services in Rust using axum's ergonomic handler-based API, its deep integration with the Tower middleware ecosystem, and the full power of async Rust via Tokio.\n\n## Overview\n\nThis skill provides complete guidance for every major feature of the axum framework (version 0.8.x), including:\n\n- **Routing** — Path parameters, nested routers, wildcard routes, fallbacks, method routing, route merging\n- **Extractors** — Path, Query, Json, Form, Bytes, String, State, Extension, HeaderMap, WebSocket, Multipart, cookies, TypedHeader, Either/N types, and custom extractors\n- **Responses** — IntoResponse trait, IntoResponseParts, status codes, headers, HTML, JSON, streaming, redirects\n- **Middleware** — `middleware::from_fn`, `from_fn_with_state`, `map_request`, `map_response`, tower layers, per-route middleware\n- **State Management** — Shared application state, FromRef, Extension, Arc patterns\n- **Error Handling** — Custom error types, rejection types, WithRejection, BoxError\n- **Real-Time** — WebSocket (HTTP/1 and HTTP/2), Server-Sent Events (SSE), broadcast patterns\n- **File Handling** — Multipart uploads, static file serving, SPA fallback\n- **Cookies** — Plain, signed (HMAC), and private (AES-encrypted) cookie management\n- **Production Layers** — CORS, tracing, compression, timeouts, rate limiting, auth, request IDs via tower-http\n- **Testing** — Unit and integration testing with tower::ServiceExt\n- **Migration** — Upgrading from axum 0.7 to 0.8\n\n## Installation\n\n```bash\nnpx skills add melonask/axum-skills\n```\n\n## File Structure\n\n```\naxum/\n├── SKILL.md                          # Core skill instructions (entry point)\n├── README.md                         # This file — skill overview and installation\n└── references/                       # Deep-dive guides loaded on demand\n    ├── routing.md                    # Route definition, path params, nesting, fallbacks\n    ├── extractors.md                 # All extractors (axum + axum-extra)\n    ├── responses.md                  # IntoResponse, IntoResponseParts, response builders\n    ├── middleware.md                  # from_fn, from_fn_with_state, map_request/response\n    ├── state-management.md           # State, FromRef, Extension, Arc patterns\n    ├── error-handling.md             # Custom errors, rejections, WithRejection\n    ├── realtime.md                   # WebSocket, SSE, broadcast patterns\n    ├── files-uploads.md              # Multipart uploads, static file serving\n    ├── cookies.md                    # CookieJar, SignedCookieJar, PrivateCookieJar\n    ├── tower-http-layers.md          # All tower-http middleware layers\n    ├── testing.md                    # Unit and integration testing patterns\n    └── migration-0.8.md              # Migration guide from axum 0.7 to 0.8\n```\n\n## Quick Start\n\n```toml\n# Cargo.toml\n[dependencies]\naxum = \"0.8.9\"\ntokio = { version = \"1\", features = [\"rt-multi-thread\", \"macros\"] }\nserde = { version = \"1\", features = [\"derive\"] }\nserde_json = \"1\"\n```\n\n```rust\nuse axum::{Router, routing::get, serve};\n\nlet app = Router::new().route(\"/\", get(|| async { \"Hello, World!\" }));\n\nlet listener = tokio::net::TcpListener::bind(\"0.0.0.0:3000\").await.unwrap();\nserve(listener, app).await.unwrap();\n```\n\n## Compatible Versions\n\n| Crate         | Version                 |\n| ------------- | ----------------------- |\n| `axum`        | 0.8.x (latest: 0.8.9)   |\n| `axum-core`   | 0.5.x (latest: 0.5.6)   |\n| `axum-extra`  | 0.12.x (latest: 0.12.6) |\n| `axum-macros` | 0.5.x (latest: 0.5.1)   |\n| `tower-http`  | 0.6.x                   |\n| `tower`       | 0.5.x                   |\n| `tokio`       | 1.x                     |\n| `hyper`       | 1.4+                    |\n\n## How It Works\n\nThe skill uses a **progressive disclosure** architecture:\n\n1. **SKILL.md** (always loaded) — Provides crate architecture, quick-start setup, feature flags, 6 core code patterns, key concepts, and a routing table pointing to reference files\n2. **references/\\*.md** (loaded on demand) — When a user's request involves a specific area (e.g., middleware, cookies, WebSocket), the LLM reads the corresponding reference file for in-depth guidance with additional code examples and edge cases\n\nThis keeps the initial context small while making detailed information available when needed.\n\n## Key Design Principles\n\n- **Handler-first**: Axum converts ordinary async functions into HTTP handlers via trait implementations (`FromRequest`, `IntoResponse`)\n- **Tower-native**: Every axum `Router` is a `tower::Service`, so any tower middleware works without adapters\n- **Type-safe**: Path parameters, query strings, and request bodies are deserialized into typed structs via serde\n- **Ergonomic**: Extractors as function parameters, tuple responses for status + body, automatic error propagation\n- **Zero-cost abstractions**: No runtime overhead beyond what Tokio and Hyper already provide\n\n## License\n\nThis skill is provided as-is for educational and development purposes. axum itself is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmelonask%2Faxum-skills","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmelonask%2Faxum-skills","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmelonask%2Faxum-skills/lists"}