Skills

Write Vibe Tests

Write or refactor Mistral Vibe tests with proper decoupling.

Install

npx skills add mistralai/mistral-vibe --skill write-vibe-tests -g -a claude-code -y
Category
Testing
Updated
5d ago
License
Apache-2.0
Context cost
Lightabout 1,168 tokens
Runs scripts
No, instructions only

What it does

Write or refactor Mistral Vibe tests with proper decoupling. Use when adding behavior coverage, testing ports/adapters, replacing brittle mocks, creating fakes, adding characterization tests before refactors, or changing tests under tests/ for vibe/core, vibe/app_server, vibe/acp, tools, config, sessions, skills, hooks, MCP, or setup.

Write Vibe Tests

Use this skill to make Vibe architecture testable, not just well-shaped. Tests should protect observable behavior while allowing internals to move.

Core Principle

Test behavior through stable boundaries. Do not couple tests to private methods, internal call choreography, or temporary structure.

If a refactor changes no observable behavior but breaks many tests, the tests are probably coupled to implementation details.

Vibe Test Boundaries

Code areaPreferred test boundary
Core use cases and servicesPublic function/class API, typed events, model outputs, persisted state
ToolsOwning app-server capability contract, typed invocation/results, permissions and user-facing errors; BaseTool.invoke/run for retained BaseTool implementations
LLM/backend orchestrationNative Unified Runtime through serialized app-server RPCs, with deterministic fake completion/discovery services
ConfigPydantic model validation, layer merge outputs, migration results
SessionsRuntime session operations, durability/recovery and app-server projections; JSONL/metadata only for the supported read-only historical importer
Terminal UI (vibe/cli-rust)Rust unit tests for pure logic, client-e2e scenarios and goldens for rendering and interaction (see vibe/cli-rust/AGENTS.md)
ACPACP session updates and protocol-facing content, not core internals

Prefer Fakes Over Mocks

Prefer in-memory implementations and fake adapters that implement real contracts.

  • Put reusable test doubles in tests/stubs/ and name them Fake*.
  • Make fakes small and behavior-oriented.
  • Mock only at hard process, network, time, or third-party boundaries when a fake would be more complex than the behavior under test.
  • Avoid assertions like "method X was called with Y" unless the call itself is the observable contract.

Legacy Or Refactor Workflow

When code is hard to test:

Read the whole SKILL.md on GitHub

More in Testing