agentleFS
MistralKnown publishermistralai/cookbook/skills/check-stale-cookbooks/SKILL.md

check-stale-cookbooks

Skill2.3k starsChanged 4 months agoMITView on GitHub

Scan Mistral AI cookbook files for outdated content — deprecated models, old SDK imports, and changed API methods — and surface a prioritized list of issues with reference links. Trigger when the user asks to: - Check which cookbooks are out of date or stale - Find cookbooks using deprecated models, old SDK imports, or old API methods - Audit the mistral/ directory before a release - Run the stale checker locally before opening a fix PR Set your Mistral…

  • Reads credentials
  • Installs packages

Trending

Quiet since September.about the whole repository

Jan 2026: 0 mentionsFeb 2026: 1 mentionMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 2 mentionsJul 2026: 0 mentionsAug 2026: 0 mentionsSep 2026: 3 mentionsOct 2026: 0 mentionsNov 2026: 0 mentionsDec 2026: 0 mentions
Jan 2026Jul 2026Dec 2026
Mentions a month of the mistralai/cookbook repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about mistralai/cookbook

The biggest 5 of 20 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 20

Talked about on GitHub and Hacker News (20 times).

On GitHub · 19

14 more on GitHub

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Check which cookbooks are out of date or stale

    line 8
  2. Distinctive:

    Run the stale checker locally before opening a fix PR

    line 11
  3. Very specific:

    Every flagged issue must include a quote field with text from the reference that confirms the deprecation

    line 102
  4. Very specific:

    Add # stale-check: ignore as a comment on any source line to skip it:

    line 106

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Check Stale Cookbooks

Scan Mistral AI cookbook files for outdated content — deprecated models, old SDK imports, and changed API methods — and surface a prioritized list of issues with reference links.

When to use this skill

Trigger when the user asks to:

  • Check which cookbooks are out of date or stale
  • Find cookbooks using deprecated models, old SDK imports, or old API methods
  • Audit the mistral/ directory before a release
  • Run the stale checker locally before opening a fix PR

Prerequisites

pip install -r skills/check-stale-cookbooks/requirements.txt

Set your Mistral API key for LLM-assisted analysis (optional but recommended):

export MISTRAL_API_KEY=your-api-key

Commands

Scan all cookbooks with LLM analysis (recommended):

python skills/check-stale-cookbooks/check_stale.py --dir mistral --use-llm

Scan a single file:

python skills/check-stale-cookbooks/check_stale.py --file mistral/rag/basic_RAG.ipynb --use-llm

Pattern-only mode (no network calls, no API key needed):

python skills/check-stale-cookbooks/check_stale.py --dir mistral --no-fetch

Write a JSON report for further processing:

python skills/check-stale-cookbooks/check_stale.py --dir mistral --use-llm --output report.json --format json

All flags

FlagDescription
--dir DIRDirectory to scan (default: mistral)
--file FILEScan a single file
--output FILEWrite JSON report to this path
--format markdown|jsonstdout format (default: markdown)
--no-fetchSkip network calls; run static pattern checks only
--use-llmEnable Mistral API analysis (requires MISTRAL_API_KEY)
--no-llmDisable LLM analysis even if the key is set

Exit codes

CodeMeaning
0No stale content found
1One or more files have stale content
2Bad arguments (file/dir not found)

What is checked

Static pattern checks (always run)

Pattern detectedIssue typeReference
from mistralai.client import MistralClientdeprecated_importclient-python
from mistralai import MistralClientdeprecated_importclient-python
from mistralai.models import ...deprecated_importclient-python
MistralClient(deprecated_classclient-python
ChatMessage(deprecated_classclient-python
client.chat( (without .complete)deprecated_methodclient-python
client.embeddings( (without .create)deprecated_methodclient-python README
client.fine_tuningdeprecated_apiFine-tuning docs
/v1/fine_tuning/ in curl/REST callsdeprecated_apiFine-tuning docs
pip install mistralai==0.outdated_versionclient-python README
@mistralai/mistralai@0.outdated_versionclient-ts README
"mistral-tiny"deprecated_modelModel list
"mistral-medium"deprecated_modelModel list
"open-mistral-7b"verify_modelModel list
"open-mixtral-8x7b"verify_modelModel list
"open-mixtral-8x22b"verify_modelModel list
Model IDs with dated versions (-2309, -2402)pinned_model_versionModel list

Dynamic model check (requires network, skipped with --no-fetch)

Fetches the live model list from /v1/models and flags any Mistral model ID used in an API call (model="...") that isn't in that list as unknown_model.

LLM-assisted check (requires --use-llm and MISTRAL_API_KEY)

Sends each file's code content and excerpts from the fetched reference docs to mistral-medium-latest for deeper semantic review. Catches issues pattern matching misses: renamed parameters, changed response structures, removed features, outdated best practices.

The LLM is explicitly instructed:

  • _async suffix methods (create_async, list_async, start_async, etc.) are valid — never flag them
  • Fine-tuning jobs API (client.fine_tuning) is deprecated
  • Every flagged issue must include a quote field with text from the reference that confirms the deprecation

Suppressing false positives

Add # stale-check: ignore as a comment on any source line to skip it:

# Showing the legacy pattern as a migration example — stale-check: ignore
old_client = MistralClient(api_key=os.environ["MISTRAL_API_KEY"])

This works in Python files, notebook code cells, and code blocks in Markdown.

File types scanned

ExtensionHow code is extracted
.ipynbCode cells only (markdown and output cells are skipped)
.mdFenced code blocks with language tags python, typescript, javascript, bash, sh, shell, or unknown
.pyFull file

Output format

Markdown (default)

# Stale Cookbook Report

**Scanned at:** 2026-07-20T09:00:00Z
**Files with issues:** 2
**Valid models found:** 24
**References checked:** platform-docs-public/openapi.yaml, client-python/README.md, client-ts/README.md

---

## `mistral/rag/basic_RAG.ipynb`

### Deprecated Class
- Deprecated `MistralClient` class (SDK v0). Use `Mistral(api_key=...)` instead.
  - **Location:** `Cell 2, line 4`
  - **Found:** `client = MistralClient(api_key=os.environ["MISTRAL_API_KEY"])`
  - **Reference:** [https://github.com/mistralai/client-python/blob/main/README.md](...)

JSON (--format json)

{
  "scanned_at": "2026-07-20T09:00:00Z",
  "references_checked": [
    "platform-docs-public/openapi.yaml",
    "client-python/README.md",
    "client-ts/README.md"
  ],
  "valid_models_count": 24,
  "files": [
    {
      "path": "mistral/rag/basic_RAG.ipynb",
      "issues": [
        {
          "type": "deprecated_class",
          "detail": "Deprecated `MistralClient` class (SDK v0). Use `Mistral(api_key=...)` instead.",
          "location": "Cell 2, line 4",
          "matched_line": "client = MistralClient(api_key=os.environ[\"MISTRAL_API_KEY\"])",
          "reference_url": "https://github.com/mistralai/client-python/blob/main/README.md"
        }
      ]
    }
  ]
}

GitHub Action

.github/workflows/check-stale-cookbooks.yml runs this script automatically:

  • Weekly on Monday at 9am UTC
  • Manually via workflow_dispatch

For each file with issues, it creates a GitHub issue (if one doesn't already exist) with a stale-cookbook label. When a previously stale file is clean on the next run, the action comments on and closes the existing issue.

Required secret in the repository: MISTRAL_API_KEY.

Reference repositories

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.