/ ディレクトリ / プレイグラウンド / 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 は Claude Desktop と同じ mcpServers スキーマを使用。プロジェクト設定はグローバルより優先。

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
    }
  }
}

Cline サイドバーの MCP Servers アイコンをクリックし、"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 はマップではなくサーバーオブジェクトの配列を使用。

~/.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と組み合わせて10倍の力を

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

その他

リソース

📖 GitHub の公式 README を読む

🐙 オープンな issue を見る

🔍 400以上のMCPサーバーとSkillsを見る