Skip to main content
skill CX Codex

restore-internals-seams-in-finally-blocks-after-each-test

restore-internals-seams-in-finally-blocks-after-each-test is a Claude Code skill that directs agents to restore original _internals in finally after each test of error paths through DI seams.

MIT ★ 539 updated 2026-10-29

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add ZaxbyHub/opencode-swarm --skill restore-internals-seams-in-finally-blocks-after-each-test -a claude-code
Open on GitHub

What restore-internals-seams-in-finally-blocks-after-each-test does

For tests that exercise error handling through _internals DI seams, the skill requires restoring the original implementations in finally after each test. Otherwise, changed implementations can affect other tests in Bun’s shared runner process and trigger cascading failures.

It also calls for checking seam restoration in afterEach. Reviewers should look for both actions in the diff, and test engineers should add or update tests for the relevant condition. This is guidance for test changes, not a test-running script.

What it helps with

  • restore original _internals implementations after a test
  • prevent DI seam changes from affecting other tests
  • check seam restoration in afterEach
  • add tests for the restoration condition

Example prompts for the agent

  • Check error-handling tests that use _internals and restore the original implementations in finally after each test.
  • Verify that afterEach checks seam restoration.
  • Update the tests to cover _internals restoration after an error.

How to install restore-internals-seams-in-finally-blocks-after-each-test

1Skills CLI (Vercel)

npx skills add ZaxbyHub/opencode-swarm --skill restore-internals-seams-in-finally-blocks-after-each-test -a claude-code

2Manually: put the files in place

~/.claude/skills/restore-internals-seams-in-finally-blocks-after-each-test/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/restore-internals-seams-in-finally-blocks-after-each-test/

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

Questions about restore-internals-seams-in-finally-blocks-after-each-test

How do I install restore-internals-seams-in-finally-blocks-after-each-test in Claude Code?

Run npx skills add ZaxbyHub/opencode-swarm --skill restore-internals-seams-in-finally-blocks-after-each-test -a claude-code. The skill file is at ~/.claude/skills/restore-internals-seams-in-finally-blocks-after-each-test/SKILL.md.

What does restore-internals-seams-in-finally-blocks-after-each-test do?

It instructs agents to restore original _internals DI seam implementations in finally after each error-handling test, then check restoration in afterEach.

Why restore _internals in finally?

The shared Bun test process can carry changed implementations into other tests. Restoring them helps prevent cascading failures.

Source text

SKILL.md · MIT
---
name: restore-internals-seams-in-finally-blocks-after-each-test
description: restore _internals seams in finally blocks after each test
metadata:
  generated_from_knowledge: '["5ef666bf-7c7b-4990-b652-20782bf9c866"]'
  source_knowledge_ids: '["5ef666bf-7c7b-4990-b652-20782bf9c866"]'
  generated_at: "2026-07-14T05:31:50.176Z"
  confidence: "0.60"
  status: active
  version: "1"
  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. -->

# restore _internals seams in finally blocks after each test

## Trigger

- (no explicit trigger metadata; cluster derived from category/tags)

## Required Procedure

- restore _internals seams in finally blocks after each test
- verify seam restoration in afterEach

## Forbidden Shortcuts

- (none recorded)

## Delegation Template

When delegating a task affected by this skill, include:

```
SKILLS: file:.opencode/skills/generated/restore-internals-seams-in-finally-blocks-after-each-test/SKILL.md
```

## Reviewer Checks

- Verify each required action above appears in the diff.

## Test Engineer Checks

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

## Source Knowledge IDs

- 5ef666bf-7c7b-4990-b652-20782bf9c866 — When testing error-handling paths via _internals DI seams, always restore original implementations in a finally block to prevent cross-test pollution that causes cascading failures in Bun's shared test-runner process

© ZaxbyHub · MIT · ZaxbyHub/opencode-swarm

Similar skills

All skills for Testing and QA →

From the same set121

The whole set →
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 check-skill-provenance-stamps-before-archiving-knowledge-entries check-skill-provenance-stamps-before-archiving-knowledge-entries is a Claude Code skill that checks source_refs and UUIDs before archiving knowledge entries, stopping removal if an active skill depends on one. CX Codex +1 ★ 539repo stars consult consult enforces an advisory protocol with strict read-before-cite checks and explicit uncertainty levels. CX Codex +1 ★ 539repo stars run-affected-test-suite-end-to-end-after-multi-file-signature-ch run-affected-test-suite-end-to-end-after-multi-file-signature-ch is a Claude Code skill that runs affected tests and checks every call site after function signatures change across files. CX Codex +1 ★ 539repo stars issue-tracer issue-tracer takes a bug from reproduction to a PR-ready fix: locates the cause, plans the change, and puts it through critic review. CX Codex +1 ★ 539repo stars

Project sponsors

Companies that keep this analytics open