Web service architecture with async handlers, type-safe extractors, and middleware composition.
Works with
Enforces async-first design to prevent blocking request handlers; use spawn_blocking for CPU-intensive work
Manages shared application state via Arc<T> and Arc<RwLock<T>> to ensure thread safety across concurrent requests
Provides extractor pattern for request parsing and validation (e.g., State(db) , Json(payload) ) with unified error responses via IntoResponse
Supports
AI-first code editor with Composer
Before installing skills in Cursor, ensure your development environment meets these requirements:
node --versiondomain-webExecute the skills CLI command in your project's root directory to begin installation:
Fetches domain-web from zhanghandong/rust-skills and configures it for Cursor.
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Confirm successful installation by checking the skill directory location:
Restart Cursor to activate domain-web. Access via /domain-web in your agent's command palette.
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
Submit your Claude Code skill and start earning
Automate repetitive workflows and reduce manual effort
Example
Generate reports, summarize documents, draft communications
Save 3-5 hours per week on routine tasks
Learn new skills, understand complex topics, get expert guidance
Example
Explain concepts, provide examples, suggest learning resources
Accelerate learning and skill development by 2x
Enhance output quality through reviews, suggestions, and refinements
Example
Review drafts, suggest improvements, catch errors
Improve work quality by 30-40% with less effort
0
total installs
0
this week
979
GitHub stars
0
upvotes
Run in your terminal
0
installs
0
this week
979
stars
Layer 3: Domain Constraints
| Domain Rule | Design Constraint | Rust Implication |
|---|---|---|
| Stateless HTTP | No request-local globals | State in extractors |
| Concurrency | Handle many connections | Async, Send + Sync |
| Latency SLA | Fast response | Efficient ownership |
| Security | Input validation | Type-safe extractors |
| Observability | Request tracing | tracing + tower layers |
RULE: Web handlers must not block
WHY: Block one task = block many requests
RUST: async/await, spawn_blocking for CPU work
RULE: Shared state must be thread-safe
WHY: Handlers run on any thread
RUST: Arc<T>, Arc<RwLock<T>> for mutable
RULE: Resources live only for request duration
WHY: Memory management, no leaks
RUST: Extractors, proper ownership
From constraints to design (Layer 2):
"Need shared application state"
↓ m07-concurrency: Use Arc for thread-safe sharing
↓ m02-resource: Arc<RwLock<T>> for mutable state
"Need request validation"
↓ m05-type-driven: Validated extractors
↓ m06-error-handling: IntoResponse for errors
"Need middleware stack"
↓ m12-lifecycle: Tower layers
↓ m04-zero-cost: Trait-based composition
| Framework | Style | Best For |
|---|---|---|
| axum | Functional, tower | Modern APIs |
| actix-web | Actor-based | High performance |
| warp | Filter composition | Composable APIs |
| rocket | Macro-driven | Rapid development |
| Purpose | Crate |
|---|---|
| HTTP server | axum, actix-web |
| HTTP client | reqwest |
| JSON | serde_json |
| Auth/JWT | jsonwebtoken |
| Session | tower-sessions |
| Database | sqlx, diesel |
| Middleware | tower |
| Pattern | Purpose | Implementation |
|---|---|---|
| Extractors | Request parsing | State(db), Json(payload) |
| Error response | Unified errors | impl IntoResponse |
| Middleware | Cross-cutting | Tower layers |
| Shared state | App config | Arc<AppState> |
async fn handler(
State(db): State<Arc<DbPool>>,
Json(payload): Json<CreateUser>,
) -> Result<Json<User>, AppError> {
let user = db.create_user(&payload).await?;
Ok(Json(user))
}
// Error handling
impl IntoResponse for AppError {
fn into_response(self) -> Response {
let (status, message) = match self {
Self::NotFound => (StatusCode::NOT_FOUND, "Not found"),
Self::Internal(_) => (StatusCode::INTERNAL_SERVER_ERROR, "Internal error"),
};
(status, Json(json!({"error": message}))).into_response()
}
}
| Mistake | Domain Violation | Fix |
|---|---|---|
| Blocking in handler | Latency spike | spawn_blocking |
| Rc in state | Not Send + Sync | Use Arc |
| No validation | Security risk | Type-safe extractors |
| No error response | Bad UX | IntoResponse impl |
| Constraint | Layer 2 Pattern | Layer 1 Implementation |
|---|---|---|
| Async handlers | Async/await | tokio runtime |
| Thread-safe state | Shared state | Arc, Arc<RwLock> |
| Request lifecycle | Extractors | Ownership via From |
| Middleware | Tower layers | Trait-based composition |
| When | See |
|---|---|
| Async patterns | m07-concurrency |
| State management | m02-resource |
| Error handling | m06-error-handling |
| Middleware design | m12-lifecycle |
Prerequisites
Time Estimate
15-45 minutes depending on use case complexity
Steps
Common Pitfalls
✓ Do
✗ Don't
💡 Pro Tips
✓ Use when
Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.
✗ Avoid when
Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.
supercent-io/skills-template
emilkowalski/skills
skillcreatorai/ai-agent-skills
jwynia/agent-skills
emilkowalski/skills
davila7/claude-code-templates
domain-web has been reliable in day-to-day use. Documentation quality is above average for community skills.
Solid pick for teams standardizing on skills: domain-web is focused, and the summary matches what you get after install.
Useful defaults in domain-web — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
We added domain-web from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
I recommend domain-web for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
domain-web fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
domain-web fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
Registry listing for domain-web matched our evaluation — installs cleanly and behaves as described in the markdown.
Keeps context tight: domain-web is the kind of skill you can hand to a new teammate without a long onboarding doc.
Registry listing for domain-web matched our evaluation — installs cleanly and behaves as described in the markdown.
showing 1-10 of 27