waveenv

Document component-used WaveEnv fields with a WaveEnvSubset type.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/marrabld/waveterm --skill waveenv-marrabld
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: waveenv
Source: https://github.com/marrabld/waveterm/tree/main/.kilocode/skills/waveenv
Command: npx skills add https://github.com/marrabld/waveterm --skill waveenv-marrabld

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

WaveEnv narrowing documents the exact environmental parts a component tree uses, creating a clear contract for callers and tests and enabling mock environments for preview-server workflows.

Core Features & Use Cases

  • Precise dependency declarations that capture only the fields, methods, and keys actually used.
  • Flexible placement: inline or next to the component to support both small and shared environments.
  • Enables deterministic previews and isolated testing by swapping real envs for mocks.

Quick Start

Create a WaveEnv narrowing file next to the component and import the narrowed type to enable deterministic previews and tests.

Frequently Asked Questions about waveenv

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

FAQPage Schema
How do I mock the WaveEnv environment for component testing in the preview server?

You can mock the WaveEnv by creating a WaveEnvSubset type that narrows the environment to only used fields, enabling deterministic previews and isolated testing by swapping real environments for mocks.

What is WaveEnv narrowing and when do I need it for TypeScript components?

WaveEnv narrowing documents the exact environmental parts a component tree uses, creating a stable, mockable contract. You need it to ensure repeatable tests and predictable mocks in Wave Terminal preview workflows.

How do I create precise environment dependencies for Wave Terminal preview components?

Create a WaveEnvSubset type next to your component that declares only the fields, methods, and keys actually used, forming a stable contract for callers and tests.

Can I define a narrowed WaveEnv type inline with my component?

Yes, the WaveEnvSubset type can be placed inline or next to the component. This flexible placement supports both small shared environments and larger component-specific dependency declarations.

Why should I narrow the WaveEnv instead of passing the full environment to my component tests?

Narrowing the WaveEnv captures only the fields your component tree actually uses, creating a clear contract for callers and tests. This enables deterministic previews and isolated testing by swapping real envs for mocks.