Skip to main content
skill CX Codex

spread-real-module-exports-as-base-of-every-mock-module-return-o

spread-real-module-exports-as-base-of-every-mock-module-return-o is a Claude Code skill that sets a pattern for objects returned by mock.module. It activates around that pattern and Node’s built-in mocking.

MIT ★ 539 updated 2026-10-29

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add ZaxbyHub/opencode-swarm --skill spread-real-module-exports-as-base-of-every-mock-module-return-o -a claude-code
Open on GitHub

What spread-real-module-exports-as-base-of-every-mock-module-return-o does

The skill requires each object returned by mock.module to start with the real module’s exports. This applies to module mocks in Node.js tests.

Its review check looks for mock.module calls that omit the real-module spread. When handing related work to another agent, the skill provides the path .opencode/skills/generated/spread-real-module-exports-as-base-of-every-mock-module-return-o/SKILL.md.

What it helps with

  • include real exports in a mock.module return object
  • find mock.module calls missing the real-module spread
  • pass the mocking rule to another agent working with node: modules

Example prompts for the agent

  • Apply the real-export spread pattern to the mock.module calls in these tests.
  • Find mock.module calls whose return objects omit the real module’s exports.
  • Pass this skill to the agent editing built-in node: mocks.

How to install spread-real-module-exports-as-base-of-every-mock-module-return-o

1Skills CLI (Vercel)

npx skills add ZaxbyHub/opencode-swarm --skill spread-real-module-exports-as-base-of-every-mock-module-return-o -a claude-code

2Manually: put the files in place

~/.claude/skills/spread-real-module-exports-as-base-of-every-mock-module-return-o/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/spread-real-module-exports-as-base-of-every-mock-module-return-o/

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

Questions about spread-real-module-exports-as-base-of-every-mock-module-return-o

How do I install spread-real-module-exports-as-base-of-every-mock-module-return-o in Claude Code?

Run npx skills add ZaxbyHub/opencode-swarm --skill spread-real-module-exports-as-base-of-every-mock-module-return-o -a claude-code, then use ~/.claude/skills/spread-real-module-exports-as-base-of-every-mock-module-return-o/SKILL.md.

What does spread-real-module-exports-as-base-of-every-mock-module-return-o do?

It requires each mock.module return object to include the real module’s exports. It also calls for checking mock calls that lack that spread.

What belongs in a mock.module return object?

The real module’s exports form the base of the object, with the required mocks added to it.

Source text

SKILL.md · MIT
---
name: spread-real-module-exports-as-base-of-every-mock-module-return-o
description: spread real module exports as base of every mock.module return object
metadata:
  triggers: '["mock.module spread pattern","node: built-in mock"]'
  generated_from_knowledge: '[]'
  source_knowledge_ids: '[]'
  generated_at: "2026-07-02T02:35:49.913Z"
  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. -->

# spread real module exports as base of every mock.module return object

## Trigger

- mock.module spread pattern
- node: built-in mock

## Required Procedure

- spread real module exports as base of every mock.module return object

## Forbidden Shortcuts

- (none recorded)

## Delegation Template

When delegating a task affected by this skill, include:

```
SKILLS: file:.opencode/skills/generated/spread-real-module-exports-as-base-of-every-mock-module-return-o/SKILL.md
```

## Reviewer Checks

- grep for mock.module patterns that lack ...realModule spread

## 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 →
swarm-pr-review swarm-pr-review is a Claude Code skill that connects the canonical .opencode workflow to PR review sessions. CX Codex +1 ★ 539repo stars running-tests running-tests — a skill to safely run tests in opencode-swarm from Claude Code, Codex, or OpenCode. Runs focused tests, checks file isolation, validates changes as in CI, and diagnoses errors without stalling the session. CX Codex +1 ★ 539repo stars widen-return-type widen-return-type — a TypeScript skill for widening a function's return type with overloads, so callers keep their narrow types. CX Codex +1 ★ 539repo stars swarm-pr-review The swarm-pr-review skill for Claude Code and Codex is a thin adapter for swarm pull request reviews that delegates execution to the canonical workflow in .opencode. CX Codex +1 ★ 539repo stars gate-attribution gate-attribution sets the rule that keeps reviewer and test_engineer checks attributable: one taskId per dispatch, with lanes run in parallel to save overhead. CX Codex +1 ★ 539repo stars swarm-implement Adapts the canonical opencode-swarm implementation workflow for multi-file features, refactoring, and structured validation. CX Codex +1 ★ 539repo stars opt-in-tool-registration The opt-in-tool-registration skill sets a pattern for registering opt-in tools through a separate map and conditional merging in agents/index.ts. Use it when adding a feature controlled by a flag. CX Codex +1 ★ 539repo stars ensure-all-tests-pass-after-code-changes ensure-all-tests-pass-after-code-changes — a skill that keeps the agent honest about tests: run them after an edit, and don't hand a failing branch to review. Test updates ship with the code. CX Codex +1 ★ 539repo stars

Project sponsors

Companies that keep this analytics open