Synthèse automatique
Clone et configure un backend FastAPI prêt pour la production avec des capacités RAG (Recherche-Augmentée par Génération) à partir de deux modèles de référentiels.
Points forts
- Deux options adaptées au niveau de l'utilisateur : basic et agentic.
- Environnement de développement complet avec validation des variables d'environnement.
- Support multi-fournisseurs d'IA (OpenAI, Anthropic) dès le départ.
Limites
- Nécessite un compte Supabase et les clés appropriées.
- Les intégrations Google (calendrier/email) sont optionnelles mais augmentent la complexité.
- Ne couvre pas la création de la base de données vectorielle.
Idéal pour démarrer rapidement un backend FastAPI avec RAG, que ce soit pour apprendre ou pour des fonctionnalités avancées avec outils d'agent.
Si vous avez déjà un projet existant ou besoin d'un framework backend différent (Django, Flask) ou d'un déploiement serverless immédiat.
Analyse de sécurité
SûrThe skill instructs cloning and setting up known public repositories using standard development tools (git, pip, venv, uvicorn) for legitimate purposes. There are no destructive, exfiltrating, or obfuscated commands.
Aucun point d'attention détecté
Comment cette analyse est faiteExemples
Set up a FastAPI RAG backend using launch-rag for learning purposes.Clone launch-agentic-rag and configure it with OpenAI and Google Calendar integration.I need a new FastAPI project with RAG capabilities, please set it up using the launch-rag template.Directory: launch-agent-skills/skills/rag-setup/skill.md
name: FastAPI Project Setup description: Clone and set up launch-rag or launch-agentic-rag - production-ready FastAPI backends with RAG capabilities triggers:
- fastapi
- api setup
- project structure
- python api
- backend setup
- launch-rag
- rag backend
- agentic rag
- agent backend
FastAPI Project Setup Skill
Purpose
Clone and set up a production-ready FastAPI backend for RAG (Retrieval-Augmented Generation):
Available Options:
1. launch-rag - Basic RAG
- Vector similarity search with Supabase
- Question answering with citations
- Simple, focused implementation
- Perfect for learning RAG fundamentals
2. launch-agentic-rag - Agentic RAG
- Everything in launch-rag PLUS:
- Agent reasoning (Retrieve → Reason → Decide → Act)
- Tool calling (schedule meetings, send emails)
- Multi-turn conversations
- Google Calendar/Gmail integration (optional)
Both include:
- Multiple AI provider support (OpenAI, Anthropic)
- Clean folder structure (core, services, models)
- Environment configuration with validation
- Health checks and API documentation
- Docker support
- Type hints and Pydantic validation
Prerequisites
- Python 3.11+
- Supabase account
- OpenAI API key
- Anthropic API key (optional)
- Google Cloud credentials (optional, for agentic-rag tools)
Instructions
Step 0: Ask User Which Repository
IMPORTANT: Ask the user which version they want to set up:
Prompt the user:
Which FastAPI backend would you like to set up?
1. launch-rag (Basic RAG - recommended for learning)
- Simple vector search + Q&A
- Faster setup, fewer dependencies
2. launch-agentic-rag (Agentic RAG - advanced features)
- Agent reasoning with tools
- Calendar/email integration
- Multi-turn conversations
Choose: [1/2]
Decision Logic:
- If user says "basic", "simple", "learning", or "1" → use launch-rag
- If user says "agentic", "agent", "tools", or "2" → use launch-agentic-rag
- If unclear, recommend launch-rag for first-time users
Set variables:
# Based on user choice
REPO_NAME="launch-rag" # or "launch-agentic-rag"
REPO_URL="https://github.com/ShenSeanChen/$REPO_NAME.git"
Step 1: Clone the Repository
IMPORTANT: Ask the user where they want to clone the repo (which directory), or use the current working directory.
# Clone the chosen repo
git clone $REPO_URL [project-name]
cd [project-name]
Replace [project-name] with the desired project folder name.
Example:
git clone https://github.com/ShenSeanChen/launch-rag.git my-rag-apigit clone https://github.com/ShenSeanChen/launch-agentic-rag.git my-agent-api
Step 2: Create Virtual Environment
python3.11 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
Step 3: Install Dependencies
pip install -r requirements.txt
Step 4: Set Up Environment Variables
Create a .env file from the template:
cp .env.example .env
IMPORTANT: The .env.example has placeholder values that MUST be replaced.
Then edit .env with your actual credentials:
# Required - Supabase (will be set by rag-database skill)
SUPABASE_URL=https://your-project-ref.supabase.co
SUPABASE_ANON_KEY=your_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_service_role_key
# Required - OpenAI (needed for embeddings regardless of AI provider)
OPENAI_API_KEY=sk-your_openai_key
OPENAI_EMBED_MODEL=text-embedding-3-small
OPENAI_CHAT_MODEL=gpt-4o
# AI Provider Configuration
# IMPORTANT: Set to "openai" if you only have OpenAI key
# Set to "anthropic" only if you have BOTH OpenAI (for embeddings) AND Anthropic keys
AI_PROVIDER=openai
# Optional - Anthropic (only needed if AI_PROVIDER=anthropic)
ANTHROPIC_API_KEY=your_anthropic_key
ANTHROPIC_CHAT_MODEL=claude-3-5-sonnet-20241022
Key Points:
- ✅ OpenAI key is ALWAYS required (for embeddings via text-embedding-3-small)
- ✅ Set AI_PROVIDER=openai by default (uses GPT-4o for chat)
- ✅ Only set AI_PROVIDER=anthropic if you have a valid Anthropic key
- ⚠️ Don't leave placeholder values like
your_anthropic_api_key_here- the app will fail at runtime
Step 5: Set Up Supabase Database
Run the SQL initialization script in your Supabase SQL editor:
# The sql/init.sql file contains the database schema
# Copy and run it in Supabase SQL Editor at:
# https://supabase.com/dashboard/project/[your-project]/editor
Step 6: Run the Server
uvicorn main:app --reload --port 8000
The API will be available at:
- API: http://localhost:8000
- Docs: http://localhost:8000/docs
- Health: http://localhost:8000/healthz
- Chat UI: http://localhost:8000/chat (if available)
Step 7: Test the Setup (Optional)
python test_setup.py
Step 8: Next Steps Based on Repository
If launch-rag:
- ✅ Basic setup complete!
- Run
rag-databaseskill next to configure database - Start using the RAG endpoints
If launch-agentic-rag:
- ✅ Basic setup complete!
- Run
rag-databaseskill next to configure database - (Optional) Run
rag-toolsskill to configure Google Calendar/Gmail tools - Explore agent reasoning and tool calling features
Checklist
Common steps (both repos):
- [ ] Ask user: launch-rag or launch-agentic-rag?
- [ ] Clone the chosen repository to desired location
- [ ] Create Python 3.11+ virtual environment
- [ ] Install all dependencies from requirements.txt
- [ ] Copy .env.example to .env
- [ ] Add OpenAI API key to .env (REQUIRED)
- [ ] Set AI_PROVIDER=openai by default
- [ ] (Optional) Add Anthropic API key if using Claude
For rag-database (next step):
- [ ] Add Supabase credentials to .env
- [ ] Run SQL initialization script in Supabase
- [ ] Verify database connection
For launch-agentic-rag only:
- [ ] (Optional) Set up Google Cloud service account
- [ ] (Optional) Configure Calendar/Gmail tools
What You Get
launch-rag includes:
launch-rag/
├── app/
│ ├── core/ # Configuration & database
│ ├── models/ # Pydantic schemas
│ ├── services/ # RAG logic, embeddings, AI
│ └── main.py # FastAPI app
├── sql/
│ └── init_supabase.sql # Database setup
├── static/ # Chat UI
├── test_setup.py
└── requirements.txt
launch-agentic-rag includes (everything above PLUS):
launch-agentic-rag/
├── app/
│ ├── core/ # Same as launch-rag
│ ├── models/ # Same as launch-rag
│ ├── services/
│ │ ├── rag.py # Enhanced with agent reasoning
│ │ ├── agent.py # Agent decision-making logic
│ │ └── tools/ # 🆕 Tool implementations
│ │ ├── calendar.py # Google Calendar integration
│ │ └── email.py # Gmail integration
│ └── main.py # FastAPI app with agent endpoints
├── credentials/ # 🆕 Google Cloud credentials
└── requirements.txt # Additional dependencies for tools
Example Usage
User: "Set up a FastAPI backend for my new project"
Claude should:
- Ask which repo: "Do you want basic RAG or agentic RAG?"
- Ask where to clone: Current directory or specific path?
- Clone chosen repo with user-specified project name
- Create virtual environment
- Install dependencies
- Set up .env file (with AI_PROVIDER=openai by default)
- Remind user about next steps:
- Add OpenAI API key to .env
- Run
rag-databaseskill for database - (If agentic-rag) Optionally run
rag-toolsfor Google integrations
Important Notes
- Always ask where to clone the repo before running git clone
- The repo is production-ready with RAG capabilities built-in
- Requires Supabase for vector storage (pgvector extension)
- Supports both OpenAI and Anthropic AI providers
- Includes Docker support for easy deployment
Related Skills
rag-database- Configure Supabase database and pgvector
Du fichier au premier essai
Le téléchargement contient exactement le contenu affiché sur cette fiche. Cette copie peut différer de la dernière version du dépôt source.
Consulter la source et ses fichiers annexesCe téléchargement contient uniquement SKILL.md. Les scripts, références, modèles et dépendances éventuels ne sont pas inclus. Récupérez les fichiers nécessaires depuis la source en conservant leur arborescence avant de poursuivre.
1. Télécharger le fichier
Télécharger SKILL.mdDepuis la racine d’un projet de test, enregistrez le fichier sous .skill-downloads/fastapi-project-setup-with-rag-mm5t8bmg/SKILL.md, ou utilisez la commande suivante. Ce dossier sert à examiner la skill avant son installation.
Commande pour macOS/Linux ou WSL : un shell POSIX et curl sont nécessaires. Sous Windows sans WSL, utilisez le bouton de téléchargement et créez le dossier manuellement.
mkdir -p '.skill-downloads/fastapi-project-setup-with-rag-mm5t8bmg' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/fastapi-project-setup-with-rag-mm5t8bmg/download' --output '.skill-downloads/fastapi-project-setup-with-rag-mm5t8bmg/SKILL.md.part' && mv '.skill-downloads/fastapi-project-setup-with-rag-mm5t8bmg/SKILL.md.part' '.skill-downloads/fastapi-project-setup-with-rag-mm5t8bmg/SKILL.md'2. Vérifier les prérequis
Lisez SKILL.md avant de l’utiliser. Si le fichier cite des scripts ou services externes, examinez-les et préparez les accès nécessaires dans votre environnement de test.
Extrait original : Prerequisites
- Python 3.11+
- Supabase account
- OpenAI API key
- Anthropic API key (optional)
- Google Cloud credentials (optional, for agentic-rag tools)
Les plateformes de la fiche sont des indications du catalogue. Les chemins ci-dessous suivent la documentation des outils ; ils ne prouvent pas que cette skill y a été exécutée. Aucune version minimale de ces outils n’est attestée pour cette fiche.
3. Charger la skill
Le fichier ne fournit pas un en-tête name/description exploitable pour cette procédure native. Le téléchargement reste disponible pour lecture ; utilisez le mode manuel ci-dessous.
Mode manuel ou autre outil : joignez SKILL.md à une conversation, ou ouvrez-le dans un agent capable de lire les fichiers. Ajoutez les ressources annexes nécessaires. Il n’existe pas de dossier universel reconnu par tous les outils.
4. Faire un premier essai
Utilisez une entrée courte et fictive : un endpoint d’API, un petit document ou un brief d’interface. Dans une nouvelle conversation, joignez le fichier ou donnez son chemin à l’agent, puis adaptez cette demande :
Lis .skill-downloads/fastapi-project-setup-with-rag-mm5t8bmg/SKILL.md et applique ses instructions à cet exemple : [décrire une entrée de test]. Indique les fichiers, dépendances ou accès qui manquent. Produis le résultat demandé par la skill sans inventer de données ni exécuter de script non examiné.Résultat attendu : une sortie correspondant aux instructions de la skill, ou une liste précise des prérequis manquants. Une simple confirmation de lecture ne valide pas le premier usage. Si une ressource externe est indisponible, ce parcours reste à tester.
Bonnes pratiques React Hook Form
Developpement
Maîtrisez React Hook Form : évitez les anti-patterns, gérez les abonnements, et traitez correctement reset, dirty state et entrées contrôlées.
Migration Emotion vers Mantine
Developpement
Migrer les styled-components Emotion vers des composants Mantine avec style props et modules CSS. Pour convertir .styled.tsx ou supprimer les imports @emotion.
Détecteur de dérive de périmètre
Developpement
Analyse les diffs git par rapport à une intention pour détecter la dérive de périmètre, fichiers non liés et PR trop larges, puis suggère de garder, diviser ou justifier.