environment-setup-guide
Guide developers through setting up development environments with proper tools, dependencies, and configurations
mistral-hello-world
Create a minimal working Mistral AI chat completion example. Use when starting a new Mistral integration, testing your setup, or learning basic Mistral API patterns. Trigger with phrases like "mistral hello world", "mistral example", "mistral quick start", "simple mistral code", "mistral chat".
Full skill instructions
Minimal working example demonstrating core Mistral AI chat completion functionality.
mistral-install-auth setupTypeScript (hello-mistral.ts)
import Mistral from '@mistralai/mistralai';
const client = new Mistral({
apiKey: process.env.MISTRAL_API_KEY,
});
async function main() {
const response = await client.chat.complete({
model: 'mistral-small-latest',
messages: [
{ role: 'user', content: 'Say "Hello, World!" in a creative way.' }
],
});
console.log(response.choices?.[0]?.message?.content);
}
main().catch(console.error);
Python (hello_mistral.py)
import os
from mistralai import Mistral
client = Mistral(api_key=os.environ.get("MISTRAL_API_KEY"))
def main():
response = client.chat.complete(
model="mistral-small-latest",
messages=[
{"role": "user", "content": "Say 'Hello, World!' in a creative way."}
],
)
print(response.choices[0].message.content)
if __name__ == "__main__":
main()
# TypeScript
npx tsx hello-mistral.ts
# Python
python hello_mistral.py
TypeScript Streaming
import Mistral from '@mistralai/mistralai';
const client = new Mistral({
apiKey: process.env.MISTRAL_API_KEY,
});
async function streamChat() {
const stream = await client.chat.stream({
model: 'mistral-small-latest',
messages: [
{ role: 'user', content: 'Tell me a short story about AI.' }
],
});
for await (const event of stream) {
const content = event.data?.choices?.[0]?.delta?.content;
if (content) {
process.stdout.write(content);
}
}
console.log(); // newline
}
streamChat().catch(console.error);
Python Streaming
import os
from mistralai import Mistral
client = Mistral(api_key=os.environ.get("MISTRAL_API_KEY"))
def stream_chat():
stream = client.chat.stream(
model="mistral-small-latest",
messages=[
{"role": "user", "content": "Tell me a short story about AI."}
],
)
for event in stream:
content = event.data.choices[0].delta.content
if content:
print(content, end="", flush=True)
print() # newline
if __name__ == "__main__":
stream_chat()
Hello, World!
(But spoken by a million synchronized starlings,
spelling it across the twilight sky...)
| Error | Cause | Solution |
|---|---|---|
| Import Error | SDK not installed | Verify with npm list @mistralai/mistralai |
| Auth Error | Invalid credentials | Check MISTRAL_API_KEY is set |
| Timeout | Network issues | Increase timeout or check connectivity |
| Rate Limit | Too many requests | Wait and retry with exponential backoff |
const messages = [
{ role: 'system', content: 'You are a helpful assistant.' },
{ role: 'user', content: 'What is the capital of France?' },
];
const response1 = await client.chat.complete({
model: 'mistral-small-latest',
messages,
});
// Add assistant response to conversation
messages.push({
role: 'assistant',
content: response1.choices?.[0]?.message?.content || '',
});
// Continue conversation
messages.push({ role: 'user', content: 'What about Germany?' });
const response2 = await client.chat.complete({
model: 'mistral-small-latest',
messages,
});
console.log(response2.choices?.[0]?.message?.content);
const response = await client.chat.complete({
model: 'mistral-small-latest',
messages: [{ role: 'user', content: 'Write a haiku about coding.' }],
temperature: 0.7, // 0-1, higher = more creative
maxTokens: 100,
});
Proceed to mistral-local-dev-loop for development workflow setup.
Guide developers through setting up development environments with proper tools, dependencies, and configurations
Implement Exa lint rules, policy enforcement, and automated guardrails. Use when setting up code quality rules for Exa integrations, implementing pre-commit hooks, or configuring CI policy checks for Exa best practices. Trigger with phrases like "exa policy", "exa lint", "exa guardrails", "exa be...
Configure CI/CD pipelines for Documenso integrations. Use when setting up automated testing, deployment pipelines, or continuous integration for Documenso projects. Trigger with phrases like "documenso CI", "documenso GitHub Actions", "documenso pipeline", "documenso automated testing".
Build check model availability and implement fallback chains. Use when building resilient systems or handling model outages. Trigger with phrases like 'openrouter availability', 'openrouter fallback', 'openrouter model down', 'openrouter health check'.
Configure Langfuse enterprise organization management and access control. Use when implementing team access controls, configuring organization settings, or setting up role-based permissions for Langfuse projects. Trigger with phrases like "langfuse RBAC", "langfuse teams", "langfuse organization"...
Execute compliance and security auditing for Cursor usage. Triggers on "cursor compliance", "cursor audit", "cursor security review", "cursor soc2", "cursor gdpr". Use when analyzing or auditing cursor compliance audit. Trigger with phrases like "cursor compliance audit", "cursor audit", "cursor".
Configure Apollo.io CI/CD integration. Use when setting up automated testing, continuous integration, or deployment pipelines for Apollo integrations. Trigger with phrases like "apollo ci", "apollo github actions", "apollo pipeline", "apollo ci/cd", "apollo automated tests".
Create robust Python automation with full logging and safety checks. Use when tasks need complex data processing, authenticated API work, conditional file operations, or error handling beyond simple shell commands.
Configure PostHog across development, staging, and production environments. Use when setting up multi-environment deployments, configuring per-environment secrets, or implementing environment-specific PostHog configurations. Trigger with phrases like "posthog environments", "posthog staging", "po...
Expert in designing and building autonomous AI agents. Masters tool use, memory systems, planning strategies, and multi-agent orchestration. Use when: build agent, AI agent, autonomous agent, tool use, function calling.
Validate insecure deserialization checker operations. Auto-activating skill for Security Fundamentals. Triggers on: insecure deserialization checker, insecure deserialization checker Part of the Security Fundamentals skill category. Use when working with insecure deserialization checker functiona...
Manage path traversal finder operations. Auto-activating skill for Security Fundamentals. Triggers on: path traversal finder, path traversal finder Part of the Security Fundamentals skill category. Use when working with path traversal finder functionality. Trigger with phrases like "path traversa...
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience