axum-impl-static-files

Official

Serve static assets with correct Axum semantics

AuthorImpertio-Studio
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill prevents common, hard-to-debug Axum static-file routing mistakes by giving deterministic, version-stable guidance for serving files and SPAs with the correct tower-http service mounting patterns and HTTP status semantics.

Core Features & Use Cases

  • Correct Service vs Layer usage: Ensures ServeDir, ServeFile, and SetStatus are mounted as route services (.nest_service, .fallback_service, .route_service), never passed to .layer().
  • Accurate prefix handling: Avoids the “double prefix” bug by explaining how .nest_service() strips the URL prefix before the filesystem service sees the path.
  • Honest SPA fallback behavior: Implements the canonical SPA pattern that returns index.html with 404 status for unknown URLs, using SetStatus and not_found_service.

Quick Start

Use the axum-impl-static-files skill when your Axum app must serve a CSS/JS/image directory under a URL prefix and you want an SPA fallback that loads index.html for unknown routes while returning HTTP 404.

Dependency Matrix

Required Modules

None required

Components

references

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: axum-impl-static-files
Download link: https://github.com/Impertio-Studio/Axum-Claude-Skill-Package/archive/main.zip#axum-impl-static-files

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.