
Langsmith Fetch
- 23 installs
- 27 repo stars
- Updated April 6, 2026
- othmanadi/langsmith-fetch-skill
This is a copy of langsmith-fetch by composiohq - installs and ranking accrue to the original listing.
Helps with ai & agent building tasks during AI-assisted development.
About
langsmith-fetch is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted coding.
- langsmith-fetch
- AI & Agent Building
- AI-coding skill
Langsmith Fetch by the numbers
- 23 all-time installs (skills.sh)
- Data as of Aug 4, 2026 (Skillselion catalog sync)
npx skills add https://github.com/othmanadi/langsmith-fetch-skill --skill langsmith-fetchAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 23 |
|---|---|
| repo stars | ★ 27 |
| Last updated | April 6, 2026 |
| Repository | othmanadi/langsmith-fetch-skill ↗ |
What it does
Helps with ai & agent building tasks during AI-assisted development.
Files
LangSmith Fetch - Agent Debugging Skill
Debug LangChain and LangGraph agents by fetching execution traces directly from LangSmith Studio in your terminal.
When to Use This Skill
Automatically activate when user mentions:
- 🐛 "Debug my agent" or "What went wrong?"
- 🔍 "Show me recent traces" or "What happened?"
- ❌ "Check for errors" or "Why did it fail?"
- 💾 "Analyze memory operations" or "Check LTM"
- 📊 "Review agent performance" or "Check token usage"
- 🔧 "What tools were called?" or "Show execution flow"
Prerequisites
1. Install langsmith-fetch
pip install langsmith-fetch2. Set Environment Variables
export LANGSMITH_API_KEY="your_langsmith_api_key"
export LANGSMITH_PROJECT="your_project_name"Verify setup:
echo $LANGSMITH_API_KEY
echo $LANGSMITH_PROJECTCore Workflows
Workflow 1: Quick Debug Recent Activity
When user asks: "What just happened?" or "Debug my agent"
Execute:
langsmith-fetch traces --last-n-minutes 5 --limit 5 --format prettyAnalyze and report: 1. ✅ Number of traces found 2. ⚠️ Any errors or failures 3. 🛠️ Tools that were called 4. ⏱️ Execution times 5. 💰 Token usage
Example response format:
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
Trace 3: ✅ Success
- Agent: memento
- Tools: store_memory
- Duration: 1.8s
- Tokens: 892
💡 Issue found: Trace 2 failed due to Neo4j timeout. Recommend checking database connection.---
Workflow 2: Deep Dive Specific Trace
When user provides: Trace ID or says "investigate that error"
Execute:
langsmith-fetch trace <trace-id> --format jsonAnalyze JSON and report: 1. 🎯 What the agent was trying to do 2. 🛠️ Which tools were called (in order) 3. ✅ Tool results (success/failure) 4. ❌ Error messages (if any) 5. 💡 Root cause analysis 6. 🔧 Suggested fix
Example response format:
Deep Dive Analysis - Trace abc123
Goal: User asked "Find all projects in Neo4j"
Execution Flow:
1. ✅ search_nodes(query: "projects")
→ Found 24 nodes
2. ❌ get_node_details(node_id: "proj_123")
→ Error: "Node not found"
→ This is the failure point
3. ⏹️ Execution stopped
Root Cause:
The search_nodes tool returned node IDs that no longer exist in the database,
possibly due to recent deletions.
Suggested Fix:
1. Add error handling in get_node_details tool
2. Filter deleted nodes in search results
3. Update cache invalidation strategy
Token Usage: 1,842 tokens ($0.0276)
Execution Time: 8.7 seconds---
Workflow 3: Export Debug Session
When user says: "Save this session" or "Export traces"
Execute:
# Create session folder with timestamp
SESSION_DIR="langsmith-debug/session-$(date +%Y%m%d-%H%M%S)"
mkdir -p "$SESSION_DIR"
# Export traces
langsmith-fetch traces "$SESSION_DIR/traces" --last-n-minutes 30 --limit 50 --include-metadata
# Export threads (conversations)
langsmith-fetch threads "$SESSION_DIR/threads" --limit 20Report:
✅ Session exported successfully!
Location: langsmith-debug/session-20251224-143022/
- Traces: 42 files
- Threads: 8 files
You can now:
1. Review individual trace files
2. Share folder with team
3. Analyze with external tools
4. Archive for future reference
Session size: 2.3 MB---
Workflow 4: Error Detection
When user asks: "Show me errors" or "What's failing?"
Execute:
# Fetch recent traces
langsmith-fetch traces --last-n-minutes 30 --limit 50 --format json > recent-traces.json
# Search for errors
grep -i "error\|failed\|exception" recent-traces.jsonAnalyze and report: 1. 📊 Total errors found 2. ❌ Error types and frequency 3. 🕐 When errors occurred 4. 🎯 Which agents/tools failed 5. 💡 Common patterns
Example response format:
Error Analysis - Last 30 Minutes
Total Traces: 50
Failed Traces: 7 (14% failure rate)
Error Breakdown:
1. Neo4j Connection Timeout (4 occurrences)
- Agent: cypher
- Tool: search_nodes
- First occurred: 14:32
- Last occurred: 14:45
- Pattern: Happens during peak load
2. Memory Store Failed (2 occurrences)
- Agent: memento
- Tool: store_memory
- Error: "Pinecone rate limit exceeded"
- Occurred: 14:38, 14:41
3. Tool Not Found (1 occurrence)
- Agent: sqlcrm
- Attempted tool: "export_report" (doesn't exist)
- Occurred: 14:35
💡 Recommendations:
1. Add retry logic for Neo4j timeouts
2. Implement rate limiting for Pinecone
3. Fix sqlcrm tool configuration---
Common Use Cases
Use Case 1: "Agent Not Responding"
User says: "My agent isn't doing anything"
Steps: 1. Check if traces exist:
langsmith-fetch traces --last-n-minutes 5 --limit 52. If NO traces found:
- Tracing might be disabled
- Check:
LANGCHAIN_TRACING_V2=truein environment - Check:
LANGCHAIN_API_KEYis set - Verify agent actually ran
3. If traces found:
- Review for errors
- Check execution time (hanging?)
- Verify tool calls completed
---
Use Case 2: "Wrong Tool Called"
User says: "Why did it use the wrong tool?"
Steps: 1. Get the specific trace 2. Review available tools at execution time 3. Check agent's reasoning for tool selection 4. Examine tool descriptions/instructions 5. Suggest prompt or tool config improvements
---
Use Case 3: "Memory Not Working"
User says: "Agent doesn't remember things"
Steps: 1. Search for memory operations:
langsmith-fetch traces --last-n-minutes 10 --limit 20 --format raw | grep -i "memory\|recall\|store"2. Check:
- Were memory tools called?
- Did recall return results?
- Were memories actually stored?
- Are retrieved memories being used?
---
Use Case 4: "Performance Issues"
User says: "Agent is too slow"
Steps: 1. Export with metadata:
langsmith-fetch traces ./perf-analysis --last-n-minutes 30 --limit 50 --include-metadata2. Analyze:
- Execution time per trace
- Tool call latencies
- Token usage (context size)
- Number of iterations
- Slowest operations
3. Identify bottlenecks and suggest optimizations
---
Output Format Guide
Pretty Format (Default)
langsmith-fetch traces --limit 5 --format prettyUse for: Quick visual inspection, showing to users
JSON Format
langsmith-fetch traces --limit 5 --format jsonUse for: Detailed analysis, syntax-highlighted review
Raw Format
langsmith-fetch traces --limit 5 --format rawUse for: Piping to other commands, automation
---
Advanced Features
Time-Based Filtering
# After specific timestamp
langsmith-fetch traces --after "2025-12-24T13:00:00Z" --limit 20
# Last N minutes (most common)
langsmith-fetch traces --last-n-minutes 60 --limit 100Include Metadata
# Get extra context
langsmith-fetch traces --limit 10 --include-metadata
# Metadata includes: agent type, model, tags, environmentConcurrent Fetching (Faster)
# Speed up large exports
langsmith-fetch traces ./output --limit 100 --concurrent 10---
Troubleshooting
"No traces found matching criteria"
Possible causes: 1. No agent activity in the timeframe 2. Tracing is disabled 3. Wrong project name 4. API key issues
Solutions:
# 1. Try longer timeframe
langsmith-fetch traces --last-n-minutes 1440 --limit 50
# 2. Check environment
echo $LANGSMITH_API_KEY
echo $LANGSMITH_PROJECT
# 3. Try fetching threads instead
langsmith-fetch threads --limit 10
# 4. Verify tracing is enabled in your code
# Check for: LANGCHAIN_TRACING_V2=true"Project not found"
Solution:
# View current config
langsmith-fetch config show
# Set correct project
export LANGSMITH_PROJECT="correct-project-name"
# Or configure permanently
langsmith-fetch config set project "your-project-name"Environment variables not persisting
Solution:
# Add to shell config file (~/.bashrc or ~/.zshrc)
echo 'export LANGSMITH_API_KEY="your_key"' >> ~/.bashrc
echo 'export LANGSMITH_PROJECT="your_project"' >> ~/.bashrc
# Reload shell config
source ~/.bashrc---
Best Practices
1. Regular Health Checks
# Quick check after making changes
langsmith-fetch traces --last-n-minutes 5 --limit 52. Organized Storage
langsmith-debug/
├── sessions/
│ ├── 2025-12-24/
│ └── 2025-12-25/
├── error-cases/
└── performance-tests/3. Document Findings
When you find bugs: 1. Export the problematic trace 2. Save to error-cases/ folder 3. Note what went wrong in a README 4. Share trace ID with team
4. Integration with Development
# Before committing code
langsmith-fetch traces --last-n-minutes 10 --limit 5
# If errors found
langsmith-fetch trace <error-id> --format json > pre-commit-error.json---
Quick Reference
# Most common commands
# Quick debug
langsmith-fetch traces --last-n-minutes 5 --limit 5 --format pretty
# Specific trace
langsmith-fetch trace <trace-id> --format pretty
# Export session
langsmith-fetch traces ./debug-session --last-n-minutes 30 --limit 50
# Find errors
langsmith-fetch traces --last-n-minutes 30 --limit 50 --format raw | grep -i error
# With metadata
langsmith-fetch traces --limit 10 --include-metadata---
Resources
- LangSmith Fetch CLI: https://github.com/langchain-ai/langsmith-fetch
- LangSmith Studio: https://smith.langchain.com/
- LangChain Docs: https://docs.langchain.com/
- This Skill Repo: https://github.com/OthmanAdi/langsmith-fetch-skill
---
Notes for Claude
- Always check if
langsmith-fetchis installed before running commands - Verify environment variables are set
- Use
--format prettyfor human-readable output - Use
--format jsonwhen you need to parse and analyze data - When exporting sessions, create organized folder structures
- Always provide clear analysis and actionable insights
- If commands fail, help troubleshoot configuration issues
---
Version: 0.1.0 Author: Ahmad Othman Ammar Adi License: MIT Repository: https://github.com/OthmanAdi/langsmith-fetch-skill
# OS Files
.DS_Store
Thumbs.db
desktop.ini
# Editor directories and files
.vscode/
.idea/
*.swp
*.swo
*~
# Logs
*.log
logs/
# Temporary files
*.tmp
*.temp
.cache/
# Debug exports (if users run commands locally)
langsmith-debug/
debug-sessions/
*.json.bak
# Python (if users test scripts)
__pycache__/
*.py[cod]
*$py.class
.Python
venv/
env/
*.egg-info/
# Node (if future tooling is added)
node_modules/
package-lock.json
yarn.lock
# Environment variables (security)
.env
.env.local
.env.*.local
Changelog
All notable changes to the LangSmith Fetch Skill will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
---
[0.1.0] - 2025-12-24
🎉 Initial Release
The first AI observability & debugging skill for Claude Code!
Added
Core Features
- ✅ Automatic debugging - Claude autonomously fetches and analyzes LangSmith traces
- ✅ Four core workflows:
1. Quick Debug Recent Activity (5-minute traces) 2. Deep Dive Specific Trace (by trace ID) 3. Export Debug Session (save to organized folders) 4. Error Detection (find and categorize failures)
Skill Capabilities
- ✅ Fetch recent traces with time-based filtering
- ✅ Analyze specific trace by ID
- ✅ Export sessions to files with metadata
- ✅ Detect and categorize errors
- ✅ Review tool calls and results
- ✅ Check memory operations (LTM)
- ✅ Track token usage and costs
- ✅ Compare agent performance
- ✅ Identify bottlenecks
- ✅ Suggest optimizations
Documentation
- ✅ Complete
SKILL.mdwith YAML frontmatter and detailed workflows - ✅ Professional
README.mdwith installation and usage guides - ✅
CONTRIBUTING.mdwith contribution guidelines and templates - ✅ MIT
LICENSE - ✅ This
CHANGELOG.md
Examples & Guides
- ✅ Response format examples for each workflow
- ✅ Common use cases (Agent Not Responding, Wrong Tool Called, Memory Not Working, Performance Issues)
- ✅ Troubleshooting guide
- ✅ Best practices for debugging
- ✅ Quick reference command guide
Integration
- ✅ Seamless Claude Code integration
- ✅ Model-invoked activation (Claude decides when to use)
- ✅ PowerShell and Bash command examples
- ✅ Environment variable setup guide
Requirements
langsmith-fetchCLI (>= 0.1.0)LANGSMITH_API_KEYenvironment variableLANGSMITH_PROJECTenvironment variable
Activation Keywords
Claude automatically activates this skill when users mention:
- "Debug my agent"
- "What went wrong?"
- "Show me recent traces"
- "Check for errors"
- "Analyze memory operations"
- "Review agent performance"
- "What tools were called?"
Authors
- Ahmad Othman Ammar Adi - Initial work - @OthmanAdi
Acknowledgments
- LangChain team for the excellent
langsmith-fetchCLI - Anthropic for Claude Code and the Skills framework
- The AI observability community
---
[Unreleased]
Planned Features
- Enhanced multi-agent orchestration debugging
- Cost tracking and optimization suggestions
- Performance profiling workflows
- Custom export formats
- Team collaboration features
---
Note: This is the first AI observability skill for Claude Code. We're excited to see how the community uses and improves it!
For full details on each release, see the Releases page.
Contributing to LangSmith Fetch Skill
Thank you for your interest in contributing! This is the first AI observability skill for Claude Code, and we welcome contributions from the community.
🎯 Ways to Contribute
- 🐛 Report bugs and issues
- 💡 Suggest new features or improvements
- 📝 Improve documentation
- 🔧 Submit bug fixes
- ✨ Add new debugging workflows
- 🎓 Share usage examples
- 📊 Add analysis patterns
---
🚀 Getting Started
1. Fork the Repository
Click the "Fork" button at the top of this repository.
2. Clone Your Fork
git clone https://github.com/YOUR_USERNAME/langsmith-fetch-skill.git
cd langsmith-fetch-skill3. Create a Branch
git checkout -b feature/your-feature-name
# or
git checkout -b fix/your-bug-fix---
📝 Making Changes
For SKILL.md Updates
When modifying SKILL.md:
1. Test thoroughly - Ensure Claude correctly interprets your changes 2. Keep it focused - Don't try to do everything in one update 3. Maintain structure - Follow the existing format 4. Add examples - Show how new features work 5. Update version - Bump version number if significant changes
Testing checklist:
- [ ] YAML frontmatter is valid
- [ ] Description clearly states when to use the skill
- [ ] Instructions are clear and actionable
- [ ] Examples work as shown
- [ ] Commands run successfully
- [ ] Claude activates skill appropriately
For Documentation Updates
When updating README or other docs:
1. Be clear and concise 2. Include code examples 3. Keep formatting consistent 4. Check for typos 5. Verify all links work
---
🧪 Testing Your Changes
Local Testing
1. Install the skill locally:
mkdir -p ~/.claude/skills/langsmith-fetch-test
cp SKILL.md ~/.claude/skills/langsmith-fetch-test/2. Test with Claude Code:
- Ask debugging questions
- Verify Claude uses the skill
- Check command execution
- Validate output format
3. Test edge cases:
- No traces available
- Invalid API keys
- Network failures
- Large datasets
Test Scenarios
Try these scenarios:
✅ "Debug my agent"
✅ "Show me recent traces"
✅ "What went wrong with trace abc123?"
✅ "Export my debug session"
✅ "Find errors in the last hour"
✅ "Why is my agent slow?"---
📋 Pull Request Process
1. Commit Your Changes
git add .
git commit -m "feat: Add performance analysis workflow"Commit message format:
feat:New featurefix:Bug fixdocs:Documentation updaterefactor:Code refactoringtest:Testing updateschore:Maintenance tasks
2. Push to Your Fork
git push origin feature/your-feature-name3. Create Pull Request
1. Go to the original repository 2. Click "New Pull Request" 3. Select your branch 4. Fill out the PR template:
## Description
Brief description of changes
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Documentation update
- [ ] Breaking change
## Testing
- [ ] Tested locally
- [ ] Works with Claude Code
- [ ] Examples verified
- [ ] Documentation updated
## Screenshots (if applicable)
Add screenshots showing the feature in action4. Wait for Review
- Maintainers will review your PR
- Address any requested changes
- Once approved, your PR will be merged!
---
🎨 Style Guidelines
SKILL.md Style
- Clear headings - Use descriptive section titles
- Code blocks - Always use proper syntax highlighting
- Concise - Get to the point quickly
- Examples - Show, don't just tell
- Formatting - Use bullet points and tables
Code Examples
# Good - Clear, commented, complete
langsmith-fetch traces --last-n-minutes 5 --limit 5 --format pretty
# Bad - No context, unclear purpose
langsmith-fetch traces -l 5Documentation Style
- Use active voice ("Run this command" not "This command should be run")
- Be specific ("Set LANGSMITH_API_KEY" not "Configure environment")
- Include why not just how
- Add examples for complex concepts
---
💡 Feature Suggestions
What We're Looking For
High Priority:
- Additional debugging patterns
- Error categorization improvements
- Performance analysis enhancements
- Multi-agent orchestration insights
Medium Priority:
- Cost tracking features
- Integration examples
- Visualization suggestions
- Automation workflows
Nice to Have:
- Advanced filtering
- Custom export formats
- Team collaboration features
- Analytics dashboards
Suggesting Features
Create an issue with:
## Feature Request: [Feature Name]
**Problem:**
What problem does this solve?
**Proposed Solution:**
How should it work?
**Alternatives Considered:**
What other approaches did you consider?
**Use Cases:**
When would users use this?
**Example:**
Show what it would look like---
🐛 Reporting Bugs
Before Reporting
1. Search existing issues - Maybe it's already reported 2. Test with latest version - Update and try again 3. Check configuration - Verify environment variables 4. Try minimal example - Isolate the problem
Bug Report Template
## Bug Report: [Bug Title]
**Description:**
Clear description of the bug
**To Reproduce:**
1. Step 1
2. Step 2
3. See error
**Expected Behavior:**
What should happen?
**Actual Behavior:**
What actually happens?
**Environment:**
- OS: [e.g., macOS 14.1]
- Claude Code Version: [e.g., 1.2.3]
- langsmith-fetch Version: [e.g., 0.3.1]
- Python Version: [e.g., 3.11]
**Additional Context:**
Screenshots, logs, traces, etc.---
📚 Resources for Contributors
Learning Materials
Community
- GitHub Issues: For bugs and feature requests
- GitHub Discussions: For questions and ideas
- Twitter: @othmanadi (coming soon)
---
✅ Contribution Checklist
Before submitting:
- [ ] Code follows style guidelines
- [ ] Tested locally with Claude Code
- [ ] Documentation updated
- [ ] Examples work as shown
- [ ] Commit messages are clear
- [ ] PR description is complete
- [ ] No breaking changes (or clearly documented)
---
🎓 First-Time Contributors
New to open source? Welcome! Here's how to start:
1. Start small - Fix typos, improve docs 2. Ask questions - No question is too basic 3. Learn by doing - Pick a "good first issue" 4. Be patient - Reviews take time 5. Have fun! - This is a learning experience
Good first issues:
- Documentation improvements
- Adding usage examples
- Fixing typos
- Improving error messages
---
🏆 Recognition
Contributors will be:
- Listed in CONTRIBUTORS.md (coming soon)
- Thanked in release notes
- Recognized in README
- Part of building the first AI observability skill!
---
📞 Questions?
- Technical: Open an issue
- General: Start a discussion
- Private: Email (coming soon)
---
📜 Code of Conduct
Our Pledge
We are committed to providing a friendly, safe, and welcoming environment for all contributors.
Our Standards
Positive behaviors:
- Being respectful and inclusive
- Welcoming newcomers
- Giving and receiving constructive feedback
- Focusing on what's best for the community
Unacceptable behaviors:
- Harassment or discrimination
- Trolling or insulting comments
- Publishing others' private information
- Any unprofessional conduct
Enforcement
Report issues to maintainers. We will review and take appropriate action.
---
Thank you for contributing to the first AI observability skill for Claude Code! 🎉
Together, we're making agent debugging easier for everyone!
MIT License
Copyright (c) 2025 Ahmad Othman Ammar Adi
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
<div align="center"> <img src="media/banner.png" alt="langsmith-fetch" width="100%"> </div>
🔍 LangSmith Fetch Skill for Claude Code
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.
  
---
🎯 What It Does
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:
- "Debug my agent"
- "What went wrong?"
- "Show me recent traces"
- "Why is my agent slow?"
Claude will automatically fetch traces, analyze execution patterns, identify errors, and provide actionable insights!
---
✨ Features
- 🐛 Automatic Debugging - Claude fetches and analyzes traces autonomously
- 🔍 Error Detection - Identifies failures and root causes
- 📊 Performance Analysis - Tracks execution time and token usage
- 💾 Memory Operations - Checks LTM recall/store operations
- 🛠️ Tool Call Analysis - Reviews which tools were called and why
- 📁 Session Export - Saves debugging sessions for later review
- 🤝 Multi-Agent Support - Debugs orchestration decisions
---
🚀 Quick Start
1. Install Prerequisites
# Install langsmith-fetch CLI
pip install langsmith-fetch2. Configure Environment
# 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/
3. Install the Skill
npx skills add OthmanAdi/langsmith-fetch-skill --skill langsmith-fetch -gWorks with Claude Code, Cursor, Codex, Gemini CLI, and 40+ agents supporting the Agent Skills spec.
<details> <summary><strong>📦 Alternative Install Methods</strong></summary>
Option A: Personal Skill (Just for you)
mkdir -p ~/.claude/skills/langsmith-fetch
curl -o ~/.claude/skills/langsmith-fetch/SKILL.md https://raw.githubusercontent.com/OthmanAdi/langsmith-fetch-skill/main/SKILL.mdOption B: Project Skill (Share with team)
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</details>
4. Use with Claude
Open Claude Code and ask:
Debug my agent - what happened in the last 5 minutes?Claude will automatically use this skill! 🎉
---
💡 Usage Examples
Example 1: Quick Debug
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.Example 2: Error Investigation
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 resultsExample 3: Performance Analysis
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---
🎓 How It Works
1. Claude listens for debugging-related questions 2. Automatically activates this skill when appropriate 3. Runs langsmith-fetch commands to get trace data 4. Analyzes execution patterns, errors, and performance 5. Presents insights in human-readable format
---
📚 Capabilities
✅ What Claude Can Do
- Fetch recent traces (last N minutes)
- Analyze specific trace by ID
- Export debugging sessions to files
- Detect and categorize errors
- Review tool calls and results
- Check memory operations (LTM)
- Track token usage and costs
- Compare agent performance
- Identify bottlenecks
- Suggest optimizations
🔧 Supported Commands
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---
🛠️ Configuration
Environment Variables
Required:
LANGSMITH_API_KEY # Your LangSmith API key
LANGSMITH_PROJECT # Your project nameOptional:
LANGCHAIN_ENDPOINT # Custom endpoint (default: https://api.smith.langchain.com)Making Variables Persistent
Add to ~/.bashrc or ~/.zshrc:
echo 'export LANGSMITH_API_KEY="your_key"' >> ~/.bashrc
echo 'export LANGSMITH_PROJECT="your_project"' >> ~/.bashrc
source ~/.bashrc---
🔍 Troubleshooting
"No traces found"
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=trueSkill not activating
Fix: 1. Ensure SKILL.md is in ~/.claude/skills/langsmith-fetch/ 2. Restart Claude Code 3. Use specific trigger phrases: "debug my agent", "show traces"
Command not found
Fix:
# Verify langsmith-fetch is installed
pip list | grep langsmith-fetch
# Reinstall if needed
pip install --upgrade langsmith-fetch---
🤝 Contributing
We welcome contributions! See CONTRIBUTING.md for guidelines.
Ideas for contributions:
- Additional analysis workflows
- More debugging patterns
- Performance optimization tips
- Better error categorization
- Integration examples
---
📖 Resources
- LangSmith Fetch CLI: https://github.com/langchain-ai/langsmith-fetch
- LangSmith Studio: https://smith.langchain.com/
- LangChain Docs: https://docs.langchain.com/
- Claude Code Skills: https://code.claude.com/docs/en/skills
- Awesome Claude Skills: https://github.com/ComposioHQ/awesome-claude-skills
---
📝 License
MIT © Ahmad Othman Ammar Adi
---
👨💻 Author
Ahmad Othman Ammar Adi
- 🏢 AI Agents Orchestrator at migRaven
- 🌐 Website: othmanadi.com
- 💼 LinkedIn: codingwithadi
- 🐙 GitHub: @OthmanAdi
---
🌟 Show Your Support
If this skill helps you debug your agents, please:
- ⭐ Star this repository
- 🐛 Report issues you find
- 💡 Suggest improvements
- 🤝 Contribute enhancements
- 📢 Share with the community
---
🔗 Related Projects
- PromptFusion - Semantic weighted prompt composition for AI agents
---
📊 Stats
- Version: 0.1.0
- Status: Active Development
- First Released: December 2025
- Category: AI Observability & Debugging
---
🎄 Season's Greetings
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](https://github.com/OthmanAdi) for the AI debugging community