Generate production-ready FastAPI CRUD modules following a proven single-session-per-request architecture.
Generates production-ready FastAPI CRUD modules following a single-session-per-request architecture.
/plugin marketplace add adelabdelgawad/fullstack-agents/plugin install adelabdelgawad-fullstack-agents-plugins-fullstack-agents@adelabdelgawad/fullstack-agentsThis skill inherits all available tools. When active, it can use any tool Claude has access to.
examples.mdreferences/model-pattern.mdreferences/repository-pattern.mdreferences/router-pattern.mdreferences/schema-pattern.mdreferences/service-pattern.mdscripts/helper.pyGenerate production-ready FastAPI CRUD modules following a proven single-session-per-request architecture.
Use this skill when asked to:
┌─────────────────────────────────────────────────────────────┐
│ HTTP Request │
└──────────────────────────┬──────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ Router (api/v1/{entity}.py) │
│ • Endpoint definitions │
│ • Request/Response validation │
│ • session: AsyncSession = Depends(get_session) │
└──────────────────────────┬──────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ Service (api/services/{entity}_service.py) │
│ • Business logic │
│ • Validation rules │
│ • Orchestrates repositories │
└──────────────────────────┬──────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ Repository (api/repositories/{entity}_repository.py) │
│ • Data access │
│ • SQLAlchemy queries │
│ • No business logic │
└──────────────────────────┬──────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ Model (db/models.py) + Schema (api/schemas/{entity}.py) │
│ • SQLAlchemy ORM models │
│ • Pydantic DTOs with CamelModel │
└─────────────────────────────────────────────────────────────┘
api/
├── v1/
│ └── {entity}.py # Router with endpoints
├── services/
│ └── {entity}_service.py # Business logic
├── repositories/
│ └── {entity}_repository.py # Data access layer
└── schemas/
├── _base.py # CamelModel base class
└── {entity}_schemas.py # Pydantic DTOs
db/
└── models.py # SQLAlchemy models
core/
├── exceptions.py # Domain exceptions
└── pagination.py # Pagination utilities
Every request uses exactly ONE database session:
@router.post("/items")
async def create_item(
item_create: ItemCreate,
session: AsyncSession = Depends(get_session), # Session injected here
):
service = ItemService()
return await service.create_item(session, item_create) # Passed to service
Endpoint (session created)
→ Service (receives session as param)
→ Repository (receives session as param)
→ Database operations
All schemas inherit from CamelModel for automatic snake_case → camelCase conversion:
class ItemResponse(CamelModel):
item_id: int # Python: snake_case
created_at: datetime
# JSON output: {"itemId": 1, "createdAt": "..."}
Use typed exceptions that map to HTTP status codes:
| Exception | HTTP Status |
|---|---|
| NotFoundError | 404 |
| ConflictError | 409 |
| ValidationError | 422 |
| AuthenticationError | 401 |
| AuthorizationError | 403 |
| DatabaseError | 500 |
When creating a new entity, generate files in this order:
__init__ takes no parameterssession as first parametersession.flush() to persist, session.refresh() to reload__init__ creates repository instancessession as first parametersession: AsyncSession = Depends(get_session)service = EntityService()See the references/ directory for detailed patterns:
schema-pattern.md - Pydantic DTO patternsrepository-pattern.md - Data access layerservice-pattern.md - Business logic layerrouter-pattern.md - API endpointsmodel-pattern.md - SQLAlchemy modelsThis skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.