From patriotforge
Use when writing Python backend code — FastAPI routers, SQLAlchemy models, Pydantic schemas, service functions, dependency injection, or app configuration.
npx claudepluginhub aka-kolton/patriotforge-claude-plugin --plugin patriotforgeThis skill uses the workspace's default tool permissions.
**Stack:** FastAPI · Python 3.12 · SQLAlchemy 2.x (async) · Pydantic v2 · Redis 7 · PostgreSQL 15
Implements Clean Architecture in Android and Kotlin Multiplatform projects: module layouts, dependency rules, UseCases, Repositories, domain models, and data layers with Room, SQLDelight, Ktor.
Enforces code quality on file edits via Plankton hooks: auto-formats, lints, Claude-powered fixes with model tiering, config protection, and legacy package manager blocks.
Enforces C++ Core Guidelines for writing, reviewing, and refactoring modern C++ code (C++17+), promoting RAII, immutability, type safety, and idiomatic practices.
Stack: FastAPI · Python 3.12 · SQLAlchemy 2.x (async) · Pydantic v2 · Redis 7 · PostgreSQL 15
backend/
├── app/
│ ├── main.py # create_app() factory + lifespan
│ ├── config.py # Settings(BaseSettings) — env-driven
│ ├── routers/ # one file per module (auth.py, quotes.py, …)
│ ├── services/ # pure business logic — no HTTP objects
│ ├── schemas/ # Pydantic request/response models
│ ├── models/ # SQLAlchemy ORM models
│ └── deps.py # dependency injection functions
├── tests/ # pytest-asyncio tests
├── alembic/ # database migrations
└── pyproject.toml
router = APIRouter(prefix="/api/auth", tags=["auth"])
@router.post("/login", response_model=LoginResponse, status_code=200)
async def login(
data: LoginRequest,
db: AsyncSession = Depends(get_db_session),
redis: Redis = Depends(get_redis),
request: Request, response: Response,
): ...
response_model, status_code, explicit Depends()DuplicateEmail, InvalidCredentials), not HTTPExceptionmodel_config = ConfigDict(extra='forbid') — reject unknown fieldsmodel_config = ConfigDict(from_attributes=True) — ORM compatibilitySecretStr for passwordsMapped[] type annotations + mapped_column()forge_ prefix (e.g., forge_users)mapped_column(UUID, primary_key=True, default=uuid4)created_at, updated_at, deleted_atget_db_session(): yields AsyncSession from app.state.async_session_factoryget_redis(): returns app.state.rediscreate_app(settings) builds the app — test-friendly, no module-level singletonssed/awk for file editing📖 Reference files: backend/app/routers/auth.py, backend/app/services/auth.py, backend/app/schemas/auth.py