agentleFS
MistralKnown publishermistralai/mistral-vibe/.vibe/skills/write-vibe-tests/SKILL.md

write-vibe-tests

Skill5k starsChanged 4 months agoApache-2.0View on GitHub

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/cli, vibe/acp, tools, config, sessions, skills, hooks, MCP, or setup.

Trending

Quiet since October.about the whole repository

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

Who's talking about mistralai/mistral-vibe

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

See all 47

Talked about on GitHub, Bluesky and Hacker News (47 times).

On GitHub · 40

35 more on GitHub

On Bluesky · 5

The file

Show its rules and text

We split this skill into the rules it gives an agent

16 rules. About 0 are common, 13 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈13

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill to make Vibe architecture testable, not just well-shaped.

    line 12
  2. Distinctive:

    Test behavior through stable boundaries.

    line 16
  3. Distinctive:

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

    line 18
  4. Distinctive:

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

    line 34
  5. Very specific:

    Put reusable test doubles in tests/stubs/ and name them Fake*.

    line 36
  6. Distinctive:

    Avoid assertions like "method X was called with Y" unless the call itself is the observable contract.

    line 39
  7. Distinctive:

    When code is hard to test:

    line 43
  8. Distinctive:

    Add characterization tests through the nearest public entry point.

    line 46
  9. Distinctive:

    Prefer "make it testable" refactors first: isolate I/O, extract pure functions, introduce ports/adapters where useful, or move construction …

    line 51
  10. Distinctive:

    Use descriptive test names.

    line 56
  11. Distinctive:

    Keep tests deterministic, fast, and explicit about failure.

    line 58
  12. Very specific:

    Use autouse fixtures from tests/conftest.py (config_dir, tmp_working_directory) for config/home/working-directory isolation.

    line 59
  13. Distinctive:

    Use the narrowest relevant test first, then broaden when shared contracts are touched.

    line 62
  14. Distinctive:

    After app-server session behavior, backend adapters, or shared contract-fixture changes, run both backend contract commands.

    line 65
  15. Distinctive:

    After Python test/code changes, run:

    line 77
  16. Very specific:

    Run uv run pyright when signatures, models, protocols, or shared contracts changed.

    line 90

≈ “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

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
ToolsBaseTool.invoke/run, typed args/results, permission behavior, user-facing errors
LLM/backend orchestrationAgentLoop events and fake backend outputs
ConfigPydantic model validation, layer merge outputs, migration results
SessionsSaved JSONL/metadata shape, resume/loader behavior, migration behavior
CLI widgetsTextual snapshots, posted messages, rendered user-visible state
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:

  1. Find the smallest seam: function boundary, constructor dependency, protocol/port, wrapper, composition root, feature flag, or module boundary.
  2. Add characterization tests through the nearest public entry point.
  3. Capture current observable behavior, even if awkward.
  4. Refactor behind the seam in small steps.
  5. Replace broad characterization checks with clearer behavior/spec tests as the design improves.

Prefer "make it testable" refactors first: isolate I/O, extract pure functions, introduce ports/adapters where useful, or move construction out of business logic.

Test Shape

  • Stack: pytest + pytest-asyncio + pytest-textual-snapshot + respx.
  • Use descriptive test names; do not add test docstrings. Pytest displays docstrings instead of node IDs when present, which hurts.
  • Arrange, act, and assert clearly, but optimize for readability over ceremony.
  • Keep tests deterministic, fast, and explicit about failure.
  • Use autouse fixtures from tests/conftest.py (config_dir, tmp_working_directory) for config/home/working-directory isolation.
  • Mark async tests with @pytest.mark.asyncio.
  • Mock outbound HTTP with respx.
  • Use the narrowest relevant test first, then broaden when shared contracts are touched.
  • Tests are exempt from the ANN and PLR ruff rules (see per-file-ignores).
  • Changes to managed shell tools, managed shell backends, shell prompts, or shell dependencies require focused POSIX/common validation and passing Windows shell CI. If Windows shell CI is unavailable, the PR notes must include manual native Windows commands and results.
  • After app-server session behavior, backend adapters, or shared contract-fixture changes, run both backend contract commands. A failing Unified frontier is expected before parity; include its complete pytest summary in parity-related PRs.

Avoid

  • Testing private methods as the primary coverage for behavior.
  • Asserting intermediate internal state when user-visible output, emitted events, files, or return values can be asserted.
  • Building mocks that mirror the implementation.
  • Adding abstractions only to satisfy a test.
  • Writing tests that require a specific internal file split or call order when the domain behavior is unchanged.

Verification

After Python test/code changes, run:

uv run ruff format .
uv run ruff check --fix .

Then run the targeted tests:

uv run pytest <test-path-or-node-id>

Run uv run pyright when signatures, models, protocols, or shared contracts changed.

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.