← Back to Bug fix

Skill · Version 1.0.0

Discover hidden environment state

Finds the missing preconditions behind failures that differ between machines, accounts, builds or persisted states.

environment-state-discovery

Workflow agents using this skill

See how it helps

When is it useful?

Use when a bug cannot be reproduced from a clean start.

What does it help you do?

  • Compares code revisions, dependencies and development versus production builds.
  • Records configuration, locale, timezone, roles and ownership without exposing secrets.
  • Examines upgraded storage and warm-state differences before resetting evidence.

Try asking this

Investigate why one user sees wrong totals after an upgrade, comparing locale, cached state, account permissions and running release. Compare the affected profile with a fresh one without deleting the original. Identify the smallest state difference that reproduces the incorrect total.

Detailed documentation

Read the skill’s original instructions, examples and checks in their authored language.

Details…Show less

Environment & State Discovery

When to Use

Use when a bug cannot be reproduced on a default clean start, or when behavior differs across machines, browsers, OS platforms, user accounts, or deployment environments.

The Five Hidden State Dimensions

Most "intermittent" or "cannot reproduce" bugs are actually deterministic bugs with an unrecorded precondition. Systematically audit five dimensions:

1. Code Revision, Dependencies & Build Mode
  • Exact git SHA / release tag, dirty working tree status, and lockfile state (package-lock.json, pnpm-lock.yaml, composer.lock, uv.lock, Cargo.lock).
  • Development build vs. production build: minification, tree-shaking, SSR hydration, React StrictMode double-invocation, CSP headers, and production environment optimizations frequently trigger bugs absent in dev mode.
2. Configuration, Feature Flags & Locale/Timezone
  • Environment variables (.env), tenant-specific settings, active feature flags, and rate-limit or quota tiers.
  • Locale, Timezone & Clock Boundaries: Test non-UTC timezones (America/New_York, Europe/Budapest, Asia/Tokyo), Daylight Saving Time transitions, month/year boundaries (2026-01-01T00:00:00), 24h vs. 12h formatting, and decimal separators (, vs. . in hu/de vs. en).
3. Identity, Role & Permission Boundaries
  • User role (admin, member, viewer, unauthenticated guest), multi-tenant organization membership, resource ownership, and expired or partially refreshed auth tokens.
4. Cold Start vs. Warm / Dirty Persisted State

Always test both a Clean State Start and a Dirty / Upgraded State Start:

  • Browser / Client State: localStorage, sessionStorage, IndexedDB schema versions, Service Worker caches, stale cookies, and back/forward navigation history. A schema change in localStorage often crashes returning users while working fine in a fresh incognito window!
  • Database & Server State: Legacy rows with NULL in newly added columns, soft-deleted sibling records, empty (0 items) vs. paginated (> 100 items) collections, and stale Redis/in-memory cache entries.
5. Platform & Runtime Matrix
  • OS (macOS, Windows path separators \, Linux case-sensitive filesystems), CPU architecture (arm64 vs. x64), Node/PHP/Python/Rust runtime versions, and browser engine (Chromium, WebKit/Safari, Gecko/Firefox).
  • Never wipe a reporter's or test environment's persisted state before capturing a snapshot of the state that triggers the bug.

Included files 1

  • SKILL.md