ai-ad-be-gen

Generate FastAPI Schema/Service/Router code from task descriptions under SoT constraints.

Updated Nov 8, 2025
One-click install
npx skills add https://github.com/wade56754/AI_ad_spend02 --skill ai-ad-be-gen
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ai-ad-be-gen
Source: https://github.com/wade56754/AI_ad_spend02/tree/main/.claude/skills/ai-ad-be-gen
Command: npx skills add https://github.com/wade56754/AI_ad_spend02 --skill ai-ad-be-gen

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates backend code generation for FastAPI projects under SoT constraints (state machine, data schemas, error codes), reducing manual coding time and ensuring consistent, rule-compliant architecture.

Core Features & Use Cases

  • SoT-driven code generation: Produces Schema/Service/Router layers while avoiding the forbidden models.
  • Deterministic boundaries: Respects writable/forbidden code boundaries to prevent accidental changes outside approved areas.
  • Use Case: Given a task like "implement recharge approval API," it generates the backend skeleton aligned with SoT docs, ready for integration.

Quick Start

Send a task description and a list of target files within backend/, e.g., "Implement recharge approval API" with target_files ["backend/schemas/topups.py", "backend/routers/topups.py"].

Frequently Asked Questions about ai-ad-be-gen

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

FAQPage Schema
How do I automate backend code generation for FastAPI projects?

FastAPI backend code generation automates creating Schema, Service, and Router layers from task descriptions. This Skill generates the three-layer structure automatically, reducing manual coding and ensuring consistent architecture aligned with your project's constraints.

Can I generate backend code while respecting SoT constraints and forbidden boundaries?

Yes. SoT-driven code generation produces code that respects state-of-the-art constraints, avoids forbidden areas like models and migrations, and writes only to approved backend directories. All generated code includes SoT references in comments for traceability.

What frameworks and versions does FastAPI backend generation support?

The Skill enforces compatibility with FastAPI 0.100+, SQLAlchemy 2.x, Pydantic v2, and async/await patterns. It ensures generated code integrates seamlessly with modern FastAPI ecosystems and respects version-specific requirements.

How do I specify which backend files to generate code into?

Provide a task description and a list of target files within your backend/ directory, such as backend/schemas/topups.py and backend/routers/topups.py. The Skill generates code only to those specified locations, maintaining deterministic boundaries.

Does backend code generation prevent accidental changes outside approved areas?

Yes. Deterministic boundaries enforce writable and forbidden code regions. The Skill respects these boundaries to prevent unintended modifications outside approved backend directories, keeping your codebase structure intact.

What's the typical workflow for implementing a new API endpoint with code generation?

Describe the endpoint task (e.g., 'implement recharge approval API'), specify target files in backend/, and the Skill generates the schema, service, and router layers. The generated skeleton is ready for integration and follows SoT alignment.