npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

langsmith-fetch-skill

v0.1.0

Published

Agent skill for debugging LangChain and LangGraph applications by fetching and analyzing LangSmith traces.

Readme

🔍 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.

License: MIT Claude Code LangSmith


🎯 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-fetch

2. 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 -g

Works with Claude Code, Cursor, Codex, Gemini CLI, and 40+ agents supporting the Agent Skills spec.

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.md

Option 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

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 results

Example 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 name

Optional:

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=true

Skill 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


🌟 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 for the AI debugging community