api-development

Automate API endpoint creation and asynchronous task orchestration with Pydantic models.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/kpiteira/ktrdr --skill api-development
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-development
Source: https://github.com/kpiteira/ktrdr/tree/main/.claude/skills/api-development
Command: npx skills add https://github.com/kpiteira/ktrdr --skill api-development

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill streamlines the process of building, testing, and documenting new API endpoints, especially for long-running and asynchronous tasks, ensuring consistency and adherence to best practices within the KTRDR framework.

Core Features & Use Cases

  • Structured API Creation: Guides you through creating new endpoints, defining Pydantic models for data validation, implementing business logic, and adding comprehensive tests.
  • Async Operation Pattern: Provides a clear, standardized pattern for handling long-running tasks with background processes, immediate client feedback via operation IDs, and progress tracking.
  • Progress Tracking & Error Handling: Standardizes how operations report their progress and how API errors are managed using FastAPI's HTTPException for clear client communication.
  • Use Case: When adding a new machine learning model, use this skill to quickly set up an API endpoint that accepts training requests, dispatches them as background tasks, and allows clients to poll for training progress and status updates.

Quick Start

I need to add a new API endpoint for a 'predict' function. Use the api-development skill to guide me through the process, including Pydantic models and async handling.

Frequently Asked Questions about api-development

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

FAQPage Schema
How do I build REST API endpoints with FastAPI and Pydantic models?

FastAPI endpoints are created by defining routes with type-annotated functions and Pydantic models for request/response validation. This Skill automates endpoint scaffolding, model definition, business logic implementation, and test generation to ensure consistency and follow best practices.

How do I handle long-running tasks and background jobs in a FastAPI application?

Asynchronous background tasks dispatch long-running operations while returning an operation ID to clients immediately. This Skill provides a standardized pattern for task orchestration, progress tracking, and status polling so clients can monitor completion without blocking.

What's the best way to structure error handling and progress reporting in async APIs?

Standardized error handling uses FastAPI's HTTPException for clear client communication, while progress tracking reports operation status through dedicated endpoints. This Skill implements both patterns together, ensuring consistent feedback and debugging across endpoints.

Can I use this approach to add new machine learning model endpoints?

Yes. This Skill guides you through creating endpoints that accept model requests, dispatch training or inference as background tasks, and expose progress and status endpoints. This pattern works for any long-running computational task integrated into your FastAPI stack.

Do I need prior experience with Pydantic and async Python to use this Skill?

This Skill assumes familiarity with FastAPI and asynchronous programming patterns. It guides you through Pydantic model design and async task orchestration but focuses on endpoint creation and testing rather than teaching framework fundamentals.