application-engineering

Build FastAPI services with Pydantic contracts and Claude integration.

Updated Mar 2, 2022
One-click install
npx skills add https://github.com/ysuurme/azure_hello_world --skill application-engineering
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: application-engineering
Source: https://github.com/ysuurme/azure_hello_world/tree/main/.agents/skills/application-engineering
Command: npx skills add https://github.com/ysuurme/azure_hello_world --skill application-engineering

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

application-engineering turns AI-backed REST/API requirements into production-ready service boundaries with strong input/output validation, reliable Claude integration, and required telemetry.

Core Features & Use Cases

  • FastAPI API design with Pydantic contracts: Build request/response models that produce correct OpenAPI docs and prevent internal-field leakage.
  • Single-call Claude integration via an AICompletionPort: Use a provider-agnostic port with a Claude adapter to keep routers thin and tests deterministic using FakeAIPort.
  • Mandatory OTel instrumentation at the request boundary: Emit one span per Claude call for latency and cost visibility.
  • Auth, error handling, and streaming to clients: Apply authentication/authorization patterns, add backoff for rate limits, and support SSE streaming responses.

Quick Start

Use application-engineering to design a FastAPI endpoint that accepts a validated request, calls Claude through an AICompletionPort once per request, and returns a structured or streamed response with OTel spans for the Claude call.

Frequently Asked Questions about application-engineering

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I integrate Claude into a FastAPI service with Pydantic validation and OTel tracing?

To integrate Claude into FastAPI with Pydantic and OTel, define request/response contracts and route Claude calls through an AICompletionPort. This ensures boundary validation and emits one OTel span per call for latency visibility.

What is the best way to handle API rate limits and timeouts when calling Claude in a FastAPI application?

The best way to handle Claude rate limits and timeouts in FastAPI is to implement error handling with exponential backoff. This keeps your AI-backed API service resilient against provider rate limits and network timeouts.

Can I use SSE streaming for Claude responses in a FastAPI endpoint?

Yes, you can use SSE streaming to send low-latency Claude responses to clients. The application-engineering approach supports optional Server-Sent Events alongside standard structured JSON responses in FastAPI routers.

Does FastAPI Pydantic contract testing prevent internal field leakage in OpenAPI docs?

Yes, FastAPI Pydantic contracts prevent internal-field leakage by strictly defining request and response models. This boundary validation automatically generates correct OpenAPI docs without exposing sensitive internal data structures.

How do I test FastAPI endpoints that make Claude calls without hitting the live API?

You test FastAPI endpoints by injecting a FakeAIPort during your test runs. This provider-agnostic AICompletionPort design keeps your routers thin and makes tests deterministic without real Claude API calls.