http-service-patterns Skill
Use when building an HTTP service with FastAPI lifecycle management, background poll loops, SPA static file serving with API reverse proxy, bidirectional WebSocket relay, or SSE event streaming. Published by microsoft in amplifier-bundle-skills.
What is http-service-patterns Skill?
Use when building an HTTP service with FastAPI lifecycle management, background poll loops, SPA static file serving with API reverse proxy, bidirectional WebSocket relay, or SSE event streaming. Published by microsoft in amplifier-bundle-skills. This profile combines repository metadata with install, compatibility, and usage signals so developers can quickly decide whether it fits their agent workflow before opening the source repository.
Automated repository signals based on public metadata such as recency, license, installation evidence, and adoption. These are not a security audit or endorsement.
Key capabilities
- Includes SKILL.md support
- Reusable instructions support
- Deployment
- Design and media
- Deployment use cases
- Design and media use cases
Technical details
- Install or run with Copy skill directory
When to use http-service-patterns Skill
- Use it for deployment.
- Use it for design and media.
Built with
Editorial notes
Source
- Creator: microsoft
- Repository: microsoft/amplifier-bundle-skills
- Skill file: skills/http-service-patterns/SKILL.md
What it does
Use when building an HTTP service with FastAPI lifecycle management, background poll loops, SPA static file serving with API reverse proxy, bidirectional WebSocket relay, or SSE event streaming.
Skill instructions
HTTP Services & Proxies The Pattern Problem: You need a web service that does more than serve requests — it has a background loop reconciling state, it proxies WebSocket connections to a backend process, and it must start reliably even when the previous instance didn't exit cleanly. Approach: FastAPI lifespan for startup/shutdown, asyncio.createtask for background loops, bidirectional WebSocket relay for proxying, and pre-bind port cleanup to prevent systemd crash-loops. Pattern proven in production across multiple Python CLI tools and web services. Key Design Decisions 1. Pre-bind port cleanup — preventing the restart crash-loop When systemd restarts a service, the old process may still hold the port in TIMEWAIT. The new process fails to bind, exits with status=1, systemd restarts it, repeat. In one production deployment, 2,075+ systemd restarts occurred before manual intervention. The fix runs before uvicorn.run(): python def killstaleportholder(port: int) - None: """Kill any existin
Explore related resources
Frequently asked questions
What is http-service-patterns?
http-service-patterns is a open-source AI agent skill with Copy skill directory. Use when building an HTTP service with FastAPI lifecycle management, background poll loops, SPA static file serving with API reverse proxy, bidirectional WebSocket relay, or SSE event streaming.
Who is http-service-patterns best for?
http-service-patterns is best for reusing agent instructions, scripts, and references, deployment workflows, design and media workflows.
How do I install http-service-patterns?
Install or run http-service-patterns using Copy skill directory. Check http-service-patterns for the latest setup command.
Is http-service-patterns actively maintained?
http-service-patterns may need a closer maintenance check before production use.
Auto-fetched from GitHub.