Inject Ambient Inputs

Use when writing or refactoring logic that reads ambient state — the clock (now/today), randomness, environment variables, a DB/HTTP handle, the filesystem, the current user. Ambient reads are the main reason otherwise pure logic becomes un-unit-testable; pass them in as parameters and split the pure decision from the I/O so tests need no mocking machinery. Triggers on "Date.now", "new Date()", "hard to test", "mock the clock", "fake timers", "random in tests", "reads env", "make this testable", "pure function".

iamakbarsha1 Updated 4 repo stars

File contents

iamakbarsha1/whetstone commit 0625cdf2d6

Frequently asked questions

npx get-skill add iamakbarsha1/inject-ambient-inputs