domain-web — Claude Code skill: what it does, how to install
A Rust web-service skill covering async handlers, shared state, errors, extractors, and middleware. Use it when a project contains Cargo.toml.
npx skills add actionbook/rust-skills --skill domain-web -a claude-codeWhat domain-web does
domain-web gives an agent design rules for Rust web services. It covers HTTP, REST APIs, GraphQL, WebSocket, routers, handlers, extractors, authentication, JWT, sessions, CORS, and rate limiting. The skill targets projects matched by **/Cargo.toml.
Its guidance covers async execution, shared application state, and request lifetimes. It recommends Arc<T> or Arc<RwLock<T>>, type-driven input validation, IntoResponse for errors, and Tower layers for middleware. The material compares axum, actix-web, warp, and rocket, and names crates such as reqwest, serde_json, jsonwebtoken, sqlx, and diesel.
A blocking handler conflicts with the skill’s async rule, so CPU-heavy work belongs in spawn_blocking. Check that boundary before extending the route layer.
What it helps with
- design a Rust HTTP service
- choose a pattern for shared application state
- inspect handlers and request extractors
- return a consistent error response
- build middleware with Tower layers
Example prompts for the agent
- Design a Rust REST API for this project with
Cargo.toml; choose a suitable framework and lay out the routes. - Review these web handlers for blocking work, missing
Send + Sync, and unsafe shared-state patterns. - Add request validation and a shared
IntoResponseerror type while keeping the handlers async.
How to install domain-web
1Skills CLI (Vercel)
npx skills add actionbook/rust-skills --skill domain-web -a claude-code2Manually: put the files in place
~/.claude/skills/domain-web/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/domain-web/
1Skills CLI (Vercel)
npx skills add actionbook/rust-skills --skill domain-web -a codex2Manually: put the files in place
.agents/skills/domain-web/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add actionbook/rust-skills --skill domain-web -a cursor2Manually: put the files in place
.cursor/skills/domain-web/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install actionbook/rust-skills domain-web2Manually: put the files in place
.github/skills/domain-web/SKILL.md1Skills CLI (Vercel)
npx skills add actionbook/rust-skills --skill domain-web -a gemini-cli2Platform CLI
gemini skills install https://github.com/actionbook/rust-skills --path skills/domain-webManually: put the files in place
.devin/skills/domain-web/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add actionbook/rust-skills --skill domain-web -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about domain-web
How do I install domain-web in Claude Code?
Run npx skills add actionbook/rust-skills --skill domain-web -a claude-code, then run npx skills add actionbook/rust-skills --skill domain-web -a claude-code again and check ~/.claude/skills/domain-web/SKILL.md.
What does domain-web do?
The skill guides Rust web-service design around async handlers, shared state, extractors, errors, and middleware. It also maps common tasks to relevant frameworks and crates.
Why does it recommend Arc for shared state?
Handlers may run on different threads, so shared state needs to be thread-safe. Mutable shared state uses Arc<RwLock<T>>.