Write Vibe Tests
mistralai/mistral-vibe
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.
[Internal sub-skill of polylith-migrate-orchestrator. An agent skill from DavidVujic/python-polylith.
$ npx skills add DavidVujic/python-polylith --skill polylith-migrate-refactor-tests -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install DavidVujic/python-polylith polylith-migrate-refactor-tests --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/DavidVujic/python-polylith.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/polylith/migrate-project/polylith-migrate-refactor-tests .claude/skills/polylith-migrate-refactor-tests && rm -rf skills-srcUse ~/.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/
Install the "polylith-migrate-refactor-tests" agent skill from https://github.com/DavidVujic/python-polylith/tree/main/.agents/skills/polylith/migrate-project/polylith-migrate-refactor-tests into .claude/skills/polylith-migrate-refactor-tests/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "polylith-migrate-refactor-tests", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/DavidVujic/python-polylith/tree/main/.agents/skills/polylith/migrate-project/polylith-migrate-refactor-testsType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add DavidVujic/python-polylith --skill polylith-migrate-refactor-tests -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install DavidVujic/python-polylith polylith-migrate-refactor-tests --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/DavidVujic/python-polylith.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/polylith/migrate-project/polylith-migrate-refactor-tests .agents/skills/polylith-migrate-refactor-tests && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "polylith-migrate-refactor-tests" agent skill from https://github.com/DavidVujic/python-polylith/tree/main/.agents/skills/polylith/migrate-project/polylith-migrate-refactor-tests into .agents/skills/polylith-migrate-refactor-tests/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "polylith-migrate-refactor-tests", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add DavidVujic/python-polylith --skill polylith-migrate-refactor-tests -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install DavidVujic/python-polylith polylith-migrate-refactor-tests --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/DavidVujic/python-polylith.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/polylith/migrate-project/polylith-migrate-refactor-tests .cursor/skills/polylith-migrate-refactor-tests && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "polylith-migrate-refactor-tests" agent skill from https://github.com/DavidVujic/python-polylith/tree/main/.agents/skills/polylith/migrate-project/polylith-migrate-refactor-tests into .cursor/skills/polylith-migrate-refactor-tests/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "polylith-migrate-refactor-tests", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/DavidVujic/python-polylith.git --path .agents/skills/polylith/migrate-project/polylith-migrate-refactor-tests--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add DavidVujic/python-polylith --skill polylith-migrate-refactor-tests -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install DavidVujic/python-polylith polylith-migrate-refactor-tests --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/DavidVujic/python-polylith.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/polylith/migrate-project/polylith-migrate-refactor-tests .gemini/skills/polylith-migrate-refactor-tests && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "polylith-migrate-refactor-tests" agent skill from https://github.com/DavidVujic/python-polylith/tree/main/.agents/skills/polylith/migrate-project/polylith-migrate-refactor-tests into .gemini/skills/polylith-migrate-refactor-tests/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "polylith-migrate-refactor-tests", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install DavidVujic/python-polylith polylith-migrate-refactor-testsInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add DavidVujic/python-polylith --skill polylith-migrate-refactor-tests -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/DavidVujic/python-polylith.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/polylith/migrate-project/polylith-migrate-refactor-tests .github/skills/polylith-migrate-refactor-tests && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "polylith-migrate-refactor-tests" agent skill from https://github.com/DavidVujic/python-polylith/tree/main/.agents/skills/polylith/migrate-project/polylith-migrate-refactor-tests into .github/skills/polylith-migrate-refactor-tests/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "polylith-migrate-refactor-tests", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add DavidVujic/python-polylith --skill polylith-migrate-refactor-tests -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install DavidVujic/python-polylith polylith-migrate-refactor-tests --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/DavidVujic/python-polylith.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/polylith/migrate-project/polylith-migrate-refactor-tests .opencode/skills/polylith-migrate-refactor-tests && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "polylith-migrate-refactor-tests" agent skill from https://github.com/DavidVujic/python-polylith/tree/main/.agents/skills/polylith/migrate-project/polylith-migrate-refactor-tests into .opencode/skills/polylith-migrate-refactor-tests/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "polylith-migrate-refactor-tests", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
polylith-migrate-refactor-tests[Internal sub-skill of polylith-migrate-orchestrator. An agent skill from DavidVujic/python-polylith.
Polylith Migrate Refactor Tests is an agent skill from DavidVujic/python-polylith. [Internal sub-skill of polylith-migrate-orchestrator. Do not load directly — load polylith-migrate-orchestrator first, which drives all phases.] Restructure unit tests to align with the workspace's Polylith theme.
Its SKILL.md is about 2.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Testing & QA, covering Unit testing and Refactoring. It works with pytest. The repository describes itself as: Tooling support for the Polylith Architecture in Python. The licence is MIT.
4 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit a7a80f2. It shows what the files ask for, not the result of running them.
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.
Shell commands in SKILL.md call:
gitpytestFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Polylith Migrate Refactor Tests loads about 2.1k tokens when it runs. Until then it costs about 62 tokens; SKILL.md has 988 words of instructions outside code blocks.
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.
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.
The full file from DavidVujic/python-polylith at commit a7a80f2, republished under its MIT licence (© DavidVujic). 988 words, ~2,070 tokens.
.claude/skills/polylith-migrate-refactor-tests/SKILL.md (or your agent's skills folder).Restructure unit tests so they live next to the brick they test, following the workspace's Polylith theme (loose or tdd).
test/integration/ or test/<project>/integration/). Do not redistribute them across bricks.Two real traps when moving unit tests next to their bricks:
from <svc>_service.helpers import …,
from <svc>_service.fixtures import …), those resolve today only because the
service test dir sits on sys.path (pytest inserts the topmost non-package dir).
Once a test moves to test/components/<TARGET_TOP_NS>/<comp>/ (no __init__.py),
pytest inserts the leaf test dir instead, and the shared import breaks.test/ to pythonpath. That makes
test/<…>/<TARGET_TOP_NS>/<brick>/ directories merge into the real
<TARGET_TOP_NS> namespace and collide with components/<TARGET_TOP_NS>/<brick>
/ bases/<TARGET_TOP_NS>/<brick> — an ambiguous, hard-to-debug namespace package.test/ on the path: convert them to conftest.py
fixtures (pytest injects fixtures with no import), or move pure helper functions
to an on-path support location. Unit tests then live under test/<theme>/<TARGET_TOP_NS>/<brick>/.test/<svc>_service/ directory (the importable, valid-package name that
polylith-migrate-prepare-project created). Shared helpers stay co-located and importable.
Choose this when converting helpers to fixtures isn't worth it; record the choice in
state.md. This still satisfies "tests at workspace level".If unsure, the workspace-level service dir is the lower-risk default.
From migration/<PROJECT>/state.md:
TARGET_TOP_NSRUN_TEST_CMD (will be updated by this skill)RUN_LINT_CMD, RUN_TYPECHECK_CMD (optional)From migration/<PROJECT>/manifest.md:
From workspace.toml:
[tool.polylith.structure].theme (loose or tdd).From test/:
All inputs from
state.mdare assumed to satisfy the validation rules inpolylith-migrate-discover(### Validation rules). Validate before proceeding.
| Theme | Test path for a base | Test path for a component |
|---|---|---|
loose | test/bases/<TARGET_TOP_NS>/<base>/test_*.py | test/components/<TARGET_TOP_NS>/<component>/test_*.py |
tdd | bases/<base>/test/<TARGET_TOP_NS>/<base>/test_*.py | components/<component>/test/<TARGET_TOP_NS>/<component>/test_*.py |
For each test_*.py under the current test root:
import statements and mock.patch("...") strings.test_user_handler.py → <user_handler base or component>).| Test file | Primary brick | Target path |
|---|
If a test exercises 2+ bricks at integration level, classify it as integration and move it to test/integration/ instead.
test_*.py to its brick's test directory.conftest.py:test/<TARGET_TOP_NS>/conftest.py or test/conftest.py.from tests.<x> imports that survived to the new layout.mock.patch("<old.path>") strings. Brick reshuffling earlier in the migration may have changed where the patched symbol now lives — use grep to locate the target symbol's new path and align the patch string. Patching a wrong path silently succeeds and the test will pass for the wrong reason — verify by intentionally breaking the target function and checking that the test fails.RUN_TEST_CMDRUN_TEST_CMD in state.md to a command that collects from the new test root (typically <POLY_CMD_PREFIX_RUN> pytest test/ for loose, or per-brick collection for tdd).polylith-migrate-discover. A drop in collected tests means files were lost or pytest discovery is misconfigured.RUN_TEST_CMD succeeds and collects the same number of tests as the baseline from polylith-migrate-discover.RUN_LINT_CMD succeeds.POLY_CMD_PREFIX check is still green.| Symptom | Likely cause | Remediation |
|---|---|---|
pytest collects fewer tests than before | The old test root is no longer on pytest's path; or duplicate conftest.py files silently shadow each other. | Update [tool.pytest.ini_options].testpaths (or pass paths explicitly in RUN_TEST_CMD). Run pytest --collect-only and diff against baseline collection. |
fixture '<name>' not found | The fixture was in a conftest.py you moved into a brick's test dir; tests in another brick can no longer see it. | Either move the fixture up to a higher-scope conftest.py, or duplicate it (only if cheap). Don't import fixtures across conftest.py files. |
Tests pass but assert nothing useful (mock.patch no longer hits anything) | Patch string still points at the pre-migration module path. | Re-derive the patch path: <TARGET_TOP_NS>.<brick_name>.<module>.<symbol>. Validate by deliberately breaking the patched function and confirming the test fails. |
ImportError: cannot import name 'fixture_<x>' from conftest.py | A conftest.py imports a moved test helper module that didn't follow it. | Move the helper next to the new conftest.py, or import it from its new brick path. |
| Tests for moved code suddenly find themselves under a brick name that doesn't match their content | Misclassification in step 1. | Re-read the test's imports — the brick most imported is the one that owns the test. Move and update. |
ModuleNotFoundError: No module named '<svc>_service' after moving a test to test/<theme>/<TARGET_TOP_NS>/<brick>/ | Shared test-support package is no longer on sys.path. | Use a sanctioned layout (above): convert the helpers to conftest fixtures, or keep tests in the workspace-level <svc>_service/ dir. Do not add test/ to pythonpath (namespace merge with the real bricks). |
| Verification fails and you can't quickly diagnose | Phase commit not yet made. | git reset --hard HEAD to roll back to the previous phase's commit and consult the user. |
After verification passes, commit this phase to the migration branch:
git add -A && git commit -m "migrate(<PROJECT>): phase <N> — refactor-tests"Substitute <PROJECT>, <N>, and <phase-name> from state.md and the orchestrator's phase table. Do not proceed to the next phase without a clean commit — the per-phase commit is the rollback point for the next phase's failure-mode tables.
© DavidVujic, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .agents/skills/polylith/migrate-project/polylith-migrate-refactor-tests of DavidVujic/python-polylith.
Open the folder on GitHubat commit a7a80f2
Polylith Migrate Refactor Tests 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Polylith Migrate Refactor Tests this skillDavidVujic/python-polylith | 553 | — | ~2.1k | Automated safety check: Pass | MIT | |
| Write Vibe Testsmistralai/mistral-vibe | 5.1k | — | ~1.2k | Automated safety check: Pass | Apache-2.0 | |
| Python Regression Test GeneratorArabelaTso/Skills-4-SE | 253 | — | ~4.1k | Automated safety check: Pass | Apache-2.0 | |
| Adk Verify Snippetsgoogle/adk-python | 22k | — | ~1.4k | Automated safety check: Pass | Apache-2.0 | |
| TDD WorkflowhellangleZ/burn-in-cceverywhere-ralph | 112 | 11 repos | ~2.4k | Automated safety check: Pass | None | |
| Hermetic Python Unit TestsdimensionalOS/dimos | 4.6k | — | ~1.4k | Automated safety check: Pass | Custom licence |
mistralai/mistral-vibe
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.
ArabelaTso/Skills-4-SE
Automatically generates regression tests for Python codebases by analyzing changes between old and new code versions and their existing tests.
google/adk-python
Checks that every Python code block in a Markdown file actually compiles and runs, by extracting each block to a temporary file, executing it in an isolated subprocess, and writing a pass/fail…
hellangleZ/burn-in-cceverywhere-ralph
A skill your agent uses when writing new features, fixing bugs, or refactoring code.
dimensionalOS/dimos
Rules for writing, fixing and reviewing pytest unit tests that are hermetic: behavior-focused, deterministic, isolated and cheap to run.
amElnagdy/guard-skills
Reviews newly written or edited tests against nine rules that cut test bloat, such as mock-heavy checks and near-duplicate cases, before they are committed.
DavidVujic/python-polylith
Create a Polylith base with poly create base — the entry point of a deployable application (HTTP API, CLI, message-queue consumer, AWS Lambda handler, GCP Cloud Function, scheduled job).
DavidVujic/python-polylith
Validate a Polylith workspace with poly check — the canonical CI gate.
DavidVujic/python-polylith
Create a Polylith component with poly create component — a reusable, isolated brick implementing business logic, a feature, a domain module, or a capability.
DavidVujic/python-polylith
Add or manage third-party dependencies in a Polylith workspace.
DavidVujic/python-polylith
Visualize brick × brick dependencies with poly deps — find circular dependencies, inspect a brick's public interface, and detect interface-bypass violations.
DavidVujic/python-polylith
List Polylith bricks whose implementation changed since a git tag using poly diff.
Works with
Categories
[Internal sub-skill of polylith-migrate-orchestrator. An agent skill from DavidVujic/python-polylith. Polylith Migrate Refactor Tests is an agent skill from DavidVujic/python-polylith. [Internal sub-skill of polylith-migrate-orchestrator.
Polylith Migrate Refactor Tests fits situations like: tasks that involve Unit testing; tasks that involve Refactoring.
Run `npx skills add DavidVujic/python-polylith --skill polylith-migrate-refactor-tests -a claude-code`. Or copy the skill folder (.agents/skills/polylith/migrate-project/polylith-migrate-refactor-tests in DavidVujic/python-polylith) into .claude/skills/polylith-migrate-refactor-tests in your project. Claude Code loads it when a task matches its description.
Run `npx skills add DavidVujic/python-polylith --skill polylith-migrate-refactor-tests -a codex`. Or copy the skill folder (.agents/skills/polylith/migrate-project/polylith-migrate-refactor-tests in DavidVujic/python-polylith) into .agents/skills/polylith-migrate-refactor-tests in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add DavidVujic/python-polylith --skill polylith-migrate-refactor-tests -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/polylith-migrate-refactor-tests, .gemini/skills/polylith-migrate-refactor-tests, .github/skills/polylith-migrate-refactor-tests and .opencode/skills/polylith-migrate-refactor-tests in your project.
Going by SKILL.md and its folder, Polylith Migrate Refactor Tests needs the command-line tools its instructions call (git and pytest).
SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
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.
Polylith Migrate Refactor Tests is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.1k tokens (SKILL.md is roughly 8.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Polylith Migrate Refactor Tests: Write Vibe Tests (mistralai/mistral-vibe, 5.1k stars), Python Regression Test Generator (ArabelaTso/Skills-4-SE, 253 stars), Adk Verify Snippets (google/adk-python, 22k stars) and TDD Workflow (hellangleZ/burn-in-cceverywhere-ralph, 112 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
DavidVujic (a GitHub user) maintains it in DavidVujic/python-polylith, which has 553 GitHub stars. The repository holds 37 skills in this directory. The repository was last updated on October 4, 2026.
Source: DavidVujic/python-polylith on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.