/logbrew:debug-productionfrom logbrew
Investigates production errors using LogBrew telemetry, identifies root cause and affected release, proposes minimal fix, and verifies after deploy.
Ships in logbrew. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Follow the 7 steps in order. Do not skip a step. Do not change any file before the person says yes in step 6.
Some steps create, install, record, or change something. Those steps say Ask first. Before you do such a step, show the person the exact command or change, with every value filled in. Then wait for their yes. The request that started the task is not a yes. Without a yes, skip the step and say so in the report.
Use the first source that works:
https://logbrew.co/mcp,
such as issues_list, are connected. Use the operations in
references/mcp.md.logbrew status --json reports authenticated access, or
LOGBREW_TOKEN holds a project read key. Use the commands in
references/cli.md. Add --json to every command.If the CLI reports no authentication, ask a person to run logbrew login.
Do not start a login, create keys, or change project settings during an
investigation.
List unresolved issues for the environment and time of the symptom. Add the release or service when you know them. Select the issue whose message, route, service, and time match the symptom. If more than one matches, select the one with the most events in the incident window and say why.
logbrew read issues --project "$PROJECT_ID" --environment production --status unresolved --since 24h --jsonissues.list.v5 with project_id, environment, status, sinceRead the issue investigation for the recommended occurrence. Record:
subject.first_seen_at and the release of the first occurrence;occurrence_selection.reason, cause.status, and fix.status.If the issue first appeared in the newest release, treat it as a regression in that release. If it is older, look for a change in traffic, data, or a dependency. Read the first occurrence when the recommended one is from a later release. Then open the source file at that frame, at the commit that the release names.
logbrew investigate issue "$ISSUE_ID" --occurrence recommended --jsonlogbrew investigate issue "$ISSUE_ID" --occurrence first --jsonissues.investigate.v15 with issue_id and selectionIf correlations.trace.status is available, read that trace and its
logs. If it is not_linked, not_found, or unavailable, read the logs of
the same service from 5 minutes before the first event to 1 minute after it.
Do not guess a trace from timestamps or messages.
logbrew read trace "$TRACE_ID" --project "$PROJECT_ID" --jsonlogbrew read logs --trace "$TRACE_ID" --project "$PROJECT_ID" --since 24h --jsonlogbrew read logs --project "$PROJECT_ID" --service "$SERVICE" --environment production --since "$WINDOW_START" --until "$WINDOW_END" --jsontraces.investigate.v3 with trace_id, then logs.list.v1 with
trace_id or with service_name, since, and untilFind the last successful step before the failure and the first warning or error. Compare the request inputs (route, method, status) with a request that succeeded.
Read the impact fields of the investigation: the occurrence count, the
trend, impact.user_impact.status, and the release, environment, and
service distributions. Report counts and scope. Do not copy user IDs,
emails, or other personal data into the report.
List each missing, unavailable, redacted, or truncated item and how it limits your conclusion. Stop and report without a code change if:
fix.status is unknown and the failing frame is not in your code;Then give the person the report below, with the fix that you propose. If the person asked only what broke, stop here.
Ask first. Show the test and the code change that you propose, file by file. A question about what broke is not a yes to change code.
Write a test that fails the same way. Build its input from the observed shape of the failing request, never from real user data. Then make the smallest change at the cause. Do not hide the error with a broad catch, a retry, or a lower log level. Commit, push, or open a pull request only when the person asks. Add the investigation record (see the report below) to the pull request.
Before the fix deploys, record the failing occurrence ID. After the new release gets traffic, compare that occurrence with the new deployment. The deployment must be recorded first; the verify-release skill shows how.
logbrew investigate issue "$ISSUE_ID" verify --baseline-occurrence "$OCCURRENCE_ID" --candidate-deployment "$DEPLOYMENT_ID" --jsonlogbrew watch issues --json to follow new issue events liveissues.list.v5 with release set to the new release, and
summary.volume.v1 for counts before and after the deployRead the verify status:
| Status | Meaning |
|---|---|
recurrence_observed | The fix did not stop the failure. Go back to step 2. |
no_recurrence_observed | Evidence for the fix, not proof. Report it with its limits. |
insufficient_traffic | Not enough traffic yet. Check again later. |
unavailable | LogBrew could not read the evidence. Check again later. |
Change the issue status only when the person asks. Ask first and show
the command, for example logbrew resolve "$ISSUE_ID" --json. Archiving
an issue is not a fix.
Give the person this record:
Issue: <issue_id> in <project>, <environment>, <service>, release <release>
Symptom: <what users see>
Observed: <exception, top frame, first seen, trace and log facts>
Affected: <event count, trend, user impact status>
Inferred cause: <conclusion> (unknown: <what is missing>)
Proposed fix: <change and test>
Verify: <the verify status after deploy, or when to check>
Commands run: <list>
For a full example, read references/worked-example.md.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
4 skills in this plugin
/instrument-appAdds LogBrew error tracking, logs, and tracing to an app, picks the right SDK for the framework, and reads the first event back from LogBrew to prove that delivery works. Use when someone asks to set up LogBrew or install its SDK, to instrument an app with LogBrew, to add error tracking, crash reporting, logging, tracing, APM, or observability with LogBrew, or to check that events arrive. Also gives structured logging rules for the logs that the app sends./product-analyticsAnswers questions about how people use a product from LogBrew product analytics, with the numbers and example sessions behind each answer. Shows where users come from, where they drop off in a conversion funnel, which page they open next, and whether they come back. Use when someone asks about signups, conversion, funnels, drop-off, user journeys, retention, churn, returning users, traffic sources, UTM tags, referrers, or what users do on a page, for an app that sends events to LogBrew, or asks to read LogBrew analytics. Not for analytics in other tools. Works through the logbrew CLI or MCP server./verify-releaseChecks if a deploy is safe. Records the deployment, compares the new issues, error logs, and trace error rate of the new release with the previous one in LogBrew, and decides Go to keep the release, Rollback to roll back, or Wait for more traffic. Use when someone asks if a deploy is safe, whether a production release broke anything, to check a canary release or rollout, to compare 2 versions of a deployed service, or whether a rollback is needed. Works with the LogBrew MCP server or the logbrew CLI, or from exported error and request counts. To find the cause of one error, use debug-production instead.npx claudepluginhub logbrewco/observability --plugin logbrew