Skip to content
Back to skills

Debug Production Only Bug

ASecurity

Debugs a bug that happens only in production by diffing environment, config, data, traffic, versions and timing, then plans safe instrumentation to confirm the cause. Use for works-on-my-machine bugs.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 26, 2026
ai-agentsgodebuggingapi

Works with

  • api

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned November 26, 2026

npx -y skills add hermes-hq/hodios-dist --skill debug-production-only-bug --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Debug Production Only Bug?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Debug Production Only Bug
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/hermes-hq-debug-production-only-bug-hodios-dist/badge)](https://www.skillsdirectory.com/skills/hermes-hq-debug-production-only-bug-hodios-dist)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: debug-production-only-bug
description: Debugs a bug that happens only in production by diffing environment, config, data, traffic, versions and timing, then plans safe instrumentation to confirm the cause. Use for works-on-my-machine bugs.
license: CC0-1.0
metadata:
  version: 1.0.0
  kind: prompt
  category: debugging
  source: https://hermes-ide.com/prompts/debug-production-only-bug
  catalog: 2026.1014.1
---

# Debug a production-only bug

## Inputs

- [SYMPTOMS] (required): What goes wrong in production - error messages, which users or requests, how often, since when, and what does not reproduce locally or in staging.
- [ENVIRONMENT_DIFFERENCES] (optional): Known differences between production and where it works - versions, configuration, infrastructure, data size, traffic, feature flags, regions, time zones.
- [LOGS] (optional): Relevant production log lines, traces, metrics or error-tracker entries, with personal data removed.

Take each value from the invocation or the user’s message. If a required value is missing, ask for it once.

<context>
When a bug appears only in production, the code is usually the same and something around it is not: a configuration value, a dependency version resolved differently, the data (size, shape, encoding, old records written by an earlier version), the traffic (concurrency, retries, request size), the infrastructure (proxies, load balancers, timeouts, memory limits, multiple instances), or time (time zones, clock skew, scheduled jobs, certificates or tokens expiring). Guessing and redeploying wastes days. The faster path is to list what differs, rank which difference can explain every symptom, and confirm with instrumentation that is safe to run against real users.
</context>

<task>
Debug this production-only problem:
[SYMPTOMS]
Only if [ENVIRONMENT_DIFFERENCES] was provided: 

Known differences: [ENVIRONMENT_DIFFERENCES]
Only if [LOGS] was provided: 

<logs>
[LOGS]
</logs>

1. Extract the facts from the symptoms and logs: what fails, for whom (all users, some tenants, some regions, some instances), how often, since when, and what changed around that time (deploys, config changes, traffic growth, dependency updates, data migrations). Note patterns: specific instances, times of day, request sizes, user cohorts.
2. Diff production against the environment where it works, across these dimensions, and mark each as known-same, known-different or unknown:
   - Build and versions: commit, build flags, resolved dependency versions (lockfile honoured?), runtime and OS image, CPU architecture.
   - Configuration: environment variables, secrets, feature flags, defaults that differ when a variable is missing.
   - Data: volume, records written by older versions, nulls and unusual encodings, collation and time-zone settings, cache contents.
   - Traffic: concurrency, request sizes, retries, long-lived connections, bots.
   - Infrastructure: multiple instances (local state, sticky sessions), proxies and load balancers (header size, body size, idle timeouts), network policies, DNS, memory and CPU limits, file-system permissions and read-only volumes.
   - Time: time zones, clock skew between hosts, daylight saving, scheduled jobs, expiring certificates or tokens.
   - Dependencies: third-party API behaviour in production versus sandbox, rate limits, regional endpoints.
3. Form at most four hypotheses. For each, say which symptoms it explains and which it does not; drop hypotheses that contradict the evidence.
4. For each remaining hypothesis, design the cheapest confirming check, in order of safety: read-only queries and comparisons first (compare configs, query the data, read existing logs and metrics), then reproduction with production-like conditions in a non-production environment (production data snapshot with personal data masked, same versions, load), and only then targeted production instrumentation: extra log fields or spans behind a flag, sampled, for a limited time, on a subset of traffic, with no personal data or secrets logged and a plan to remove it.
5. Give the likely fix for the leading hypothesis and how to verify it in production after release (which metric or log should change).

If the symptoms are too vague to form any hypothesis, ask the three questions whose answers would narrow it most, and stop.
</task>

<constraints>
- Do not suggest attaching a debugger to production, enabling verbose logging globally, or experimenting on production data. Production instrumentation must be scoped, sampled, time-boxed and free of personal data.
- Each hypothesis must account for why it does not happen in the working environment.
- Never ask for secrets or credentials; ask for whether a value is set or how it differs.
- Read the relevant code before making a claim about it. Do not guess what a file, function or config contains.
- If the information you need is not available, say what is missing and how to get it instead of inventing it.
- Separate what you verified from what you inferred. Mark inferences as such.
- When you do not know, say "I don't know" once and state what would settle it.
</constraints>

<output_format>
## What the evidence says
Bullets of facts, each with its source (symptom report, log line, metric).

## Differences that matter
Table: dimension | production | working environment | known-same, known-different or unknown.

## Hypotheses
Numbered, most likely first. Each: the cause, the symptoms it explains, the ones it does not, and why the working environment is unaffected.

## Confirm safely
Per hypothesis, the checks in order with exactly what to run or look at and what result confirms or rules it out.

## Likely fix
The fix for the leading hypothesis and the production signal that proves it worked.

## Missing information
What to collect next, most useful first.
</output_format>

Files in this skill

  • SKILL.md5.7 KB
  • agents/openai.yaml320 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.