Treat this as an environment-specific failure until evidence shows otherwise; do not add a blind fallback first. 1. Observe: capture the production stack trace, source-map position, request/user/context identifiers, input payload, deployment version, and the exact expression whose value is undefined. Compare production logs with the corresponding successful local case, including API responses, feature flags, environment variables, build mode, data shape, and dependency versions. Check recent ...
Scanned 9/5/2026
Install to Claude Code
npx -y skills add HoangNguyen0403/agent-skills-standard --skill common-debugging --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Common Debugging?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/hoangnguyen0403-common-debugging-22297861)More formats (shields.io, HTML) on the badges page.
Treat this as an environment-specific failure until evidence shows otherwise; do not add a blind fallback first.
1. Observe: capture the production stack trace, source-map position, request/user/context identifiers, input payload, deployment version, and the exact expression whose value is undefined. Compare production logs with the corresponding successful local case, including API responses, feature flags, environment variables, build mode, data shape, and dependency versions. Check recent commits and whether production is running the expected artifact.
2. Reproduce: use a sanitized production payload or staging data/configuration to reproduce the crash. If it cannot be reproduced locally, run the same built artifact and configuration in a production-like environment. Add temporary structured error telemetry at the boundary that supplies the value, rather than scattered debug prints; remove it after diagnosis.
3. Hypothesize one cause in plain language, for example: “A production API response omits `items`, while local fixtures always provide an array.” Other possibilities include a stale bundle/source map, a production-only feature flag, or a race where data is read before loading completes.
4. Experiment: change one variable at a time. Compare the raw response and runtime type immediately before the failing read; then replay with `items: []`, with the production flag, or with the production build. The hypothesis is supported only if the controlled change makes the failure appear or disappear and the stack trace matches.
5. Fix: once proven, correct the producer contract or loading/state sequencing. Validate input at the boundary and use an intentional empty-state behavior only if “missing” is semantically equivalent to empty. Do not silently swallow malformed data.
6. Verify: rerun the production-like reproduction, the original failing production request, and regression tests for valid, missing, null, and malformed values. Confirm source maps, monitoring, and the deployed artifact identify the fixed code, then watch error rates after rollout.
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!