Skip to main content
skill CX Codex

grep-for-mock-module… — Claude Code and Codex skill for test mocks

grep-for-mock-module-across-the-entire-test-file-and-confirm-eve is a Claude Code skill that checks every mock.module call in a test file for real-export spreads during a Vitest-to-Bun migration.

MIT ★ 539 updated 2026-10-29

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add ZaxbyHub/opencode-swarm --skill grep-for-mock-module-across-the-entire-test-file-and-confirm-eve -a claude-code
Open on GitHub

What grep-for-mock-module-across-the-entire-test-file-and-confirm-eve does

This one covers a gap in a Vitest-to-Bun move: a test file gets marked converted while some mock.module calls still spread nothing. The procedure is a full sweep — find every occurrence in the file, check that real module exports are spread into each mock, and only then flip the status. One missed call and the file is not done.

The skill ships trigger phrases, the required procedure, a delegation snippet that points an agent at its SKILL.md, and two checklists: one for the reviewer, one for whoever writes the tests. It comes from the opencode-swarm generator, version 2.

The reviewer check greps with --include='*.test.ts'. Tests named *.spec.ts sit outside that filter, so widen the pattern before you trust a clean run.

What it helps with

  • sweep a test file for every mock.module call before conversion
  • confirm each mock spreads real module exports
  • stop a file from being marked converted too early
  • hand a subagent the skill path in the delegation prompt
  • cover the trigger condition with a test

Example prompts for the agent

  • Sweep checkout.test.ts for mock.module calls and tell me which ones don't spread the real exports.
  • We're moving these tests from Vitest to Bun — list the files that still need converting.
  • Before you mark the file converted, run grep --include='*.test.ts' 'mock\.module' and check each call.

How to install grep-for-mock-module-across-the-entire-test-file-and-confirm-eve

1Skills CLI (Vercel)

npx skills add ZaxbyHub/opencode-swarm --skill grep-for-mock-module-across-the-entire-test-file-and-confirm-eve -a claude-code

2Manually: put the files in place

~/.claude/skills/grep-for-mock-module-across-the-entire-test-file-and-confirm-eve/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/grep-for-mock-module-across-the-entire-test-file-and-confirm-eve/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about grep-for-mock-module-across-the-entire-test-file-and-confirm-eve

How do I install the skill in Claude Code?

Run npx skills add ZaxbyHub/opencode-swarm --skill grep-for-mock-module-across-the-entire-test-file-and-confirm-eve -a claude-code. The skill lands at ~/.claude/skills/grep-for-mock-module-across-the-entire-test-file-and-confirm-eve/SKILL.md.

What does this skill do?

It makes the agent search a whole test file for mock.module and verify that every call spreads the real exports before anyone marks that file converted.

Does it cover .spec.ts files?

The reviewer check greps only *.test.ts, so tests with another suffix slip past that pattern.

Source text

SKILL.md · MIT
---
name: grep-for-mock-module-across-the-entire-test-file-and-confirm-eve
description: "grep for 'mock.module' across the entire test file and confirm every occurrence uses spread-real-exports before marking the file as converted"
metadata:
  triggers: '["mock.module conversion","vitest to bun migration"]'
  generated_from_knowledge: '[]'
  source_knowledge_ids: '[]'
  generated_at: "2026-07-02T02:35:49.878Z"
  confidence: "0.60"
  status: active
  version: "2"
  skill_origin: generated
---

<!-- generated by opencode-swarm skill-generator. Do not edit by hand; edits will be preserved on regeneration only with controlled update mode. -->

# grep for 'mock.module' across the entire test file and confirm every occurrence uses spread-real-exports before marking the file as converted

## Trigger

- mock.module conversion
- vitest to bun migration

## Required Procedure

- grep for 'mock.module' across the entire test file and confirm every occurrence uses spread-real-exports before marking the file as converted

## Forbidden Shortcuts

- (none recorded)

## Delegation Template

When delegating a task affected by this skill, include:

```
SKILLS: file:.opencode/skills/generated/grep-for-mock-module-across-the-entire-test-file-and-confirm-eve/SKILL.md
```

## Reviewer Checks

- grep --include='*.test.ts' 'mock\.module' and verify each call spreads real exports

## Test Engineer Checks

- Add or update tests covering the trigger condition and the forbidden shortcut.

© ZaxbyHub · MIT · ZaxbyHub/opencode-swarm

Similar skills

All skills for Testing and QA →

From the same set121

The whole set →
pr-review-fix The pr-review-fix skill checks PR review findings against the current branch and fixes confirmed issues. Use it to work through reviewer comments, bot feedback, or a CI review summary. CX Codex +1 ★ 539repo stars verify-skill-mirror-pairs-exist-in-both-opencode-skills-and-clau verify-skill-mirror-pairs-exist-in-both-opencode-skills-and-clau is a Claude Code skill that checks generated skill trees for missing mirrors and folder-slug mismatches. CX Codex +1 ★ 539repo stars isolate-the-specific-failure-mode-before-proposing-a-fix isolate-the-specific-failure-mode-before-proposing-a-fix is a Claude Code skill that identifies the cause of each test failure before fixes, keeping unrelated failures in separate patches. CX Codex +1 ★ 539repo stars run-test-suite-after-registration-changes The run-test-suite-after-registration-changes skill calls for running the test suite after registration edits and checking that each registration point stays in sync. Use it when changing skill files and their manifests. CX Codex +1 ★ 539repo stars codebase-review-swarm codebase-review-swarm runs quote-grounded code reviews and security or QA audits without editing project files. Built for deep inspections across entire codebases or large subsystems. CX Codex +1 ★ 539repo stars run-relevant-tests-after-adding-error-handling-wrappers run-relevant-tests-after-adding-error-handling-wrappers is a Claude Code skill that prompts an agent to run relevant tests after adding error handling and check the success path's original return type and value. CX Codex +1 ★ 539repo stars issue-tracer issue-tracer walks a bug from reproduction to a PR-ready fix: locate the cause, plan the patch, get it reviewed. CX Codex +1 ★ 539repo stars swarm-ci-monitor swarm-ci-monitor monitors CI runs on approved pull requests, repairs broken checks within five cycles, and merges the branch once tests pass. CX Codex +1 ★ 539repo stars

Project sponsors

Companies that keep this analytics open