mistral-security-basics
Configures security measures for Mistral AI, focusing on API key protection and prompt sanitization.
Install
mkdir -p .claude/skills/mistral-security-basics && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/4683" && unzip -o skill.zip -d .claude/skills/mistral-security-basics && rm skill.zipInstalls to .claude/skills/mistral-security-basics
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Apply Mistral AI security best practices for secrets, prompt injection,Key capabilities
- →Manage API keys via secret managers
- →Filter user input for prompt injection patterns
- →Moderate content using mistral-moderation-latest
- →Sanitize model output for PII and script tags
- →Automate API key rotation
How it works
The skill provides a security layer that wraps user input to prevent injection, uses a moderation API to gate content, and sanitizes outputs to remove PII and malicious tags.
Inputs & outputs
When to use mistral-security-basics
- →Securing Mistral API keys
- →Implementing prompt injection defense
- →Auditing AI security configuration
- →Setting up content moderation
About this skill
Mistral Security Boundary
Overview
Apply controls at the application boundary because model instructions do not enforce identity, tenancy, authorization, or side-effect safety. Treat user content, retrieval, files, and output as untrusted.
Prerequisites
- A data-flow diagram covering browser, app, Mistral, stores, and tools.
- Credential, retention, tenant, moderation, and incident policies.
- An inventory of stateful APIs, files, retrieval stores, and actions.
Current Contract
Bearer credentials authorize provider calls but not application users. Classifiers can support policy but do not replace controls. ZDR eligibility differs between stateless and stateful products.
Authentication
Keep keys server-side and environment-scoped; rotate on exposure. Enforce user and tenant authorization before retrieval, provider calls, files, and tools.
Instructions
- Map trust boundaries and classify prompts, outputs, embeddings, files, logs, and IDs.
- Remove credentials and privileged instructions from browser/untrusted contexts.
- Separate trusted policy from untrusted content and delimit retrieved text as data.
- Validate output structure and safety before render, storage, or tool use.
- Authorize tools via closed registry, schemas, least privilege, deadlines, and idempotency.
- Test injection, cross-tenant access, unsafe output, exfiltration, duplicates, and rotation.
Tool Discipline
Use Read, Glob, and Grep to inspect code, locks, configuration, tests, and evidence. Use Write and Edit only for approved repository changes. Invocation alone does not authorize network calls, paid usage, uploads, stateful resources, admin mutations, deployments, or deletion.
Approval Boundaries
Require approval for sensitive data, uploads, stateful APIs, tools, policy changes, retention, or live attack testing. Model output never grants authority.
Error Handling
- Prompt wording cannot enforce access control.
- Moderation success does not prove correctness or tool safety.
- Assuming ZDR for Files, Batch, Agents, Conversations, or other stateful products is unsafe.
Output
Return assets, threats, controls, residual risks, data/API boundary, tests, owners, and rollback. Exclude live secrets and customer data.
Examples
- Reject retrieved text asking for a system secret.
- Require fresh app authorization before a proposed refund tool.
Validation
Run synthetic abuse cases across input, retrieval, output, rendering, and tools; confirm tenant filters and rotation independently.
Resources
- Current first-party evidence map — recheck dated sources before relying on mutable endpoints, models, limits, prices, preview status, or retention.
- Record live account observations as environment-specific evidence, not universal Mistral guarantees.
When not to use it
- →Logging full request content
- →Hardcoding API keys in source code
Prerequisites
Limitations
- →Sanitization regex may not catch all PII patterns
How it compares
It provides a proactive sanitization pipeline and automated key rotation logic instead of relying on basic API authentication.
Compared to similar skills
mistral-security-basics side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| mistral-security-basics (this skill) | 1 | 2mo | Review | Advanced |
| auth-patterns | 7 | 9mo | Review | Intermediate |
| clerk-incident-runbook | 1 | 2mo | Caution | Intermediate |
| customerio-security-basics | 1 | 2mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by jeremylongshore
View all by jeremylongshore →You might also like
auth-patterns
davepoon
This skill should be used when the user asks about "authentication in Next.js", "NextAuth", "Auth.js", "middleware auth", "protected routes", "session management", "JWT", "login flow", or needs guidance on implementing authentication and authorization in Next.js applications.
clerk-incident-runbook
jeremylongshore
Incident response procedures for Clerk authentication issues. Use when handling auth outages, security incidents, or production authentication problems. Trigger with phrases like "clerk incident", "clerk outage", "clerk down", "auth not working", "clerk emergency".
customerio-security-basics
jeremylongshore
Apply Customer.io security best practices. Use when implementing secure integrations, handling PII, or setting up proper access controls. Trigger with phrases like "customer.io security", "customer.io pii", "secure customer.io", "customer.io gdpr".
gamma-enterprise-rbac
jeremylongshore
Implement enterprise role-based access control for Gamma integrations. Use when configuring team permissions, multi-tenant access, or enterprise authorization patterns. Trigger with phrases like "gamma RBAC", "gamma permissions", "gamma access control", "gamma enterprise", "gamma roles".
jwt-auth
dadbodgeoff
Implement secure JWT authentication with refresh token rotation, secure storage, and automatic renewal. Use when building authentication for SPAs, mobile apps, or APIs that need stateless auth with refresh capabilities.
maintainx-security-basics
jeremylongshore
Configure MaintainX API security, credential management, and access control. Use when securing API keys, implementing access controls, or hardening your MaintainX integration. Trigger with phrases like "maintainx security", "maintainx api key security", "secure maintainx", "maintainx credentials", "maintainx access control".