new-api-feature

Scaffold a layered FastAPI CRUD feature with SQLAlchemy models and Pydantic schemas.

1|1|Updated May 13, 2026
One-click install
npx skills add https://github.com/bibektimilsina00/fuse_monorepo --skill new-api-feature
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: new-api-feature
Source: https://github.com/bibektimilsina00/fuse_monorepo/tree/main/.agents/skills/new-api-feature
Command: npx skills add https://github.com/bibektimilsina00/fuse_monorepo --skill new-api-feature

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill removes the repetitive, error-prone work of manually wiring up a new backend CRUD feature across models, schemas, repositories, services, and API routers.

Core Features & Use Cases

  • Layered backend scaffolding: Generates SQLAlchemy model, Pydantic schemas, repository, service, and FastAPI router following a consistent project architecture.
  • User-scoped CRUD pattern: Implements endpoints that fetch and mutate records by both item id and current_user ownership (user_id-based access pattern).
  • Routing and registration: Creates the router package for the resource and registers it in the versioned main router.

Quick Start

Run the new-api-feature skill and answer the prompts for feature name, stored fields, owner relation, required CRUD operations, and the URL prefix.

Frequently Asked Questions about new-api-feature

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

FAQPage Schema
How do I scaffold a FastAPI CRUD feature with SQLAlchemy and Pydantic?

To scaffold a FastAPI CRUD feature, this skill generates SQLAlchemy models, Pydantic schemas, async repository methods, service logic, and HTTP routes across a layered architecture. It wires all components together and registers the new router in the versioned v1 router.

Can I generate user-scoped API endpoints that filter records by current_user ownership?

Yes, you can generate user-scoped API endpoints that filter records by current_user ownership. The skill implements a user_id-based access pattern, ensuring that generated repository queries and service logic fetch and mutate records by both item id and the current user.

What's the best way to add a new database-backed entity to a layered FastAPI backend?

The best way to add a database-backed entity to a layered FastAPI backend is to scaffold the entire stack at once. This skill creates the model, schemas, repository, service, and router files simultaneously, maintaining a consistent project architecture without manual wiring.

Do I need Alembic to create database migrations for newly scaffolded SQLAlchemy models?

Yes, you need Alembic to create database migrations for newly scaffolded SQLAlchemy models. After generating the model files, the skill guides you through executing an Alembic migration command to apply the schema changes to your database.

Does FastAPI router registration happen automatically when scaffolding a new resource?

Yes, FastAPI router registration happens automatically when scaffolding a new resource. The skill creates the specific router package for the resource and wires it into your application by registering it directly within the main versioned v1 router.

How do I define stored fields and URL prefixes when creating new API routes?

To define stored fields and URL prefixes for new API routes, you run the skill and answer interactive prompts. You provide the feature name, required CRUD operations, stored database fields, owner relations, and the desired URL prefix during the scaffolding process.