moai-adk-main/src/moai_adk/templates/.claude/skills/moai-lang-python/SKILL.md
Enterprise-grade Python expertise with production patterns for Python 3.13.9, FastAPI 0.115.x, Django 5.2 LTS, Pydantic v2, SQLAlchemy 2.0; activates for API development, ORM usage, async patterns, testing frameworks, and production deployment strategies.
npx skillsauth add ajbcoding/claude-skill-eval moai-lang-pythonInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Primary Focus: Python 3.13 with FastAPI, Django, async patterns, and production deployment Best For: REST APIs, microservices, async programming, ORM usage, testing Key Libraries: FastAPI 0.115, Django 5.2 LTS, Pydantic v2, SQLAlchemy 2.0, pytest 8.3 Auto-triggers: FastAPI, Django, async, SQLAlchemy, Pydantic, pytest, asyncio
| Version | Release | Support | |---------|---------|---------| | Python 3.13.9 | 2025-10 | Oct 2029 | | FastAPI 0.115 | 2025-11 | Active | | Django 5.2 LTS | 2025-08 | Apr 2027 | | SQLAlchemy 2.0 | 2024-01 | Active |
Core Python 3.13 concepts with practical examples:
examples.md for full code samplesProduction-ready enterprise patterns:
reference.md for API details and best practicesEnterprise deployment and optimization:
myapp/
├── main.py # FastAPI app instance
├── models.py # Pydantic models
├── database.py # SQLAlchemy setup
├── schemas.py # Request/response DTOs
├── api/
│ ├── __init__.py
│ └── routes.py # Route handlers
├── services/
│ └── user_service.py # Business logic
└── tests/
├── test_api.py
└── test_services.py
from fastapi import FastAPI
from pydantic import BaseModel
app = FastAPI(title="API", version="1.0.0")
class Item(BaseModel):
name: str
price: float
@app.get("/items/{item_id}")
async def get_item(item_id: int) -> Item:
return Item(name="Sample", price=9.99)
@app.post("/items/", status_code=201)
async def create_item(item: Item) -> Item:
return item
from fastapi import Depends
from sqlalchemy.ext.asyncio import AsyncSession
async def get_db() -> AsyncSession:
async with async_session() as session:
yield session
async def get_current_user(token: str = Depends(oauth2_scheme)):
return decode_token(token)
@app.get("/profile")
async def profile(
user = Depends(get_current_user),
db: AsyncSession = Depends(get_db)
):
return user
from sqlalchemy.ext.asyncio import (
create_async_engine,
AsyncSession,
async_sessionmaker
)
from sqlalchemy.orm import declarative_base
DATABASE_URL = "postgresql+asyncpg://user:pass@localhost/db"
engine = create_async_engine(DATABASE_URL, echo=False)
async_session = async_sessionmaker(engine, class_=AsyncSession)
Base = declarative_base()
from sqlalchemy import Column, Integer, String, ForeignKey
from sqlalchemy.orm import relationship
class User(Base):
__tablename__ = "users"
id = Column(Integer, primary_key=True)
username = Column(String(50), unique=True, nullable=False)
posts = relationship("Post", back_populates="author")
class Post(Base):
__tablename__ = "posts"
id = Column(Integer, primary_key=True)
title = Column(String(200), nullable=False)
author_id = Column(Integer, ForeignKey("users.id"))
author = relationship("User", back_populates="posts")
from sqlalchemy import select
async def create_user(username: str) -> User:
async with async_session() as session:
user = User(username=username)
session.add(user)
await session.commit()
return user
async def get_user(user_id: int) -> User:
async with async_session() as session:
result = await session.execute(select(User).where(User.id == user_id))
return result.scalars().first()
import asyncio
import aiohttp
async def fetch_url(url: str) -> str:
async with aiohttp.ClientSession() as session:
async with session.get(url) as response:
return await response.text()
async def fetch_multiple(urls):
tasks = [fetch_url(url) for url in urls]
return await asyncio.gather(*tasks)
# Run
results = asyncio.run(fetch_multiple(urls))
async def with_timeout():
try:
result = await asyncio.wait_for(long_task(), timeout=10.0)
except asyncio.TimeoutError:
print("Timed out")
async def cancellable_task():
try:
await asyncio.sleep(100)
except asyncio.CancelledError:
print("Cancelled")
raise
from pydantic import BaseModel, Field, field_validator, EmailStr
class UserSchema(BaseModel):
id: int = Field(..., gt=0)
username: str = Field(..., min_length=3, max_length=50)
email: EmailStr
bio: str = Field(None, max_length=500)
@field_validator('username')
@classmethod
def validate_username(cls, v):
if not v.isalnum():
raise ValueError('Alphanumeric only')
return v.lower()
# Usage
user = UserSchema(id=1, username="john", email="[email protected]")
schema = UserSchema.model_json_schema() # JSON Schema
import pytest
from fastapi.testclient import TestClient
@pytest.fixture
def client():
return TestClient(app)
def test_create_item(client):
response = client.post("/items/", json={"name": "Item", "price": 10})
assert response.status_code == 201
@pytest.mark.asyncio
async def test_async_fetch():
result = await fetch_url("http://example.com")
assert result is not None
examples.md for FastAPI, Django, pytest, and async patternsreference.md for API details, configuration, and troubleshootingSkills: Skill("moai-essentials-debug"), Skill("moai-essentials-perf"), Skill("moai-security-backend") Auto-loads: Python projects mentioning FastAPI, Django, async, SQLAlchemy, Pydantic, pytest
content-media
Download YouTube video transcripts when user provides a YouTube URL or asks to download/get/fetch a transcript from YouTube. Also use when user wants to transcribe or get captions/subtitles from a YouTube video.
development
Transform learning content (like YouTube transcripts, articles, tutorials) into actionable implementation plans using the Ship-Learn-Next framework. Use when user wants to turn advice, lessons, or educational content into concrete action steps, reps, or a learning quest.
tools
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors/fonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.
tools
Replace with description of the skill and when Claude should use it.