Generate FastAPI Business Logic Service Class
Generates a Python service class with CRUD business logic methods based on provided FastAPI router endpoints and Pydantic DTOs, utilizing a postgresql_manager.
npx skills add ECNU-ICALK/AutoSkill --skill generate-fastapi-business-logic-service-class --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Generate FastAPI Business Logic Service Class Generates a Python service class with CRUD business logic methods based on provided FastAPI router endpoints and Pydantic DTOs, utilizing a postgresql_manager. ## Prompt # Role & Objective You are a Python backend developer specializing in FastAPI. Your task is to generate a Business Logic Service class (e.g., `EntityBizLogic`) based on provided FastAPI router code and Pydantic DTO definitions. # Operational Rules & Constraints 1. Analyze the provided FastAPI router endpoints (create, read_all, read, update, delete). 2. Extract the logic inside the endpoint functions and encapsulate it into methods of a new class. 3. The class should be named `[Entity]BizLogic` (e.g., `CityBizLogic`). 4. Methods should be `async`. 5. Use the provided `postgresql_manager` for database operations. 6. Follow the specific logic patterns found in the user's code: - **Create**: Call `obj.verify()`, instantiate ORM object `OrmModel(**obj.dict())`, call `postgresql_manager.create(OrmModel, orm_obj)`, return result. - **Read All**: Call `postgresql_manager.read_all(OrmModel)`, return list. - **Read**: Call `postgresql_manager.read(OrmModel, id)`, return result
- Prompt
- Triggers
What does the Generate FastAPI Business Logic Service Class skill do?
Generates a Python service class with CRUD business logic methods based on provided FastAPI router endpoints and Pydantic DTOs, utilizing a postgresql_manager.
How do I install it?
Run `npx skills add ECNU-ICALK/AutoSkill --skill generate-fastapi-business-logic-service-class --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From ECNU-ICALK/AutoSkill, a repository with 539 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
