From fastapi-vue
Implements a feature using FastAPI + SQLAlchemy 2.0 + Vue3 in the monorepo. Creates backend models, schemas, services, routers in backend/ and Vue SFCs in frontend/. Invoked by core:implement and core:sprint — not usually called directly. Use when the user says "implement with FastAPI", "build fastapi-vue feature", or when core:architecture returns fastapi-vue.
How this skill is triggered — by the user, by Claude, or both
Slash command
/fastapi-vue:implement-fastapi-vue FEAT-001FEAT-001The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Implement the feature specified in `$ARGUMENTS` using FastAPI (backend) and Vue3 (frontend)
Implement the feature specified in $ARGUMENTS using FastAPI (backend) and Vue3 (frontend)
in the monorepo layout. Read the feature spec and data model before writing any code.
backend/
├── app/
│ ├── main.py # FastAPI app, router registration
│ ├── database.py # AsyncSession, engine, Base
│ ├── models/ # SQLAlchemy Mapped[] models
│ ├── schemas/ # Pydantic v2 request/response schemas
│ ├── services/ # Business logic + DB queries
│ ├── routers/ # FastAPI APIRouter per feature
│ └── llm.py # LLM provider (scaffold when feature needs RAG/embeddings)
├── requirements.txt
├── Dockerfile.api
└── alembic/ # created by /migration skill
frontend/
├── src/
│ ├── main.ts
│ ├── App.vue
│ ├── router/index.ts
│ ├── stores/ # Pinia stores per feature
│ └── views/ # Vue SFCs per feature
├── package.json
├── vite.config.ts
└── Dockerfile.web
docker-compose.yml # at monorepo root
.env.example # at monorepo root
fastapi-vue:test-fastapi-vue)fastapi-vue:migration)session.query() — use select() with session.execute()backend/app/models/<entity>.py — SQLAlchemy Mapped[] modelbackend/app/schemas/<entity>.py — Pydantic v2 schemas (Create, Update, Response)backend/app/services/<feature>.py — async service functionsbackend/app/routers/<feature>.py — FastAPI router with CRUD endpointsfrontend/src/stores/<feature>.ts — Pinia storefrontend/src/views/<Feature>View.vue — Vue3 SFC with TailwindCSSbackend/app/main.py if not already presentfrontend/src/router/index.tsIf feature mentions embeddings, search, similarity, or RAG:
backend/app/llm.py if absent (see LLM section below)embedding vector(1536) column to the relevant modelRun: cd backend && ruff check --fix .
Scaffold when a feature needs embeddings or text generation:
# backend/app/llm.py
import os
from typing import Optional
async def generate(prompt: str, model: Optional[str] = None) -> str:
"""Generate text. Provider selected by env vars."""
if os.getenv("OPENAI_API_KEY"):
from openai import AsyncOpenAI
client = AsyncOpenAI()
resp = await client.chat.completions.create(
model=model or "gpt-4o-mini",
messages=[{"role": "user", "content": prompt}]
)
return resp.choices[0].message.content
elif os.getenv("GEMINI_API_KEY"):
import google.generativeai as genai
genai.configure(api_key=os.getenv("GEMINI_API_KEY"))
m = genai.GenerativeModel(model or "gemini-1.5-flash")
resp = await m.generate_content_async(prompt)
return resp.text
else:
# Ollama (local)
import httpx
base = os.getenv("OLLAMA_BASE_URL", "http://ollama:11434")
async with httpx.AsyncClient() as client:
resp = await client.post(f"{base}/api/generate",
json={"model": model or "llama3.2", "prompt": prompt, "stream": False})
return resp.json()["response"]
async def embed(text: str) -> list[float]:
"""Generate embedding vector."""
if os.getenv("OPENAI_API_KEY"):
from openai import AsyncOpenAI
client = AsyncOpenAI()
resp = await client.embeddings.create(model="text-embedding-3-small", input=text)
return resp.data[0].embedding
else:
import httpx
base = os.getenv("OLLAMA_BASE_URL", "http://ollama:11434")
async with httpx.AsyncClient() as client:
resp = await client.post(f"{base}/api/embeddings",
json={"model": "nomic-embed-text", "prompt": text})
return resp.json()["embedding"]
docs/features/FEAT-XXX-*.md for the feature spec and ACsdocs/data_model.md for entity definitionsbackend/app/ for patterns and conventionsbackend/app/main.pyfrontend/src/stores/frontend/src/views/frontend/src/router/index.tscd backend && ruff check --fix .Mines projects and conversations into a searchable memory palace. Activates on queries about MemPalace, memory palace, mining, searching, palace setup, wings, rooms, drawers, or recalling past work.
Guides Payload CMS config (payload.config.ts), collections, fields, hooks, access control, APIs. Debugs validation errors, security, relationships, queries, transactions, hook behavior.
Implements vector databases with Pinecone, Weaviate, Qdrant, Milvus, pgvector for semantic search, RAG, recommendations, and similarity systems. Optimizes embeddings, indexing, and hybrid search.
npx claudepluginhub bfh-krg1/sdd-web-app --plugin fastapi-vue