● Communauté
OthmanAdi
⚡ Instantané
langsmith-fetch-skill
par OthmanAdi · OthmanAdi/langsmith-fetch-skill
Debug LangChain / LangGraph agents from your terminal — fetches LangSmith Studio traces into Claude Code and analyzes failures, latency, tool calls.
A focused observability skill. When you ask Claude to debug an agent, it runs langsmith-fetch against LangSmith Studio, pulls trace data, analyzes execution patterns, and surfaces failures, root causes, latency hotspots, and tool-call issues. Export sessions for later review.
Pourquoi l'utiliser
Fonctionnalités clés
- Pulls traces directly from LangSmith Studio via CLI
- Auto-triggers on debugging-flavored prompts
- Tracks failures + root causes
- Latency + token usage analysis
- Tool-call and memory operation review
- Session export
Démo en direct
Aperçu en pratique
langsmith-fetch-skill.replay
▶ prêt
Cas d'usage
Usages concrets : langsmith-fetch-skill
Quand l'utiliser : An agent that used to be snappy is now slow; you want root cause.
Déroulement
-
Ask Claude to diagnose
Why is my agent <name> slow? Pull the last 20 traces from LangSmith and find the hotspot.✓ Copié
→ Skill fetches traces; reports latency by step
-
Drill in
Focus on trace <id> — break down tool-call times.✓ Copié
→ Per-tool latency with the outlier called out
Résultat : A specific step to optimize, not a hunch.
Pièges
- Optimizing the average when tail latency is the problem — Ask for p95/p99 specifically
Quand l'utiliser : A user reported an error; you have the trace id.
Déroulement
-
Fetch + analyze
Debug trace <id>. What was the immediate error, what's the root cause in the graph?✓ Copié
→ Error step + upstream decision that led to it
Résultat : A fix targeting the actual decision point, not the symptom.
Quand l'utiliser : Monthly review of agent spend.
Déroulement
-
Aggregate token usage
Across last 7 days' traces, rank graph nodes by total token usage.✓ Copié
→ Ranked table with % share
-
Propose tightening
For the top 3, propose prompt-compression or model downgrade options.✓ Copié
→ Targeted opt list
Résultat : Measurable spend reduction without chasing tiny savings.
Combinaisons
Associez-le à d'autres MCPs pour un effet X10
Save exports alongside the agent code for lineage
Export the debugging session to debugging/traces/<date>.json.✓ Copié
langsmith-fetch-skill +
github
Attach trace summary to a bug report
Summarize trace <id> and post as comment on GitHub issue #42.✓ Copié
Coût et limites
Coût d'exécution
- Quota d'API
- LangSmith: depends on plan; Studio has generous quotas
- Tokens par appel
- Low — traces are structured
- Monétaire
- Free skill; LangSmith free tier covers most devs
- Astuce
- Use fetch_recent with a narrow window, not full history
Sécurité
Permissions, secrets, portée
Portées minimales : LangSmith: read on your project(s)
Stockage des identifiants : LANGCHAIN_API_KEY in env
Sortie de données : Only to LangSmith (where the traces already live)
Ne jamais accorder : Write to LangSmith — skill only reads
- Traces can include user inputs and outputs — treat them as user data under your privacy policy.
Dépannage
Erreurs courantes et correctifs
langsmith-fetch: command not found
Install LangSmith CLI or ensure it's on PATH
Vérifier : which langsmith-fetch
Empty results
Check project name and time window; traces are project-scoped
Alternatives
langsmith-fetch-skill vs autres
| Alternative | Quand l'utiliser | Compromis |
| LangSmith web UI | You prefer clicking | No Claude analysis |