LangSmith Trace Debugging
ComposioHQ/awesome-claude-skills
Debugs LangChain and LangGraph agents by pulling recent execution traces with the langsmith-fetch CLI and reporting errors, tool calls, timings and token use.
Produce a reproducible, sanitized diagnostic bundle for a LangChain / LangGraph incident — environment snapshot, version manifest, filtered astreamevents(v2) transcript, propagating callback stack…
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill langchain-debug-bundle -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install jeremylongshore/tons-of-skills-marketplace langchain-debug-bundle --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/.curated/langchain-debug-bundle .claude/skills/langchain-debug-bundle && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "langchain-debug-bundle" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/langchain-debug-bundle into .claude/skills/langchain-debug-bundle/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "langchain-debug-bundle", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/langchain-debug-bundleType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill langchain-debug-bundle -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install jeremylongshore/tons-of-skills-marketplace langchain-debug-bundle --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/.curated/langchain-debug-bundle .agents/skills/langchain-debug-bundle && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "langchain-debug-bundle" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/langchain-debug-bundle into .agents/skills/langchain-debug-bundle/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "langchain-debug-bundle", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill langchain-debug-bundle -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install jeremylongshore/tons-of-skills-marketplace langchain-debug-bundle --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/.curated/langchain-debug-bundle .cursor/skills/langchain-debug-bundle && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "langchain-debug-bundle" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/langchain-debug-bundle into .cursor/skills/langchain-debug-bundle/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "langchain-debug-bundle", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/jeremylongshore/tons-of-skills-marketplace.git --path skills/.curated/langchain-debug-bundle--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill langchain-debug-bundle -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install jeremylongshore/tons-of-skills-marketplace langchain-debug-bundle --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/.curated/langchain-debug-bundle .gemini/skills/langchain-debug-bundle && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "langchain-debug-bundle" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/langchain-debug-bundle into .gemini/skills/langchain-debug-bundle/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "langchain-debug-bundle", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install jeremylongshore/tons-of-skills-marketplace langchain-debug-bundleInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill langchain-debug-bundle -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/.curated/langchain-debug-bundle .github/skills/langchain-debug-bundle && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "langchain-debug-bundle" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/langchain-debug-bundle into .github/skills/langchain-debug-bundle/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "langchain-debug-bundle", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill langchain-debug-bundle -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install jeremylongshore/tons-of-skills-marketplace langchain-debug-bundle --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/.curated/langchain-debug-bundle .opencode/skills/langchain-debug-bundle && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "langchain-debug-bundle" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/langchain-debug-bundle into .opencode/skills/langchain-debug-bundle/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "langchain-debug-bundle", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
langchain-debug-bundleProduce a reproducible, sanitized diagnostic bundle for a LangChain / LangGraph incident — environment snapshot, version manifest, filtered astreamevents(v2) transcript, propagating callback stack…
Langchain Debug Bundle is an agent skill from jeremylongshore/tons-of-skills-marketplace. Produce a reproducible, sanitized diagnostic bundle for a LangChain / LangGraph incident — environment snapshot, version manifest, filtered astreamevents(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"…
Its SKILL.md is about 4.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including reference files (for example `references/astream-events-capture.md`, `references/callback-propagation.md` and `references/env-manifest-template.md`). Compatibility notes: Designed for Claude Code
It sits in AI & LLM Engineering, covering Building AI agents and LLM observability. It works with LangChain, LangSmith, LangGraph and GitHub. The repository describes itself as: Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com. The licence is MIT.
6 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 80f86df. It shows what the files ask for, not the result of running them.
Pre-approves these tools, so the agent can use them without asking each time:
ReadWriteEditBash(python:*)Bash(pip:*)From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are python).
From the folder's file list and the shell code blocks in SKILL.md.
Hosts in commands or code, which the agent is likely to contact:
smith.langchain.comAlso links to:
python.langchain.comdocs.smith.langchain.comlangchain-ai.github.ioblog.langchain.comFrom URLs in SKILL.md, links to its own repository left out.
Names these keys or tokens, usually read from environment variables:
LANGSMITH_API_KEYFrom names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Designed for Claude Code
From compatibility in the SKILL.md frontmatter.
Langchain Debug Bundle loads about 4.6k tokens when it runs, and up to ~12k if it reads all its reference files. Until then it costs about 161 tokens; SKILL.md has 1,162 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from jeremylongshore/tons-of-skills-marketplace at commit 80f86df, republished under its MIT licence (© jeremylongshore). 1,162 words, ~4,602 tokens.
.claude/skills/langchain-debug-bundle/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.An on-call engineer pages you at 2am: the production agent loops, ToolMessage
outputs are empty strings, the user sees "I could not find the answer." Someone
asks the right question — what state was the graph in when it gave up? — and
there is no answer, because the terminal that caught the failure is already
gone, the Kubernetes pod has restarted, and the LangSmith URL was never
recorded.
This skill produces one artifact: a single bundle-<incident_id>.tar.gz (typically
1-10 MB) containing everything a second engineer needs to reproduce the failure
without a live terminal — environment and version manifest, filtered
astream_events(version="v2") JSONL, a propagating callback stack, the
LangSmith trace URL, and a post-write sanitization pass.
Four pitfalls make naive bundles useless:
ChatAnthropic.stream() reports token_usage only on stream close; token math read from on_llm_end lags by stream duration, so cost context in the bundle is wrong.BaseCallbackHandler.with_config(callbacks=[...]) does NOT propagate into subgraphs or inner create_react_agent loops. A debug callback bound that way silently captures zero events from the place the incident actually happened.astream_events(version="v2") emits 2,000+ events per invocation. A raw dump is 50 MB and unreadable; an SSE viewer crashes on it.astream_log() is soft-deprecated in 1.0. Diagnostic tooling built on it breaks on the next minor version.The skill's answer: assemble the manifest, capture v2 events with a whitelist
(drop lifecycle noise, keep on_chat_model_stream / on_tool_* / any *_error
event), attach DebugCallbackHandler via config["callbacks"] at invoke time,
pull the LangSmith URL from the active RunTree, run the sanitization pass,
tar it up. Pinned: langchain-core 1.0.x, langgraph 1.0.x, langsmith 0.1.x.
Pain-catalog anchors: P01, P28, P47, P67.
langchain-core >= 1.0, < 2.0, langgraph >= 1.0, < 2.0langsmith >= 0.1.40 for RunTree accessLANGSMITH_TRACING=true, LANGSMITH_API_KEY=...,
LANGSMITH_PROJECT=...) — canonical 1.0 env-var names, not the legacy
LANGCHAIN_TRACING_V2 (see P26).Record the runtime snapshot that lets a colleague reproduce on a different host. See env-manifest-template.md for the exact YAML shape.
import platform, sys, os, subprocess, datetime
RELEVANT = [
"langchain-core", "langchain", "langgraph",
"langchain-anthropic", "langchain-openai",
"langsmith", "anthropic", "openai", "pydantic",
]
def pip_show(name: str) -> str | None:
try:
out = subprocess.check_output(
[sys.executable, "-m", "pip", "show", name],
stderr=subprocess.DEVNULL, text=True,
)
for line in out.splitlines():
if line.startswith("Version:"):
return line.split(":", 1)[1].strip()
except subprocess.CalledProcessError:
return None
def build_manifest(incident_id: str, invoke_meta: dict) -> dict:
return {
"bundle_spec_version": "1.0",
"generated_at": datetime.datetime.utcnow().isoformat() + "Z",
"incident_id": incident_id,
"runtime": {
"python": sys.version.split()[0],
"platform": platform.platform(),
"cpu_count": os.cpu_count(),
},
"packages": [
{"name": n, "version": pip_show(n)}
for n in RELEVANT if pip_show(n) is not None
],
# NAMES only — never values. Sanitized by design (P27 posture).
"env_var_names_present": sorted(
k for k in os.environ
if k.startswith(("LANGSMITH_", "LANGCHAIN_", "ANTHROPIC_", "OPENAI_", "GOOGLE_"))
),
"invocation": invoke_meta,
}Record env-var names, not values. Values go through the sanitization pass in Step 5, but the safest design is never to capture them.
astream_events(version="v2") with a filterRaw v2 events flood 2,000+ per invocation (P47). A server-side filter drops
lifecycle noise (on_chain_start/on_chain_end) and keeps model, tool, and
error events — yielding 50-200 events per invocation and a ~500 KB JSONL.
import json, itertools
from pathlib import Path
KEEP = {
"on_chat_model_start", "on_chat_model_end",
"on_tool_start", "on_tool_end", "on_tool_error",
"on_retriever_start", "on_retriever_end",
"on_custom_event",
}
# Additionally: any event whose name ends in "_error"
# Additionally: 1-in-10 sampled on_chat_model_stream (for response reconstruction)
async def capture_events(graph, inputs, config, out_path: Path) -> int:
sample = itertools.count()
written = 0
with out_path.open("w") as f:
async for evt in graph.astream_events(inputs, config=config, version="v2"):
name = evt["event"]
if name == "on_chat_model_stream" and next(sample) % 10 != 0:
continue
if name not in KEEP and not name.endswith("_error"):
continue
f.write(json.dumps({
"event": name,
"name": evt.get("name"),
"run_id": str(evt.get("run_id")),
"tags": evt.get("tags"),
"metadata": evt.get("metadata"),
"data": _json_safe(evt.get("data", {})),
}, default=str) + "\n")
written += 1
return writtenNever use astream_log() (P67). The full event taxonomy and _json_safe
helper live in astream-events-capture.md.
Callbacks bound via Runnable.with_config(callbacks=[...]) fire on the outer
chain only. They go silent the moment the graph crosses into a subgraph or an
inner create_react_agent loop — exactly where incidents happen. Pass them via
config["callbacks"] at invoke time instead.
from langchain_core.callbacks import BaseCallbackHandler
class DebugCallbackHandler(BaseCallbackHandler):
def __init__(self): self.records: list[dict] = []
def on_tool_start(self, serialized, input_str, *, run_id, parent_run_id=None, **kw):
self.records.append({
"kind": "tool_start", "run_id": str(run_id),
"parent_run_id": str(parent_run_id) if parent_run_id else None,
"tool": serialized.get("name"), "input": input_str[:500],
})
def on_tool_error(self, error, *, run_id, **kw):
self.records.append({
"kind": "tool_error", "run_id": str(run_id),
"error_type": type(error).__name__, "error_message": str(error)[:1000],
})
debug = DebugCallbackHandler()
result = await agent.ainvoke(
{"messages": [("user", reproducer_prompt)]},
config={
"configurable": {"thread_id": thread_id},
"callbacks": [debug], # propagates into subgraphs
"tags": ["debug-bundle", incident_id],
"metadata": {"incident_id": incident_id},
},
)The full handler (LLM + retriever + tool lifecycle) and a propagation smoke test live in callback-propagation.md.
A trace URL is cheaper than any local artifact — one click and the colleague
sees the full run with latency, token counts, and input/output per node. Pull
it from the active RunTree if you have a live handle; otherwise construct it
from the invoke's run_id:
from langsmith.run_helpers import get_current_run_tree
def capture_langsmith_url() -> str | None:
rt = get_current_run_tree()
if rt is None:
return None # tracing not enabled or run already closed
return rt.get_url() # https://smith.langchain.com/o/.../r/<run_id>
# Write to langsmith.url in the bundle:
url = capture_langsmith_url()
(staging / "langsmith.url").write_text(url or "(no trace URL available)")The URL requires the colleague to have access to the LangSmith project. For
public sharing, use RunTree.share() to generate a public snapshot URL. Never
paste a non-shared URL into a public Discord thread — the page redirects to a
login and leaks the project name.
Every file in the staging dir passes through the redaction pass before the tar.gz is written. This is the last-mile guard; upstream redaction middleware should already have caught credential material, but the bundle cannot assume that.
import re
PATTERNS = [
("openai_key", r"sk-proj-[A-Za-z0-9_-]{16,}|sk-[A-Za-z0-9_-]{32,}"),
("anthropic_key", r"sk-ant-[A-Za-z0-9_-]{16,}"),
("google_key", r"AIza[A-Za-z0-9_-]{35}"),
("langsmith_key", r"lsv2_(?:pt|sk)_[A-Za-z0-9]{32,}"),
("bearer", r"(?i)bearer\s+[A-Za-z0-9._~+/=-]{20,}"),
("db_uri", r"[a-z]+://[^:/\s]+:[^@\s]+@[^/\s]+"),
("private_key", r"-----BEGIN [A-Z ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z ]*PRIVATE KEY-----"),
]
def sanitize_file(path, patterns=PATTERNS) -> dict[str, int]:
text, counts = path.read_text(), {}
for name, pat in patterns:
new, n = re.subn(pat, f"[REDACTED:{name}]", text)
if n: counts[name] = n; text = new
path.write_text(text)
return countsThe full pattern catalog (credentials, session tokens, PII, internal URLs) and
the pre-upload tar -xzf ... && grep scan live in
sanitization-checklist.md. For the
production-grade upstream redaction middleware, use the forthcoming
langchain-security-basics skill.
Write a top-level MANIFEST.yaml that describes every file and records the
sanitization summary. Then tar.gz the staging dir.
import tarfile, yaml
from pathlib import Path
def write_bundle(staging: Path, manifest: dict, sanitize_report: dict,
out: Path, events_count: int, callback_count: int) -> Path:
index = {
"bundle_spec_version": "1.0",
"incident_id": manifest["incident_id"],
"generated_at": manifest["generated_at"],
"files": [
{"name": "manifest.yaml", "purpose": "env + version snapshot"},
{"name": "events.jsonl", "purpose": f"filtered astream_events(v2), {events_count} events"},
{"name": "callbacks.txt", "purpose": f"DebugCallbackHandler records, {callback_count} entries"},
{"name": "langsmith.url", "purpose": "trace URL (shared) or (none)"},
{"name": "notes.txt", "purpose": "free-form engineer notes, sanitized"},
],
"sanitization": sanitize_report,
}
(staging / "MANIFEST.yaml").write_text(yaml.safe_dump(index, sort_keys=False))
with tarfile.open(out, "w:gz") as tar:
tar.add(staging, arcname=out.stem)
return out
bundle = write_bundle(
staging=Path("/tmp/bundle-INC-2026-0421-A"),
manifest=m, sanitize_report=report,
out=Path("/tmp/bundle-INC-2026-0421-A.tar.gz"),
events_count=n_events, callback_count=len(debug.records),
)| File in bundle | Purpose | Source | Sanitization step |
|---|---|---|---|
MANIFEST.yaml | Index + file descriptions + redaction counts | Step 6 | N/A (authored) |
manifest.yaml | Python/OS/package/env-var-name snapshot | Step 1 | Run pass; env-var names only by design |
events.jsonl | Filtered astream_events(v2) — model, tool, error events | Step 2 | Per-line regex redaction |
callbacks.txt | DebugCallbackHandler records (JSONL) | Step 3 | Per-line regex redaction |
langsmith.url | RunTree.get_url() (shared if public) | Step 4 | Verify no embedded API key param |
notes.txt | Engineer's free-form observations | Manual | Per-line regex redaction |
Typical size: 1-10 MB compressed. Typical event count after filter: 50-200
per invocation (down from 2,000+ raw). Bundle is self-contained — no external
dependencies beyond tar -xzf and a text editor.
| Error | Cause | Fix |
|---|---|---|
events.jsonl has no subgraph events | Callbacks bound via Runnable.with_config(callbacks=[...]) instead of config["callbacks"] (P28) | Move callbacks to invoke-time config; see callback-propagation.md |
events.jsonl is 50 MB+ | Filter not applied or on_chain_* events not excluded (P47) | Enforce KEEP whitelist and 1:10 streaming sample; Step 2 |
DeprecationWarning: astream_log is deprecated | Captured via astream_log() instead of astream_events(v2) (P67) | Migrate to graph.astream_events(..., version="v2") |
response_metadata["token_usage"] empty in on_chat_model_end records | Read before stream closed (P01) | Aggregate from on_chat_model_stream chunks with usage_metadata; see model-inference skill |
langsmith.url is empty | Tracing not enabled or get_current_run_tree() returned None | Set LANGSMITH_TRACING=true, LANGSMITH_API_KEY=..., LANGSMITH_PROJECT=... (P26) |
TypeError: Object of type X is not JSON serializable in events capture | Tool returned a custom class with no .model_dump() | Extend _json_safe in astream-events-capture.md |
Pre-upload scan finds sk-... pattern | Upstream middleware missed a key, or regex too lax | Add specific pattern to PATTERNS, re-run Step 5, re-archive |
Give a colleague this table with the bundle so they know where to start:
| Symptom in the ticket | Start with | Then |
|---|---|---|
"Agent looped forever" / GraphRecursionError | events.jsonl (filter on_tool_start) | callbacks.txt for tool→tool timing |
| "Tool returned empty" / "Could not find the answer" (P09) | events.jsonl (grep on_tool_error) | callbacks.txt for the parent run_id |
| "Wrong answer, correct tool called" | events.jsonl (grep on_chat_model_start + last on_tool_end) | LangSmith trace URL for full context |
| "Token count wrong in dashboard" (P01, P25) | events.jsonl on_chat_model_stream chunks | manifest.yaml for retry middleware presence |
| "Works locally, fails in prod" | manifest.yaml diff against local | events.jsonl for env-specific branches |
| "Memory resets between turns" (P16) | manifest.yaml → langgraph.thread_id present? | events.jsonl → checkpointer restore events |
See callback-propagation.md for the full invoke-time config pattern. The skeleton:
async def reproduce_and_bundle(agent, reproducer, incident_id: str) -> Path:
debug = DebugCallbackHandler()
staging = Path(f"/tmp/bundle-{incident_id}"); staging.mkdir(exist_ok=True)
try:
result = await agent.ainvoke(
reproducer,
config={"configurable": {"thread_id": f"debug-{incident_id}"},
"callbacks": [debug], "tags": ["debug-bundle", incident_id]},
)
invoke_meta = {"status": "success"}
except Exception as e:
invoke_meta = {"status": "error",
"error_class": type(e).__name__, "error_message": str(e)[:500]}
# Step 2 — capture events (separate invocation with same inputs OR replay
# from RunTree if already in LangSmith)
n_events = await capture_events(agent, reproducer, {...}, staging / "events.jsonl")
# Step 1 — manifest, Step 3 — callbacks, Step 4 — LangSmith URL, Step 5 — sanitize
# Step 6 — bundle
return write_bundle(staging, build_manifest(incident_id, invoke_meta), ..., ...)Before posting to the LangChain Discord or GitHub Issues:
tar -xzf && grep scan (sanitization-checklist.md)langsmith.url is a shared URL (public), not a project-internal oneincident_id if it maps to internal ticket numbers you cannot discloseMANIFEST.yaml (spec version
and versions of langchain-core + langgraph)astream_events v2RunTree APIdocs/pain-catalog.md (entries P01, P26, P28, P47, P67)langchain-observability, langchain-security-basics (upstream redaction middleware), langchain-model-inference (token accounting)© jeremylongshore, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 5 other files (references) in skills/.curated/langchain-debug-bundle of jeremylongshore/tons-of-skills-marketplace.
Open the folder on GitHubat commit 80f86df
Langchain Debug Bundle next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Langchain Debug Bundle this skilljeremylongshore/tons-of-skills-marketplace | 2.8k | — | ~4.6k | Automated safety check: Pass | MIT | |
| LangSmith Trace DebuggingComposioHQ/awesome-claude-skills | 77k | 8 repos | ~2.7k | Automated safety check: Pass | None | |
| Agentsop Observability Setupagentsope/SkillAlchemy | 466 | — | ~4.4k | Automated safety check: Pass | MIT | |
| Langchain Dependencieslangchain-ai/langchain-skills | 1.3k | — | ~3.6k | Automated safety check: Pass | MIT | |
| Langgraph Testing Evaluationsoba-labs/langchain-agent-skills | 107 | — | ~2.3k | Automated safety check: Pass | MIT | |
| Langsmithlangchain-ai/docs | 426 | — | ~935 | Automated safety check: Pass | MIT |
ComposioHQ/awesome-claude-skills
Debugs LangChain and LangGraph agents by pulling recent execution traces with the langsmith-fetch CLI and reporting errors, tool calls, timings and token use.
agentsope/SkillAlchemy
Enhancement-overlay skill — the DECISION + WIRING layer for LM observability that the single-backend skills [[langsmith]], [[phoenix]], [[mlflow]] do NOT cover.
langchain-ai/langchain-skills
INVOKE THIS SKILL when setting up a new project or when asked about package versions, installation, or dependency management for LangChain, LangGraph, LangSmith, or Deep Agents.
soba-labs/langchain-agent-skills
A skill your agent uses when you need to test or evaluate LangGraph/LangChain agents: writing unit or integration tests, generating test scaffolds, mocking LLM/tool behavior, running trajectory…
langchain-ai/docs
Trace, evaluate, and deploy AI agents and LLM applications with LangSmith.
soba-labs/langchain-agent-skills
Deploy and operate production agent servers with LangSmith Deployment.
jeremylongshore/tons-of-skills-marketplace
Execute this skill enables AI assistant to conduct a security-focused code review using the security-agent plugin.
jeremylongshore/tons-of-skills-marketplace
Build this skill automates the adaptation of pre-trained machine learning models using transfer learning techniques.
jeremylongshore/tons-of-skills-marketplace
Execute proactive auto-loading: automatically detects and loads agents.md files.
jeremylongshore/tons-of-skills-marketplace
Aggregate and centralize performance metrics from applications, systems, databases, caches, and services.
jeremylongshore/tons-of-skills-marketplace
Execute this skill enables AI assistant to analyze capacity requirements and plan for future growth.
jeremylongshore/tons-of-skills-marketplace
Process use when you need to work with database indexing. An agent skill from jeremylongshore/tons-of-skills-marketplace.
Categories
Produce a reproducible, sanitized diagnostic bundle for a LangChain / LangGraph incident — environment snapshot, version manifest, filtered astreamevents(v2) transcript, propagating callback stack…. Langchain Debug Bundle is an agent skill from jeremylongshore/tons-of-skills-marketplace. Produce a reproducible, sanitized diagnostic bundle for a LangChain / LangGraph incident — environment snapshot, version manifest, filtered astreamevents(v2) transcript, propagating callback stack, LangSmith trace URL — so a debug colleague can reproduce the failure without a live terminal.
Langchain Debug Bundle fits situations like: triaging a production incident; filing a Discord; GitHub bug report; asking for help on the LangChain forum.
Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill langchain-debug-bundle -a claude-code`. Or copy the skill folder (skills/.curated/langchain-debug-bundle in jeremylongshore/tons-of-skills-marketplace) into .claude/skills/langchain-debug-bundle in your project. Claude Code loads it when a task matches its description.
Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill langchain-debug-bundle -a codex`. Or copy the skill folder (skills/.curated/langchain-debug-bundle in jeremylongshore/tons-of-skills-marketplace) into .agents/skills/langchain-debug-bundle in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill langchain-debug-bundle -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/langchain-debug-bundle, .gemini/skills/langchain-debug-bundle, .github/skills/langchain-debug-bundle and .opencode/skills/langchain-debug-bundle in your project.
Going by SKILL.md and its folder, Langchain Debug Bundle needs credentials named LANGSMITH_API_KEY. Our summary lists: Python 3; A credential in LANGSMITH_API_KEY. Its frontmatter pre-approves these tools: Read, Write, Edit, Bash(python:*), Bash(pip:*). Compatibility (from SKILL.md): Designed for Claude Code.
SKILL.md names 5 domains. In commands or code: smith.langchain.com; the agent is likely to contact it when it follows the instructions. As links in the text: python.langchain.com, docs.smith.langchain.com, langchain-ai.github.io and blog.langchain.com. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Langchain Debug Bundle is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 4.6k tokens (SKILL.md is roughly 18k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 7.4k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Langchain Debug Bundle: LangSmith Trace Debugging (ComposioHQ/awesome-claude-skills, 77k stars), Agentsop Observability Setup (agentsope/SkillAlchemy, 466 stars), Langchain Dependencies (langchain-ai/langchain-skills, 1.3k stars) and Langgraph Testing Evaluation (soba-labs/langchain-agent-skills, 107 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
jeremylongshore (a GitHub user) maintains it in jeremylongshore/tons-of-skills-marketplace, which has 2,825 GitHub stars. The repository holds 3,342 skills in this directory. The repository was last updated on October 9, 2026.
Source: jeremylongshore/tons-of-skills-marketplace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.