clean-tests SKILL.md skillA
clean-tests from omarsaleh506/skills is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.
mdr add omarsaleh506/skills/clean-tests@git:20261006.008e80ePins git:20261006.008e80e in mdr.lock. Pin the fingerprint instead.
- Audit grade
- A, 17 of 17 checks passed
- Kind
- SKILL.md skill
- Repository
- omarsaleh506/skills
- Path
skills/ai-os-init/templates/.claude/skills/clean-tests/SKILL.md- Versions recorded
- 2
- Latest version
- git:20261006.008e80e, committed Oct 6, 2026
- First version recorded
- Jun 28, 2026
- Size
- 2,607 bytes
- Repository stars
- 3
- License
- MIT
Audits and refactors existing test files for quality — removes brittle assertions, fixes implementation coupling (mocking internals), improves test names, eliminates duplication, and enforces behavior-over-implementation testing. Does NOT write new tests — use a TDD workflow for that. Use when asked to "clean up the tests", "improve test quality", "fix brittle tests", "refactor the test suite", "tests keep breaking on refactor", "tests are a mess", or "make the tests better".
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# clean-tests Audits and refactors existing tests without removing coverage. ## What Gets Fixed | Issue | Symptom | Fix | |---|---|---| | **Implementation coupling** | Mocking internal modules, testing private methods, asserting on internal state | Rewrite to test through public API only | | **Brittle assertions** | Exact error message strings, hardcoded IDs, timestamp comparisons | Use flexible matchers, freeze time, assert structure not exact value | | **Poor test names** | `test_1`, `test_user`, `testGetUser` | Rewrite as sentences: `returns_404_when_user_not_found` | | **Multi-assertion tests** | One test checks 5 things — failure is ambiguous | Split into focused single-assertion tests | | **Duplicated setup** | Same 15-line setup repeated across every test | Extract to fixture/factory/helper | | **False confidence** | `assert True`, `assert result is not None`, empty tests | Add meaningful behavioral assertions | | **Order dependence** | Tests pass together but fail in isolation | Make each test fully self-contained | | **Flaky time/random** | `datetime.now()` or `random()` in assertions | Freeze time, seed random, or use matchers | ## Process ### 1. Discover test files …
Read the whole file at its exact version.
How to install
mdr add omarsaleh506/skills/clean-tests@sha256:6162ba7e2f5052afThe line at the top of this page pins the label git:20261006.008e80e, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
[](https://markdownregistry.com/a/art_7k7pjwgdbbqcj24r)
3 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 2 versions of this file, between Jun 28, 2026 and Oct 6, 2026, about one every 101 days.
| version | committed | commit | size | audit | |
|---|---|---|---|---|---|
| git:20261006.008e80e latest | 2026-10-06 | 008e80e | 2,607 B | A | view · diff |
| git:20260628.cd7722f | 2026-06-28 | cd7722f | 2,595 B | A | view |
Audit of the latest version
- pass: Frontmatter block present
- pass: Frontmatter declares a name
- pass: Frontmatter declares a description
- pass: Size between 200 bytes and 200 KB (2607 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
- pass: No script tag
Source
omarsaleh506/skills · 3 stars · license MIT · pushed 2026-10-07 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_7k7pjwgdbbqcj24r GET https://markdownregistry.com/api/v1/resolve?ref=omarsaleh506/skills/clean-tests GET https://markdownregistry.com/api/v1/blob/6162ba7e2f5052af4a0c9d04c3c618dc6ffb5047b707d0981a62dbdac151b2b0
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.