π AI observability skill for Claude Code. Debug LangChain/LangGraph agents by fetching execution traces from LangSmith Studio directly in your terminal.
27
stars
6
commits
Apr 6, 2026
updated
AI observability & debugging skill for Claude!
Debug LangChain and LangGraph agents by fetching execution traces from LangSmith Studio directly in your terminal using Claude Code.
This Claude Code skill teaches Claude how to debug your LangChain and LangGraph agents by automatically fetching and analyzing execution traces from LangSmith Studio.
Just ask Claude:
Claude will automatically fetch traces, analyze execution patterns, identify errors, and provide actionable insights!
# Install langsmith-fetch CLI
pip install langsmith-fetch
# Set your LangSmith credentials
export LANGSMITH_API_KEY="your_langsmith_api_key"
export LANGSMITH_PROJECT="your_project_name"
Get your API key from: https://smith.langchain.com/
npx skills add OthmanAdi/langsmith-fetch-skill --skill langsmith-fetch -g
Works with Claude Code, Cursor, Codex, Gemini CLI, and 40+ agents supporting the Agent Skills spec.
mkdir -p ~/.claude/skills/langsmith-fetch
curl -o ~/.claude/skills/langsmith-fetch/SKILL.md https://raw.githubusercontent.com/OthmanAdi/langsmith-fetch-skill/main/SKILL.md
mkdir -p .claude/skills/langsmith-fetch
curl -o .claude/skills/langsmith-fetch/SKILL.md https://raw.githubusercontent.com/OthmanAdi/langsmith-fetch-skill/main/SKILL.md
git add .claude/skills/
git commit -m "Add LangSmith Fetch skill"
git push
Open Claude Code and ask:
Debug my agent - what happened in the last 5 minutes?
Claude will automatically use this skill! π
You: "Debug my agent"
Claude:
Found 3 traces in the last 5 minutes:
Trace 1: β
Success
- Agent: memento
- Tools: recall_memories, create_entities
- Duration: 2.3s
- Tokens: 1,245
Trace 2: β Error
- Agent: cypher
- Error: "Neo4j connection timeout"
- Duration: 15.1s
- Failed at: search_nodes tool
π‘ Issue: Neo4j timeout. Check database connection and add retry logic.
You: "Why did trace abc123 fail?"
Claude:
Deep Dive Analysis - Trace abc123
Goal: User asked "Find all projects"
Execution Flow:
1. β
search_nodes β Found 24 nodes
2. β get_node_details β Error: "Node not found"
Root Cause: Search returned deleted node IDs
Suggested Fix:
1. Add error handling in get_node_details
2. Filter deleted nodes in search results
You: "Why is my agent slow?"
Claude:
Performance Analysis - Last 30 minutes
Average execution time: 8.7s
Slowest operation: search_nodes (6.2s avg)
Token usage: 2,145 tokens/trace
Bottlenecks:
1. Neo4j queries taking 71% of time
2. Large context window (15K tokens)
Recommendations:
1. Add database indexes
2. Implement context trimming
3. Cache frequently accessed nodes
The skill uses these langsmith-fetch commands:
langsmith-fetch traces # Get recent traces
langsmith-fetch trace <id> # Get specific trace
langsmith-fetch threads # Get conversations
langsmith-fetch config # Manage configuration
Required:
LANGSMITH_API_KEY # Your LangSmith API key
LANGSMITH_PROJECT # Your project name
Optional:
LANGCHAIN_ENDPOINT # Custom endpoint (default: https://api.smith.langchain.com)
Add to ~/.bashrc or ~/.zshrc:
echo 'export LANGSMITH_API_KEY="your_key"' >> ~/.bashrc
echo 'export LANGSMITH_PROJECT="your_project"' >> ~/.bashrc
source ~/.bashrc
Cause: No recent agent activity or tracing disabled
Fix:
# Check environment
echo $LANGSMITH_API_KEY
echo $LANGSMITH_PROJECT
# Try longer timeframe
langsmith-fetch traces --last-n-minutes 1440 --limit 50
# Verify tracing is enabled
# In your code: LANGCHAIN_TRACING_V2=true
Fix:
SKILL.md is in ~/.claude/skills/langsmith-fetch/Fix:
# Verify langsmith-fetch is installed
pip list | grep langsmith-fetch
# Reinstall if needed
pip install --upgrade langsmith-fetch
We welcome contributions! See CONTRIBUTING.md for guidelines.
Ideas for contributions:
MIT Β© Ahmad Othman Ammar Adi
Ahmad Othman Ammar Adi
If this skill helps you debug your agents, please:
Wishing you a Merry Christmas and a Happy New Year 2026! π May your agents run smoothly and your debugging be swift in the year ahead!
(This message will be updated in future releases)
Built with β€οΈ by Ahmad Othman Ammar Adi for the AI debugging community
6 commits
π AI observability skill for Claude Code. Debug LangChain/LangGraph agents by fetching execution traces from LangSmith Studio directly in your terminal.
27
stars
6
commits
Apr 6, 2026
updated
AI observability & debugging skill for Claude!
Debug LangChain and LangGraph agents by fetching execution traces from LangSmith Studio directly in your terminal using Claude Code.
This Claude Code skill teaches Claude how to debug your LangChain and LangGraph agents by automatically fetching and analyzing execution traces from LangSmith Studio.
Just ask Claude:
Claude will automatically fetch traces, analyze execution patterns, identify errors, and provide actionable insights!
# Install langsmith-fetch CLI
pip install langsmith-fetch
# Set your LangSmith credentials
export LANGSMITH_API_KEY="your_langsmith_api_key"
export LANGSMITH_PROJECT="your_project_name"
Get your API key from: https://smith.langchain.com/
npx skills add OthmanAdi/langsmith-fetch-skill --skill langsmith-fetch -g
Works with Claude Code, Cursor, Codex, Gemini CLI, and 40+ agents supporting the Agent Skills spec.
mkdir -p ~/.claude/skills/langsmith-fetch
curl -o ~/.claude/skills/langsmith-fetch/SKILL.md https://raw.githubusercontent.com/OthmanAdi/langsmith-fetch-skill/main/SKILL.md
mkdir -p .claude/skills/langsmith-fetch
curl -o .claude/skills/langsmith-fetch/SKILL.md https://raw.githubusercontent.com/OthmanAdi/langsmith-fetch-skill/main/SKILL.md
git add .claude/skills/
git commit -m "Add LangSmith Fetch skill"
git push
Open Claude Code and ask:
Debug my agent - what happened in the last 5 minutes?
Claude will automatically use this skill! π
You: "Debug my agent"
Claude:
Found 3 traces in the last 5 minutes:
Trace 1: β
Success
- Agent: memento
- Tools: recall_memories, create_entities
- Duration: 2.3s
- Tokens: 1,245
Trace 2: β Error
- Agent: cypher
- Error: "Neo4j connection timeout"
- Duration: 15.1s
- Failed at: search_nodes tool
π‘ Issue: Neo4j timeout. Check database connection and add retry logic.
You: "Why did trace abc123 fail?"
Claude:
Deep Dive Analysis - Trace abc123
Goal: User asked "Find all projects"
Execution Flow:
1. β
search_nodes β Found 24 nodes
2. β get_node_details β Error: "Node not found"
Root Cause: Search returned deleted node IDs
Suggested Fix:
1. Add error handling in get_node_details
2. Filter deleted nodes in search results
You: "Why is my agent slow?"
Claude:
Performance Analysis - Last 30 minutes
Average execution time: 8.7s
Slowest operation: search_nodes (6.2s avg)
Token usage: 2,145 tokens/trace
Bottlenecks:
1. Neo4j queries taking 71% of time
2. Large context window (15K tokens)
Recommendations:
1. Add database indexes
2. Implement context trimming
3. Cache frequently accessed nodes
The skill uses these langsmith-fetch commands:
langsmith-fetch traces # Get recent traces
langsmith-fetch trace <id> # Get specific trace
langsmith-fetch threads # Get conversations
langsmith-fetch config # Manage configuration
Required:
LANGSMITH_API_KEY # Your LangSmith API key
LANGSMITH_PROJECT # Your project name
Optional:
LANGCHAIN_ENDPOINT # Custom endpoint (default: https://api.smith.langchain.com)
Add to ~/.bashrc or ~/.zshrc:
echo 'export LANGSMITH_API_KEY="your_key"' >> ~/.bashrc
echo 'export LANGSMITH_PROJECT="your_project"' >> ~/.bashrc
source ~/.bashrc
Cause: No recent agent activity or tracing disabled
Fix:
# Check environment
echo $LANGSMITH_API_KEY
echo $LANGSMITH_PROJECT
# Try longer timeframe
langsmith-fetch traces --last-n-minutes 1440 --limit 50
# Verify tracing is enabled
# In your code: LANGCHAIN_TRACING_V2=true
Fix:
SKILL.md is in ~/.claude/skills/langsmith-fetch/Fix:
# Verify langsmith-fetch is installed
pip list | grep langsmith-fetch
# Reinstall if needed
pip install --upgrade langsmith-fetch
We welcome contributions! See CONTRIBUTING.md for guidelines.
Ideas for contributions:
MIT Β© Ahmad Othman Ammar Adi
Ahmad Othman Ammar Adi
If this skill helps you debug your agents, please:
Wishing you a Merry Christmas and a Happy New Year 2026! π May your agents run smoothly and your debugging be swift in the year ahead!
(This message will be updated in future releases)
Built with β€οΈ by Ahmad Othman Ammar Adi for the AI debugging community
6 commits