agentleFS
netanelavrnetanelavr/dotcursor/skills/kit-debug-prod/SKILL.md

kit-debug-prod

Skill6 starsChanged 27 days agoMITView on GitHub

Investigate production bugs using logs, traces, error trackers, and metrics. Use when the user reports errors, user/session/trace IDs, timeframes, or status codes. Requires connected tools and/or a team `wire-observability.md`.

  • Reads credentials

The file

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 7 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before querying, look for team wiring next to this skill or in the consuming repo:

    line 13
  2. Distinctive:

    If present, read it for: product/service log filters, cloud projects, trace attribute names, default error-tracker project, MCP endpoints, …

    line 19
  3. Distinctive:

    If absent: ask which sources are available, or proceed only with tools already connected — and say what you could not check.

    line 21
  4. Distinctive:

    Use what exists; skip the rest.

    line 34
  5. Distinctive:

    Always apply the product/service filter from the team wiring file on every query.

    line 69
  6. Distinctive:

    Prefer MCP OAuth over pasting tokens into commands.

    line 101
  7. Distinctive:

    No employer-specific project IDs or hostnames in this skill file — those belong in the team wiring file.

    line 132
  8. Very specific:

    If proof is incomplete, say unproven (pair with kit-prove when claiming a fix).

    line 133

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Debug Prod

READ-ONLY unless the user explicitly asks to mutate (close issues, change flags, etc.).

Team wiring (wire-observability.md)

Before querying, look for team wiring next to this skill or in the consuming repo:

  • wire-observability.md
  • references/wire-observability.md
  • host-specific notes the user points to

If present, read it for: product/service log filters, cloud projects, trace attribute names, default error-tracker project, MCP endpoints, and credential locations (never paste secrets into chat).

If absent: ask which sources are available, or proceed only with tools already connected — and say what you could not check.

See references/wire-observability.example.md for a template.

Triggers

  • Production bug / error, status codes (403, 500, …)
  • User ID, session ID, trace ID, domain / tenant
  • Timeframe (“last 2 hours”, “yesterday”)
  • Links to logs, traces, or error-tracker issues

Data sources (adapters)

Use what exists; skip the rest. Prefer the team’s primary backend source + one corroborating source.

CategoryTypical toolsUse for
AI / LLM tracesLangfuse CLI, host traces UITool calls, model I/O, AI pipeline errors
Backend logsCloud logging CLI (e.g. gcloud logging), Datadog, …API errors, request logs
Distributed tracesCloud Trace, Jaeger, Tempo, …Latency, span waterfall
Error trackerSentry MCP/UI, similarUnhandled exceptions, stack traces
TicketsJira / Linear MCPExisting bugs, severity
Product analyticsMixpanel / Amplitude MCPScope, feature usage around the incident
MetricsPrometheus/Grafana MCPRates, saturation, alerts

Names in this table are adapter examples. When you recommend one to a user, live-check it (kit-evidence). A row here is not that check.

Investigation flow

Always cross-reference ≥2 sources unless the user names a single tool only.

  1. Extract context — ids, timeframe, error pattern, environment (prod/staging).
  2. Query in parallel — traces/logs + error tracker (and others as relevant).
  3. Cross-reference — same user/tenant + overlapping timestamps.
  4. Quantify — isolated (1 user) vs widespread (many).

Cross-reference sketch

1. Traces → error → user_id, timestamp, message
2. Logs → same id/domain near that timestamp
3. Distributed trace → waterfall / latency (if perf-related)
4. Traces/logs → same error pattern for other users?
5. Error tracker → related frontend/unhandled exceptions

Logs (generic)

Always apply the product/service filter from the team wiring file on every query.

# Example shape (GCP); replace with your provider
gcloud logging read '<PRODUCT_FILTER> AND <YOUR_FILTERS>' \
  --project=<CLOUD_PROJECT> \
  --limit=50 \
  --format=json \
  --freshness=<TIME>

Freshness examples: 4h, 24h, 48h, 7d. Re-auth if the CLI says credentials expired.

Patterns

SignalLikely direction
Auth / forbiddenPermission, session, token
TimeoutsDependency / slow upstream
Quota / limitPlan or rate limit
Client validationBad input / stale client
One user onlyConfig, cache, session, tenancy
Many usersCode bug or infra
One featureRecent deploy / flag

Error trackers

Unhandled exceptions usually land in the tracker; handled errors often appear only as HTTP failures in logs. Org/project slugs come from the team wiring file. On 403: ask for access — do not invent data.

Credentials

  • Load secrets from env / .env files the user already uses — never echo secret values into the transcript.
  • Prefer MCP OAuth over pasting tokens into commands.

Output

## Investigation Summary

**Context:** User / tenant, environment, timeframe

| Source | Finding |
|--------|---------|
| … | … |

**Root cause:** (High/Med/Low confidence) …
**Scope:** N users / isolated
**Immediate relief:** 1. … 2. …
**Suggested fix:** …
**Unproven / not checked:** …

Troubleshooting

IssueTry
No log hitsWiden freshness; verify product filter
Auth expiredRe-login for that CLI/MCP
Huge CLI outputWrite to a file, then grep
Tracker 403Request org/project access

Constraints

  • No employer-specific project IDs or hostnames in this skill file — those belong in the team wiring file.
  • If proof is incomplete, say unproven (pair with kit-prove when claiming a fix).

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.