Automated summary
This skill allows adding or modifying AI models in the Motivia project, managing providers, SDKs, icons, and Prisma configurations.
Strengths
- Covers multiple AI providers (OpenAI, Anthropic, Google, Mistral, xAI).
- Provides step-by-step instructions for adding new models or providers.
- Integrates Prisma enums and database migrations.
- Includes code examples for SDK registry and provider icons.
Limitations
- Specific to the Motivia project structure.
- Requires knowledge of TypeScript and Prisma.
- Does not cover error handling or input validation.
When you need to add a new AI model from an existing provider or integrate a completely new AI provider into the Motivia application.
When you are working on general AI integration outside of the Motivia project or when you need to modify the AI generation logic itself.
Security analysis
SafeThe skill only performs code modifications (Read, Write, Edit, Glob, Grep) and routine package installation via pnpm. It does not execute destructive commands, exfiltrate data, or disable security. No risky operations.
No concerns found
How this analysis is madeExamples
Add the GPT-5 Ultra model from OpenAI to the Motivia AI model list with cost 50 and free=false.Integrate Cohere as a new AI provider in the Motivia project. Install the SDK, add the Prisma enum, create the icon, and add models.Update the Mistral provider in Motivia to use the latest SDK version and add new models.name: ai-model description: Gère les modèles IA de Motivia. Utilise ce skill quand l'utilisateur demande d'ajouter un nouveau modèle IA, modifier un provider, ou configurer les options de génération. Supporte OpenAI, Anthropic, Google, Mistral et xAI. allowed-tools: Read, Write, Edit, Glob, Grep
Gestion des Modèles IA Motivia
Fichiers concernés
utils/ai-model.tsx # Registry des modèles et providers
prisma/schema.prisma # Enum ApiProvider
components/icons/ # Icônes des providers
app/api/create/route.ts # Endpoint de génération
Structure d'un modèle
export type AIModelOption = {
provider: ApiProvider; // Enum Prisma: OPENAI, ANTHROPIC, GOOGLE, MISTRAL, XAI
model: string; // ID du modèle (ex: "gpt-5-nano-2025-08-07")
label: string; // Nom affiché (ex: "GPT 5 nano")
free: boolean; // true = utilise les lettres gratuites
cost: number; // Coût relatif (pour affichage)
};
Providers actuels
| Provider | Enum | SDK |
|----------|------|-----|
| OpenAI | ApiProvider.OPENAI | @ai-sdk/openai |
| Anthropic | ApiProvider.ANTHROPIC | @ai-sdk/anthropic |
| Google | ApiProvider.GOOGLE | @ai-sdk/google |
| Mistral | ApiProvider.MISTRAL | @ai-sdk/mistral |
| xAI | ApiProvider.XAI | @ai-sdk/xai |
Ajouter un nouveau modèle (provider existant)
1. Ajouter à la liste des modèles
// utils/ai-model.tsx
export const OPENAI_MODELS = [
// ... existing models
{
provider: ApiProvider.OPENAI,
model: "gpt-5-ultra-2025-xx-xx", // ID exact du modèle
label: "GPT 5 Ultra", // Nom affiché
free: false, // false = nécessite clé API
cost: 50, // Coût relatif
},
];
2. Vérifier l'export dans modelOptions
export const modelOptions: AIModelOption[] = [
...OPENAI_MODELS,
...ANTHROPIC_MODELS,
...MISTRAL_MODELS,
...XAI_MODELS,
];
Ajouter un nouveau provider
1. Installer le SDK
pnpm add @ai-sdk/newprovider
2. Ajouter l'enum Prisma
// prisma/schema.prisma
enum ApiProvider {
OPENAI
ANTHROPIC
GOOGLE
MISTRAL
XAI
NEWPROVIDER // Ajouter ici
}
3. Exécuter la migration
pnpm prisma migrate dev --name add_newprovider
4. Créer l'icône du provider
// components/icons/newprovider-icon.tsx
export const NewProviderIcon = ({ className }: { className?: string }) => (
<svg className={className} viewBox="0 0 24 24">
{/* SVG path */}
</svg>
);
5. Ajouter au registry
// utils/ai-model.tsx
import { createNewProvider } from "@ai-sdk/newprovider";
import { NewProviderIcon } from "@/components/icons";
// Dans providersLabelAndIcon
{
label: "New Provider",
value: ApiProvider.NEWPROVIDER,
image: <NewProviderIcon className="size-6" />,
},
// Dans les modèles
export const NEWPROVIDER_MODELS = [
{
provider: ApiProvider.NEWPROVIDER,
model: "model-id",
label: "Model Name",
free: false,
cost: 10,
},
];
// Dans modelOptions
export const modelOptions: AIModelOption[] = [
...OPENAI_MODELS,
...ANTHROPIC_MODELS,
...MISTRAL_MODELS,
...XAI_MODELS,
...NEWPROVIDER_MODELS, // Ajouter ici
];
// Dans registry
export const registry = (apiKey?: string, provider?: ApiProvider) =>
createProviderRegistry({
// ... existing
NEWPROVIDER: createNewProvider({
apiKey:
provider === ApiProvider.NEWPROVIDER && apiKey
? apiKey
: process.env.NEWPROVIDER_API_KEY,
}),
});
6. Ajouter la variable d'environnement
NEWPROVIDER_API_KEY=sk-...
Règles métier
Modèles gratuits
- Un modèle
free: trueutilise les 5 lettres gratuites de l'utilisateur - Si
freeLetters === 0, l'utilisateur doit avoir sa propre clé API
Coût
Le champ cost est indicatif et sert à l'affichage. Valeurs suggérées:
| Gamme | Cost | Exemple | |-------|------|---------| | Économique | 0-1 | nano, small | | Standard | 2-5 | mini, medium | | Premium | 10-15 | sonnet, medium | | Ultra | 20+ | opus |
Génération de lettre
Le flow dans app/api/create/route.ts:
- Vérifier l'authentification
- Valider le modèle demandé
- Récupérer la clé API (user ou env)
- Si free: décrémenter
freeLetters - Streamer la génération via
streamObject - Retourner
{ title, content }
Checklist nouveau modèle
- [ ] ID du modèle correct (vérifier docs du provider)
- [ ] Label clair et cohérent
- [ ]
freebien défini (true/false) - [ ]
costrelatif défini - [ ] Ajouté à l'array
modelOptions - [ ] Testé avec une clé API valide
From the file to a first result
The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.
View the source and supporting filesThis download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.
1. Download the file
Download SKILL.mdFrom the root of a test project, save the file as .skill-downloads/motivia-ai-model-management-mm5t8b6q/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.
Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.
mkdir -p '.skill-downloads/motivia-ai-model-management-mm5t8b6q' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/motivia-ai-model-management-mm5t8b6q/download' --output '.skill-downloads/motivia-ai-model-management-mm5t8b6q/SKILL.md.part' && mv '.skill-downloads/motivia-ai-model-management-mm5t8b6q/SKILL.md.part' '.skill-downloads/motivia-ai-model-management-mm5t8b6q/SKILL.md'2. Check prerequisites
Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.
Tools declared by the author (check availability in your agent): Read, Write, Edit, Glob, Grep
No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.
The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.
3. Load the skill
After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.
Claude Code
test -f '.skill-downloads/motivia-ai-model-management-mm5t8b6q/SKILL.md' && test -s '.skill-downloads/motivia-ai-model-management-mm5t8b6q/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/ai-model' && cp -R '.skill-downloads/motivia-ai-model-management-mm5t8b6q' '.claude/skills/ai-model'OpenSkills
OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.
Official OpenSkills installationopenskills install './.skill-downloads/motivia-ai-model-management-mm5t8b6q'openskills read 'motivia-ai-model-management-mm5t8b6q'Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.
For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.
openskills syncManual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.
4. Try a first task
Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:
Read .skill-downloads/motivia-ai-model-management-mm5t8b6q/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.
Create Interactive Maps with kepler.gl
Data & AI
Create interactive map visualizations and export standalone HTML using the keplergl Python package. Use to plot geospatial data from DataFrames, GeoJSON, or CSV.
Agent-Driven Parameter Optimization
Data & AI
Guide for optimizing configurable systems with a measurable objective, using bounded trials and evidence-based recommendations.
ICP Visitor Outreach
Data & AI
Identify signed-up users matching the ideal customer profile but stalled, and draft personalized outreach to re-engage them.