Official agent skill

Vibe Python Style Guide

by mistralai in mistralai/mistral-vibe

Python conventions for the Mistral Vibe codebase covering style, strict typing, imports, Pydantic patterns, logging, error handling and file I/O.

OfficialApache-2.0Auto-check passedDevelopment

Install Vibe Python Style Guide

skills CLI
$ npx skills add mistralai/mistral-vibe --skill vibe-python-style -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install mistralai/mistral-vibe vibe-python-style --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/mistralai/mistral-vibe.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/vibe-python-style .claude/skills/vibe-python-style && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
vibe-python-style
GitHub stars
5.1k
Token cost
~1.2k tokens
SKILL.md length
510 words
Files
1
Skills in repo
14
Repo updated
First seen
Licence
Apache-2.0

At a glance

Python conventions for the Mistral Vibe codebase covering style, strict typing, imports, Pydantic patterns, logging, error handling and file I/O.

  • Writing new Python code in the Vibe codebase
  • SKILL.md covers Style, Typing & imports, Pydantic and Logging & errors, plus 1 more section
  • Calls uv
  • Reviewing a pull request for style and typing rule violations

What it does

Style rules favor `match` and `case` over long if and elif chains, early returns instead of nesting, modern built-in generics and `|` unions with no `Optional`, `Union`, `Dict` or `List` imports from `typing`, `pathlib.Path` (and `anyio.Path` in async code) over `os.path`, and declarative minimal code with few comments. Enums use `StrEnum` or `IntEnum` with `auto()` and uppercase members, and private methods are not called from outside their class in production code.

Typing is strict: Pyright gates CI, relative imports are banned, and inline `type: ignore` or `noqa` comments are replaced by refined signatures, guards or casts. Moving imports under `TYPE_CHECKING` or into functions requires checks first: Ruff `TC004`, `uv run python scripts/check_import_contracts.py` and an informational `suggest_lazy_imports.py` report. For Pydantic, external data is parsed with `model_validate` and validators, not ad-hoc `getattr` walks. The skill also covers logging, error handling and file I/O.

When your agent uses it

  • Writing new Python code in the Vibe codebase
  • Reviewing a pull request for style and typing rule violations
  • Refactoring code to modern type hints and pathlib

Example prompts

  • “Refactor this module to Vibe's Python style, replacing the elif chain with match.”
  • “Review my PR for typing and import rule violations.”
  • “Replace the Optional and List imports with modern type hints in this file.”

Requirements

  • The Vibe repository with `uv`, Pyright and Ruff configured

What it can do on your machine

Read from SKILL.md and the folder at commit 7cb9189. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • uv

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use uv, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Vibe Python Style Guide loads about 1.2k tokens when it runs. Until then it costs about 58 tokens; SKILL.md has 510 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~58
When it runs · the whole SKILL.md, loaded when a task matches
~1.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from mistralai/mistral-vibe at commit 7cb9189, republished under its Apache-2.0 licence (© mistralai). 510 words, ~1,155 tokens.

Download SKILL.mdSave it as .claude/skills/vibe-python-style/SKILL.md (or your agent's skills folder).
name
vibe-python-style
description
Python coding conventions for Mistral Vibe. Use when writing, reviewing, or refactoring Python code in the Vibe codebase. Covers style, type hints, imports, Pydantic patterns, logging, error handling, and file I/O.
metadata.display-name
Vibe Python Style
metadata.short-description
Python style and patterns for Vibe
metadata.default-prompt
Use $vibe-python-style to follow Vibe Python conventions when writing or reviewing code.

Vibe Python Style

Conventions for writing Python in the Vibe codebase. Apply whenever writing, reviewing, or refactoring Python code.

Style

  • Prefer match / case over long if / elif chains.
  • Use the walrus operator := only when it shortens code and improves clarity.
  • Be a never-nester: early returns and guard clauses over nested blocks.
  • Modern type hints only: built-in generics (list, dict) and | unions. Never import Optional, Union, Dict, List from typing.
  • Use pathlib.Path (and anyio.Path in async paths) instead of os.path.
  • Use f-strings, comprehensions, and context managers; follow PEP 8.
  • Enums: StrEnum / IntEnum with auto() and UPPERCASE members. For type-mixing, the mix-in type comes before Enum in the bases. Add methods or @property rather than parallel lookup tables.
  • Write declarative, minimalist code: express intent, drop boilerplate.
  • Never call a private method from outside of its class in production code. Accessing private methods in tests is acceptable.
  • Avoid comments and docstrings, except for when there's a hard to spot corner case

Typing & imports

  • Pyright is strict and gates CI; fix types at the source.
  • No relative imports — ban-relative-imports = "all". Always from vibe.core.x import ….
  • No inline # type: ignore or # noqa. Fix with refined signatures (TypeVar, Protocol), isinstance guards, typing.cast when control flow guarantees the type, or a small typed wrapper at the boundary.
TYPE_CHECKING and lazy imports

Moving imports under if TYPE_CHECKING: or into function bodies cuts startup time but risks runtime NameError. Before merging any import-deferral change, run:

  • Ruff TC004 (pre-commit hook) — per-file: flags TYPE_CHECKING-only names referenced at runtime.
  • uv run python scripts/check_import_contracts.py — runtime cross-file: imports every from <mod> import <name> across vibe/ and tests/ to verify it resolves; also rebuilds Pydantic models to catch lazily-failing field types. Catches cross-file re-exports TC004 misses. Missing non-vibe deps are non-blocking warnings.
  • uv run scripts/suggest_lazy_imports.py — informational: reports deferral candidates (TC001–TC003 + single-function heuristic). Not gated.
Show full SKILL.md (212 more words)Show less

Pydantic

  • Parse external data via model_validate, field_validator, or model_validator(mode="before") — never ad-hoc getattr / hasattr walks or custom from_sdk constructors.
  • Set ConfigDict(extra=…) explicitly. Use validation_alias (or field aliases) for kebab-case TOML keys.
  • Discriminated unions (e.g. MCP transport): use sibling final classes plus a shared base/mixin, and compose with Annotated[Union[...], Field(discriminator=...)]. Never narrow the discriminator field in a subclass — it violates LSP and pyright will reject it.
  • Document Raises: only for exceptions the function actually raises (or that propagate from public API calls). Don't list speculative built-ins.

Logging & errors

  • Use from vibe.observability.logging import logger — stdlib logging with StructuredLogFormatter, not structlog.
  • Configure via env: LOG_LEVEL (default WARNING), LOG_MAX_BYTES. Logs land in ~/.vibe/logs/vibe.log.
  • Pass variables as %s positional args, not f-string interpolation: prefer logger.error("Failed to fetch url=%s", url) over logger.error(f"Failed to fetch {url}"). This defers formatting to the logging framework (only formats if the message is emitted) and keeps messages grep-friendly.
  • Define module-local exception hierarchies. Always chain with raise NewError(...) from e. Rich exceptions expose a _fmt() helper for human-readable output.

File I/O

  • Prefer vibe.core.utils.io.read_safe / read_safe_async / decode_safe over raw Path.read_text(), Path.read_bytes().decode(), or open().
  • They return ReadSafeResult(text, encoding) and try UTF-8, then BOM detection, then locale, then charset_normalizer lazily.
  • Pass raise_on_error=True only when callers must distinguish corrupt files from valid ones; the default replaces undecodable bytes with U+FFFD.

© mistralai, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/vibe-python-style of mistralai/mistral-vibe.

Open the folder on GitHubat commit 7cb9189

Compare with similar skills

Vibe Python Style Guide next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Vibe Python Style Guide compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Vibe Python Style Guide this skillmistralai/mistral-vibe5.1k—~1.2kAutomated safety check: PassApache-2.0
Adk Stylegoogle/adk-python22k—~748Automated safety check: PassApache-2.0
Cb Code QualityBlkLeg/CircuitBreaker201—~1.9kAutomated safety check: PassMIT
Code Quality ToolsYikai-Liao/symusic189—~2.9kAutomated safety check: PassMIT
Python Idiomsirahardianto/awesome-agv157—~4.4kAutomated safety check: PassMIT
Python Project SetupFerroxLabs/wayland608—~3.7kAutomated safety check: PassApache-2.0

Similar skills

  • Adk Style

    google/adk-python

    Official

    Python style and codebase conventions for ADK (Agent Development Kit): private-by-default file visibility, imports, type hints, Pydantic v2 models, formatting, docstrings, logging, async I/O, file…

    22k GitHub stars~748 tokensUpdated today
    DevelopmentAuto-check passed
  • Cb Code Quality

    BlkLeg/CircuitBreaker

    Circuit Breaker code conventions and the quality gates that actually block a push — ruff, mypy, eslint, the pytest coverage ratchet, and the make verify tiers.

    201 GitHub stars~1.9k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Code Quality Tools

    Yikai-Liao/symusic

    Configure and use automated code quality tools (ruff, mypy, pre-commit) for scientific Python projects.

    189 GitHub stars~2.9k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • Python Idioms

    irahardianto/awesome-agv

    Modern Python (3.11+) idioms: type annotations, typing Protocols, Pydantic models, asyncio, pytest fixtures, and Ruff/Mypy strict compliance.

    157 GitHub stars~4.4k tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Python Project Setup

    FerroxLabs/wayland

    Guides expert-level Python project initialization with modern tooling: pyproject.toml configuration, uv for dependency management, src layout decisions, mypy strict mode, and ruff for…

    608 GitHub stars~3.7k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Kedro Babysit

    kedro-org/kedro

    Run Kedro's local lint / format / type-check / tests on changed files (uses the project's pre-commit hooks, ruff, mypy, pytest, lint-imports, detect-secrets, Make targets — in the right venv), or…

    11k GitHub stars~4k tokensUpdated yesterday
    DevelopmentAuto-check passed

More from mistralai/mistral-vibe

All 14 skills in this repo
  • Mistral Vibe Plugin Creator

    mistralai/mistral-vibe

    Official

    Shows how to build a Vibe plugin package in the Agent Plugins 1.0 format, with a plugin.json manifest and optional skills, MCP servers, hooks and other components.

    5.1k GitHub stars~3.1k tokensUpdated yesterday
    Auto-check passed
  • Create Vibe Feature

    mistralai/mistral-vibe

    Official

    Guides feature work in the Mistral Vibe Python CLI so each change lands in the right module and matches the project's architecture decision records.

    5.1k GitHub stars~1.2k tokensUpdated yesterday
    Auto-check passed
  • Official

    Plans which analytics events and properties a new feature needs, checks them against the existing event registry, and verifies them per environment.

    5.1k GitHub stars~2.2k tokensUpdated yesterday
    Auto-check passed
  • Vibe Worktree Manager

    mistralai/mistral-vibe

    Official

    Creates, reuses and cleans up git worktrees under a shared vibe home directory, with per-repo buckets, claim records and dirty-state checks before removal.

    5.1k GitHub stars~1.2k tokensUpdated yesterday
    Auto-check passed
  • Write Vibe ADR

    mistralai/mistral-vibe

    Official

    Creates or updates concise Architecture Decision Records for the Mistral Vibe CLI and registers each one in the AGENTS.md decisions table.

    5.1k GitHub stars~942 tokensUpdated yesterday
    Auto-check passed
  • Write Vibe Tests

    mistralai/mistral-vibe

    Official

    Guides writing or refactoring tests for the Mistral Vibe CLI agent so they check behavior through stable boundaries, like tool invocation or saved session shape, instead of internal calls.

    5.1k GitHub stars~1.2k tokensUpdated yesterday
    Auto-check passed

Categories

Questions about Vibe Python Style Guide

What does Vibe Python Style Guide do?

Python conventions for the Mistral Vibe codebase covering style, strict typing, imports, Pydantic patterns, logging, error handling and file I/O. path`, and declarative minimal code with few comments. Enums use `StrEnum` or `IntEnum` with `auto()` and uppercase members, and private methods are not called from outside their class in production code.

When should I use Vibe Python Style Guide?

Vibe Python Style Guide fits situations like: writing new Python code in the Vibe codebase; reviewing a pull request for style and typing rule violations; refactoring code to modern type hints and pathlib.

How do I install Vibe Python Style Guide in Claude Code?

Run `npx skills add mistralai/mistral-vibe --skill vibe-python-style -a claude-code`. Or copy the skill folder (.agents/skills/vibe-python-style in mistralai/mistral-vibe) into .claude/skills/vibe-python-style in your project. Claude Code loads it when a task matches its description.

How do I install Vibe Python Style Guide in Codex?

Run `npx skills add mistralai/mistral-vibe --skill vibe-python-style -a codex`. Or copy the skill folder (.agents/skills/vibe-python-style in mistralai/mistral-vibe) into .agents/skills/vibe-python-style in your project. Codex loads it when a task matches its description.

Can I use Vibe Python Style Guide in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add mistralai/mistral-vibe --skill vibe-python-style -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/vibe-python-style, .gemini/skills/vibe-python-style, .github/skills/vibe-python-style and .opencode/skills/vibe-python-style in your project.

What does Vibe Python Style Guide need to run?

Going by SKILL.md and its folder, Vibe Python Style Guide needs the command-line tools its instructions call (uv). Our summary lists: The Vibe repository with `uv`, Pyright and Ruff configured.

Does Vibe Python Style Guide access the network?

SKILL.md contains no URLs. Its commands use uv, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Vibe Python Style Guide safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Vibe Python Style Guide use?

Vibe Python Style Guide is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Vibe Python Style Guide use?

About 1.2k tokens (SKILL.md is roughly 4.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Vibe Python Style Guide?

Skills that share tags, products or a category with Vibe Python Style Guide: Adk Style (google/adk-python, 22k stars), Cb Code Quality (BlkLeg/CircuitBreaker, 201 stars), Code Quality Tools (Yikai-Liao/symusic, 189 stars) and Python Idioms (irahardianto/awesome-agv, 157 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Vibe Python Style Guide?

mistralai (a GitHub organization, an official publisher) maintains it in mistralai/mistral-vibe, which has 5,057 GitHub stars. The repository holds 14 skills in this directory. The repository was last updated on October 6, 2026.

Source: mistralai/mistral-vibe on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.