Index of every page on this site: llms.txt
All skills
jeremylongshore avatar

/langchain-debug-bundle

@0d57af8
Run it yourself

Produce a reproducible, sanitized diagnostic bundle for a LangChain / LangGraph incident — environment snapshot, version manifest, filtered astream_events(v2) transcript, propagating callback stack, LangSmith trace URL — so a debug colleague can reproduce the failure without a live terminal. Use when triaging a production incident, filing a Discord or GitHub bug report, asking for help on the LangChain forum, or archiving a post-mortem artifact. Trigger with "langchain debug bundle", "langgraph debug dump", "langchain diagnostic export", "langsmith trace export", "astream_events dump", "langchain incident bundle".

Use this Skill: https://skilld.dev/gh/jeremylongshore/tons-of-skills-marketplace/langchain-debug-bundle

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesone-pager.md

≈702 tokens on demand. Your agent reads this file only when SKILL.md points to it.

langchain-debug-bundle — One-Pager

Produce a reproducible, sanitized diagnostic bundle for a LangChain / LangGraph incident — env manifest, filtered astream_events(v2) transcript, callback stack, LangSmith trace URL — so a debug colleague can reproduce the failure without a live terminal.

The Problem

An on-call engineer pages you: the agent loops, tools return nothing, the user sees "I could not find the answer." Without a bundle, the next engineer has no reproducible snapshot — no graph state, no event stream, no version manifest, no trace URL. Custom callbacks attached at definition time never fire on subgraphs (P28). Raw astream_events(v2) dumps flood thousands of events per invocation (P47) and crash the viewer. Ad-hoc prints leak API keys into Slack.

The Solution

This skill produces a tar.gz bundle with an env manifest (manifest.yaml: Python, OS, pip show versions, model IDs, env-var names), a filtered astream_events(version="v2") JSONL transcript (drop lifecycle noise, keep on_chat_model_stream / on_tool_* / on_chain_* errors), a callback stack captured via config["callbacks"] so it propagates into subgraphs (P28), the LangSmith trace URL pulled from the active RunTree, and a post-write sanitization pass that redacts API keys and PII. Typical bundle size 1-10 MB; filtered event count 50-200 per invocation.

Who / What / When

Aspect Details
Who On-call engineers triaging a LangChain/LangGraph production incident, authors preparing a Discord bug report, or anyone archiving a post-mortem artifact
What bundle-<timestamp>.tar.gz containing manifest.yaml, events.jsonl, callbacks.txt, langsmith.url, MANIFEST.yaml index; a triage decision tree; 4 references (env manifest, event capture, callback propagation, sanitization)
When During or immediately after an incident, before closing the terminal session — the active process state and trace URL are load-bearing

Key Features

  1. Filtered astream_events(v2) JSONL transcript — Server-side filter drops lifecycle noise (on_chain_start/on_chain_end) and keeps on_chat_model_stream + on_tool_* + any *_error event; typical invocation drops from 2000+ events to 50-200 (P47, P67)
  2. Propagating callback stack via config["callbacks"] — DebugCallbackHandler passed at invoke time (not bound via with_config) so it fires inside subgraphs and create_react_agent inner loops (P28)
  3. Pre-upload sanitization pass — Regex-based redaction of sk-*, sk-ant-*, AIza*, Bearer tokens, cookies, and configurable PII patterns before the tar.gz is written; plus env-var names only in the manifest (never values)

Quick Start

See SKILL.md for full instructions.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts2mo3 checks · Risk SAFE
  • Gen Agent Trust Hub2mo

    The skill is a diagnostic utility for LangChain and LangGraph applications designed to bundle environment metadata and event logs. It includes robust sanitization logic to redact API keys and PII. The low risk rating reflects the inherent security surface created by capturing and processing runtime data such as tool inputs and model messages.

  • Socket2mo

    No alerts

  • Snyk2mo

    Risk: LOW · No issues

Signed by skilld at 0d57af8. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 2 months ago
What it can do
Reads files Edits files Runs commands
version
2.7.0
author
Jeremy Longshore <jeremy@intentsolutions.io>
compatibility
Designed for Claude Code
All 5 allowed tools
ReadWriteEditBash(python:*)Bash(pip:*)
Other metadata
tags
[
  "saas",
  "langchain",
  "langgraph",
  "python",
  "langchain-1.0",
  "debugging",
  "observability",
  "incident-response"
]

README badge

README badge for jeremylongshore/tons-of-skills-marketplace/langchain-debug-bundle