Design or review software architecture, API contracts, data models, and module boundaries for the Static Web Server (SWS) project

Apache-2.0Auto-check passedDevelopment

Install Design

skills CLI
$ npx skills add static-web-server/static-web-server --skill design -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install static-web-server/static-web-server design --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/static-web-server/static-web-server.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/design .claude/skills/design && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
design
GitHub stars
2.4k
Token cost
~1.8k tokens
SKILL.md length
830 words
Files
1
Skills in repo
9
Repo updated
First seen
Licence
Apache-2.0

At a glance

Design or review software architecture, API contracts, data models, and module boundaries for the Static Web Server (SWS) project

  • Works in 3 steps: Pre-processing steps return early when… → Post-processing steps are additive —… → Order matters: static compression runs…
  • Tasks that involve Software architecture
  • SKILL.md covers Principles, Module Architecture, Request Pipeline Design and Configuration Design, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Design is an agent skill from static-web-server/static-web-server. Design or review software architecture, API contracts, data models, and module boundaries for the Static Web Server (SWS) project

Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Software architecture and API design. It works with Linux. The repository describes itself as: A cross-platform, high-performance and asynchronous web server for static files-serving. ⚡. The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Software architecture
  • Tasks that involve API design

Example prompts

  • “/design”

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Pre-processing steps return early when they handle the request (CORS preflight, redirect, health check)
  2. Post-processing steps are additive — they append or modify headers. No step removes headers set by prior steps
  3. Order matters: static compression runs before dynamic compression (pre-compressed files avoid CPU cost), cache-control runs before…

What it can do on your machine

Read from SKILL.md and the folder at commit 32ec4aa. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Design loads about 1.8k tokens when it runs. Until then it costs about 34 tokens; SKILL.md has 830 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~34
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from static-web-server/static-web-server at commit 32ec4aa, republished under its Apache-2.0 licence (© static-web-server). 830 words, ~1,842 tokens.

Download SKILL.mdSave it as .claude/skills/design/SKILL.md (or your agent's skills folder).
name
design
description
Design or review software architecture, API contracts, data models, and module boundaries for the Static Web Server (SWS) project

Software Design

Load this skill when designing new features, refactoring modules, defining configuration interfaces, or reviewing architecture decisions for SWS.

When to load: a new feature spans more than one module, a config option is being added or changed, a new step is needed in the request pipeline, a Cargo feature flag is being introduced, or an architecture decision needs review.

Principles

  • Static file server first: Every design decision starts from "how does this improve serving static files securely and efficiently?"
  • Small, static binary: Release binary is ~4MB (uncompressed, musl). New dependencies must not increase it by more than 100KB unless they replace existing functionality or gate behind a feature flag
  • Feature-gate optional functionality: Every non-core feature lives behind a Cargo feature flag AND a #[cfg(feature = "...")] gate. Users compile only what they need
  • Three channels, one source of truth: CLI args, env vars, and TOML config all map to the same General struct. Precedence (highest→lowest): CLI args → env vars → TOML config → compiled defaults
  • Pre-compute at startup, serve at speed: Resolve, canonicalize, and validate everything possible at server startup. The request hot path is allocation-light and syscall-minimal

Module Architecture

Core Pipeline
settings/     →  server/opts.rs  →  handler.rs  →  static_files.rs
  (parse)         (init)              (pipeline)      (serve file)
Module Responsibilities
ModuleResponsibility
settings/Parse CLI/env/TOML, merge, validate
server/Bind listener, start HTTP/1 or HTTP/2+TLS, graceful shutdown
handler.rsOrchestrate request pre/post processing pipeline
static_files.rsPath resolution, index files, directory listing, byte-range, pre-compressed variants
compression.rsOn-the-fly gzip/deflate/brotli/zstd compression
compression_static.rsServe pre-compressed .br/.gz/.zst files from disk
security_headers.rsAppend HSTS, CSP, X-Frame-Options, X-Content-Type-Options, Referrer-Policy
control_headers.rsAppend Cache-Control based on file extension
cors.rsCORS pre-flight and header injection
fs/File system utilities: path sanitization (fs/path.rs), metadata (fs/meta.rs), streaming (fs/stream.rs)
exts/HTTP extensions: Accept-Encoding parsing, content-coding negotiation (exts/http.rs, exts/headers/, exts/mime.rs)
directory_listing/HTML/JSON directory index generation
body.rsUnified response body type — pub type Body = BoxBody<Bytes, io::Error> (alias, not a struct)
service.rsHyper Service bridge: RouterService → RequestService → RequestHandler
Feature Flags as Module Boundaries

Every optional feature is both a Cargo feature AND a #[cfg(feature = "...")] gate:

  • compression → compression.rs + compression_static.rs (meta-feature: compression-brotli/-deflate/-gzip/-zstd)
  • directory-listing → directory_listing/
  • http2 → server/http2.rs (requires tls)
  • tls (base plumbing, no crypto provider) → tls.rs + server/http1_tls.rs. tls-ring (default) or tls-fips selects the provider
  • basic-auth → basic_auth.rs
  • fallback-page → fallback_page.rs
  • metrics → metrics.rs. experimental adds tokio-metrics-collector and requires RUSTFLAGS="--cfg tokio_unstable"
  • mem-cache → mem_cache/ (LFU admission + LRU eviction via mini-moka, CompactString keys)

Request Pipeline Design

The handler's handle() method is the single entry point. The pipeline is linear with three phases:

#StepPhaseCan Short-Circuit?
1Method checkPreYes (405)
2Health/metricsPreYes
3CORS validationPreYes (preflight 204)
4Basic authPreYes (401)
5Maintenance modePreYes (503)
6RedirectsPreYes (301/302)
7RewritesPreNo (modifies URI, continues)
8Virtual hostsPreNo (selects config, continues)
9Markdown negotiationPreNo (sets content-type hint, continues)
10static_files::handle()CoreNo (always produces a response)
11Fallback pagePostNo
12CORS headersPostNo
13Markdown content-typePostNo
14Text charsetPostNo
15Static compression varyPostNo
16Dynamic compressionPostNo
17Cache-ControlPostNo
18Security headersPostNo
19Custom headersPostNo

When adding a new step, specify its position relative to an existing step by number.

Show full SKILL.md (313 more words)Show less
Design Rules for the Pipeline
  1. Pre-processing steps return early when they handle the request (CORS preflight, redirect, health check)
  2. Post-processing steps are additive — they append or modify headers. No step removes headers set by prior steps
  3. Order matters: static compression runs before dynamic compression (pre-compressed files avoid CPU cost), cache-control runs before security headers (custom headers — applied last — take final precedence)

Configuration Design

The General struct

CLI arguments, environment variables, and TOML keys all resolve to the same General struct:

--port 8787  ↔  SERVER_PORT=8787  ↔  [general] port = 8787
TOML Config File

Advanced features (custom headers, rewrites, redirects, virtual hosts) are TOML-only. They live in a separate Advanced struct and require glob/regex patterns.

Default Values Philosophy
  • Secure by default: Hidden files ignored, symlinks disabled, security headers enabled when TLS is active
  • Performant by default: Compression, cache-control, and HTTP/2 are default-on Cargo features (opt-out via --no-default-features). Disable them to reduce binary size if not needed
  • Conservative where it matters: Grace period at 0 (explicit opt-in), directory listing off, CORS off

File Serving Design

Index File Resolution
  1. Request for / or /dir/ → directory detected via metadata
  2. Try each index file in the user-configured order (default: ["index.html", "index.htm"])
  3. For each index candidate: check pre-compressed variant, then regular file, then .html suffix fallback
  4. If no index found → directory listing (if enabled) or 404
Pre-compressed Variant Priority

Static (on-disk) compression is tried before dynamic (on-the-fly). The client's Accept-Encoding header determines variant selection. SWS honors quality values.

Byte-Range Serving

static_files.rs supports Range: bytes= for partial content delivery. Multi-range responses use multipart/byteranges.

Review Checklist

  • Is the new code behind an appropriate feature flag if optional?
  • Does the request pipeline order make sense (pre → core → post)?
  • Are paths canonicalized once, not per-request?
  • Can every public function be tested with the existing fixture infrastructure?
  • Are error states mapped to appropriate HTTP status codes?
  • Does the config change work across all three channels (CLI, env, TOML)?

© static-web-server, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/design of static-web-server/static-web-server.

Open the folder on GitHubat commit 32ec4aa

Compare with similar skills

Design next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Design compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Design this skillstatic-web-server/static-web-server2.4k—~1.8kAutomated safety check: PassApache-2.0
Architecture Decisions and ADRsfirst-fluke/oh-my-agent1.3k—~2.6kAutomated safety check: PassMIT
Light System DesignLight0305/Light-skills640—~3.6kAutomated safety check: PassMIT
System Designopenxlings/xlings6151 repos~328Automated safety check: PassApache-2.0
Quarkus Patternsaffaan-m/ECC274k1 repos~5.4kAutomated safety check: PassMIT
Quarkus Patternsaffaan-m/ECC274k—~6.1kAutomated safety check: PassMIT

Similar skills

  • Architecture Decisions and ADRs

    first-fluke/oh-my-agent

    Evaluates system boundaries and tradeoffs and writes architecture recommendations, option comparisons or ADRs, with a Mermaid diagram when structure changes.

    1.3k GitHub stars~2.6k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Light System Design

    Light0305/Light-skills

    Evidence-based workflow for designing or modernizing a software system: current-state inventory, options, API and schema contracts, migration plans, ADRs and verification.

    640 GitHub stars~3.6k tokensUpdated 3 mo ago
    DevelopmentAuto-check passed
  • System Design

    openxlings/xlings

    Design systems, services, and architectures. An agent skill from openxlings/xlings.

    615 GitHub starsUsed in 1 repo~328 tokens
    Backend & APIsAuto-check passed
  • Quarkus Patterns

    affaan-m/ECC

    Quarkus 3.x LTS architecture patterns with Camel for messaging, RESTful API design, CDI services, data access with Panache, and async processing.

    274k GitHub starsUsed in 1 repo~5.4k tokens
    Backend & APIsAuto-check passed
  • Quarkus Patterns

    affaan-m/ECC

    Quarkus 3.x LTS architecture patterns with Camel for messaging, RESTful API design, CDI services, data access with Panache, and async processing.

    274k GitHub stars~6.1k tokensUpdated 2 days ago
    Backend & APIsAuto-check passed
  • URL Shortener Interviewer

    PrepLabsAI/InterviewMentor

    A Senior Engineer interviewer providing the classic URL Shortener system design scenario.

    112 GitHub stars~2.6k tokensUpdated today
    Backend & APIsAuto-check passed

More from static-web-server/static-web-server

All 9 skills in this repo
  • Issue Tracking

    static-web-server/static-web-server

    Triage, debug, fix, and document issues for the Static Web Server (SWS) project — bug reports, root cause analysis, fix implementation, and regression prevention

    2.4k GitHub stars~1.5k tokensUpdated yesterday
    Auto-check passed
  • Performance

    static-web-server/static-web-server

    Optimize or review performance for the Static Web Server (SWS) project — profiling, bottlenecks, resource usage, compression, and caching

    2.4k GitHub stars~3.1k tokensUpdated yesterday
    Auto-check passed
  • Prose

    static-web-server/static-web-server

    Author or edit any prose for the Static Web Server (SWS) project — documentation, design docs, READMEs, PR descriptions, issue bodies, commit message bodies, or other human-readable text — following…

    2.4k GitHub stars~971 tokensUpdated yesterday
    Auto-check passed
  • Rust Backend

    static-web-server/static-web-server

    Write or review Rust backend code for the Static Web Server (SWS) project — crates, modules, functions, types, error handling, and async code

    2.4k GitHub stars~1.7k tokensUpdated yesterday
    Auto-check passed
  • Static File Serving

    static-web-server/static-web-server

    Serve static files and web assets with optimal headers, MIME types, compression, and caching for the Static Web Server (SWS) project

    2.4k GitHub stars~1.8k tokensUpdated yesterday
    Auto-check passed
  • Testing

    static-web-server/static-web-server

    Write or review tests for the Static Web Server (SWS) project — unit tests, integration tests, test fixtures, and mocking strategies

    2.4k GitHub stars~1.5k tokensUpdated yesterday
    Auto-check passed

Works with

Categories

Questions about Design

What does Design do?

Design or review software architecture, API contracts, data models, and module boundaries for the Static Web Server (SWS) project. Design is an agent skill from static-web-server/static-web-server.

When should I use Design?

Design fits situations like: tasks that involve Software architecture; tasks that involve API design.

How do I install Design in Claude Code?

Run `npx skills add static-web-server/static-web-server --skill design -a claude-code`. Or copy the skill folder (.agents/skills/design in static-web-server/static-web-server) into .claude/skills/design in your project. Claude Code loads it when a task matches its description.

How do I install Design in Codex?

Run `npx skills add static-web-server/static-web-server --skill design -a codex`. Or copy the skill folder (.agents/skills/design in static-web-server/static-web-server) into .agents/skills/design in your project. Codex loads it when a task matches its description.

Can I use Design in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add static-web-server/static-web-server --skill design -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/design, .gemini/skills/design, .github/skills/design and .opencode/skills/design in your project.

What does Design need to run?

SKILL.md names no scripts, command-line tools or credentials: Design is instructions for the agent only.

Does Design access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Design safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Design use?

Design is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Design use?

About 1.8k tokens (SKILL.md is roughly 7.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Design?

Skills that share tags, products or a category with Design: Architecture Decisions and ADRs (first-fluke/oh-my-agent, 1.3k stars), Light System Design (Light0305/Light-skills, 640 stars), System Design (openxlings/xlings, 615 stars) and Quarkus Patterns (affaan-m/ECC, 274k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Design?

static-web-server (a GitHub organization) maintains it in static-web-server/static-web-server, which has 2,373 GitHub stars. The repository holds 9 skills in this directory. The repository was last updated on October 5, 2026.

Source: static-web-server/static-web-server on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.