generate-isolation-tests

Generate tenant isolation test scaffolds for shared resource writes.

Updated Apr 13, 2026
One-click install
npx skills add https://github.com/az9713/dark-code-skills --skill generate-isolation-tests
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: generate-isolation-tests
Source: https://github.com/az9713/dark-code-skills/tree/main/skills/generate-isolation-tests
Command: npx skills add https://github.com/az9713/dark-code-skills --skill generate-isolation-tests

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Generating isolation tests for shared resource writes across tenants helps ensure data boundaries are respected and reduces the risk of cross-tenant data leakage by providing ready-to-adapt test scaffolds.

Core Features & Use Cases

  • Generates a three-test scaffold for same-tenant, cross-tenant, and key-collision scenarios.
  • Writes to tests/isolation/<module-name>-isolation.test.<ext> and optionally updates BEHAVIORAL_CONTRACTS.md with an Isolation guarantee.
  • Supports targeting a module or a specific file:line for focused isolation checks in a multi-resource codebase.

Quick Start

Invoke /generate-isolation-tests with the path to your module to generate the isolation test scaffold.

Frequently Asked Questions about generate-isolation-tests

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate cross-tenant isolation tests for shared resource writes?

Cross-tenant isolation tests are generated by creating a three-test scaffold for same-tenant, cross-tenant, and key-collision scenarios, writing the tests to tests/isolation/<module-name>-isolation.test.<ext>.

What is a tenant isolation test scaffold and when do I need one?

A tenant isolation test scaffold verifies cross-tenant data isolation boundaries for shared resource writes. You need one when auditing shared resources or when a comprehension gate indicates isolation concerns in your multi-tenant codebase.

How do I update BEHAVIORAL_CONTRACTS.md with an Isolation guarantee?

Updating BEHAVIORAL_CONTRACTS.md with an Isolation guarantee section happens optionally during isolation test generation, appending the compliance notation alongside the created test files to document the verified boundaries.

Can I generate isolation tests for a specific file and line number instead of a whole module?

Yes, isolation tests can target either a full module or a specific file:line location, allowing you to perform focused isolation checks for shared resource writes within a larger multi-resource codebase.

What limitations exist when testing cross-tenant data leakage with generated scaffolds?

The generated scaffolds are ready-to-adapt templates for cross-tenant data leakage checks, meaning developers must manually modify the generated code to match their specific shared resource structures and tenant logic before execution.

What is the best way to verify compliance for shared resource writes across multiple tenants?

The best way to verify compliance is generating a dedicated isolation test scaffold that validates same-tenant access, cross-tenant denial, and key-collision scenarios, while simultaneously updating behavioral contracts.