/ Каталог / Песочница / langsmith-fetch-skill
● Сообщество OthmanAdi ⚡ Сразу

langsmith-fetch-skill

автор 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.

Зачем использовать

Ключевые функции

Живое демо

Как выглядит на практике

langsmith-fetch-skill.replay ▶ готово
0/0

Установка

Выберите клиент

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "langsmith-fetch-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/OthmanAdi/langsmith-fetch-skill",
        "~/.claude/skills/langsmith-fetch-skill"
      ],
      "_inferred": true
    }
  }
}

Откройте Claude Desktop → Settings → Developer → Edit Config. Перезапустите после сохранения.

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "langsmith-fetch-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/OthmanAdi/langsmith-fetch-skill",
        "~/.claude/skills/langsmith-fetch-skill"
      ],
      "_inferred": true
    }
  }
}

Cursor использует ту же схему mcpServers, что и Claude Desktop. Конфиг проекта приоритетнее глобального.

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "langsmith-fetch-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/OthmanAdi/langsmith-fetch-skill",
        "~/.claude/skills/langsmith-fetch-skill"
      ],
      "_inferred": true
    }
  }
}

Щёлкните значок MCP Servers на боковой панели Cline, затем "Edit Configuration".

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "langsmith-fetch-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/OthmanAdi/langsmith-fetch-skill",
        "~/.claude/skills/langsmith-fetch-skill"
      ],
      "_inferred": true
    }
  }
}

Тот же формат, что и Claude Desktop. Перезапустите Windsurf для применения.

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "langsmith-fetch-skill",
      "command": "git",
      "args": [
        "clone",
        "https://github.com/OthmanAdi/langsmith-fetch-skill",
        "~/.claude/skills/langsmith-fetch-skill"
      ]
    }
  ]
}

Continue использует массив объектов серверов, а не map.

~/.config/zed/settings.json
{
  "context_servers": {
    "langsmith-fetch-skill": {
      "command": {
        "path": "git",
        "args": [
          "clone",
          "https://github.com/OthmanAdi/langsmith-fetch-skill",
          "~/.claude/skills/langsmith-fetch-skill"
        ]
      }
    }
  }
}

Добавьте в context_servers. Zed перезагружается автоматически.

claude mcp add langsmith-fetch-skill -- git clone https://github.com/OthmanAdi/langsmith-fetch-skill ~/.claude/skills/langsmith-fetch-skill

Однострочная команда. Проверить: claude mcp list. Удалить: claude mcp remove.

Сценарии использования

Реальные сценарии: langsmith-fetch-skill

Diagnose a slow agent without opening LangSmith UI

👤 LangChain/LangGraph devs ⏱ ~20 min intermediate

Когда использовать: An agent that used to be snappy is now slow; you want root cause.

Предварительные требования
  • LangSmith API key — smith.langchain.com -> Settings -> API Keys
  • Skill installed — git clone https://github.com/OthmanAdi/langsmith-fetch-skill ~/.claude/skills/langsmith-fetch-skill
Поток
  1. Ask Claude to diagnose
    Why is my agent <name> slow? Pull the last 20 traces from LangSmith and find the hotspot.✓ Скопировано
    → Skill fetches traces; reports latency by step
  2. Drill in
    Focus on trace <id> — break down tool-call times.✓ Скопировано
    → Per-tool latency with the outlier called out

Итог: A specific step to optimize, not a hunch.

Подводные камни
  • Optimizing the average when tail latency is the problem — Ask for p95/p99 specifically
Сочетать с: filesystem

Root-cause an agent failure from a trace id

👤 Anyone running LangGraph in production ⏱ ~15 min intermediate

Когда использовать: A user reported an error; you have the trace id.

Поток
  1. Fetch + analyze
    Debug trace <id>. What was the immediate error, what's the root cause in the graph?✓ Скопировано
    → Error step + upstream decision that led to it

Итог: A fix targeting the actual decision point, not the symptom.

Find which node burns the most tokens

👤 Teams optimizing LLM spend ⏱ ~30 min intermediate

Когда использовать: Monthly review of agent spend.

Поток
  1. Aggregate token usage
    Across last 7 days' traces, rank graph nodes by total token usage.✓ Скопировано
    → Ranked table with % share
  2. Propose tightening
    For the top 3, propose prompt-compression or model downgrade options.✓ Скопировано
    → Targeted opt list

Итог: Measurable spend reduction without chasing tiny savings.

Комбинации

Сочетайте с другими MCP — эффект x10

langsmith-fetch-skill + filesystem

Save exports alongside the agent code for lineage

Export the debugging session to debugging/traces/<date>.json.✓ Скопировано
langsmith-fetch-skill + github

Attach trace summary to a bug report

Summarize trace <id> and post as comment on GitHub issue #42.✓ Скопировано

Инструменты

Что предоставляет этот MCP

ИнструментВходные данныеКогда вызыватьСтоимость
fetch_recent project, limit Broad diagnosis LangSmith quota
fetch_trace trace_id Deep dive on one run LangSmith quota
analyze_failures traces Post-fetch analysis 0
export_session traces Archive for later 0

Стоимость и лимиты

Во что обходится

Квота API
LangSmith: depends on plan; Studio has generous quotas
Токенов на вызов
Low — traces are structured
Деньги
Free skill; LangSmith free tier covers most devs
Совет
Use fetch_recent with a narrow window, not full history

Безопасность

Права, секреты, радиус поражения

Минимальные скоупы: LangSmith: read on your project(s)
Хранение учётных данных: LANGCHAIN_API_KEY in env
Исходящий трафик: Only to LangSmith (where the traces already live)
Никогда не давайте: Write to LangSmith — skill only reads

Устранение неполадок

Частые ошибки и исправления

langsmith-fetch: command not found

Install LangSmith CLI or ensure it's on PATH

Проверить: which langsmith-fetch
Empty results

Check project name and time window; traces are project-scoped

Альтернативы

langsmith-fetch-skill в сравнении

АльтернативаКогда использоватьКомпромисс
LangSmith web UIYou prefer clickingNo Claude analysis

Ещё

Ресурсы

📖 Читать официальный README на GitHub

🐙 Открытые задачи

🔍 Все 400+ MCP-серверов и Skills