Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计异常

langsmith-trace-analyzer朗史密斯痕量分析仪

Agent Skill

langsmith-trace-analyzer 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

436

周安装

18

GitHub Stars

94

下载量

143
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:langsmith-trace-analyzer(朗史密斯痕量分析仪)
来源仓库:https://github.com/lubu-labs/langchain-agent-skills
仓库路径:skills/langsmith-trace-analyzer
安装命令:
npx skills add https://github.com/lubu-labs/langchain-agent-skills --skill langsmith-trace-analyzer
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/lubu-labs/langchain-agent-skills --skill langsmith-trace-analyzer

简介

用于查找、检索和筛选相关信息。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

  • 适合根据关键词快速定位候选结果。
  • 通过 GitHub 安装并使用 npx 命令激活。
  • 需确认权限范围和维护状态,注意是否触发联网或命令执行。
  • langsmith-trace-analyzer 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

LangSmith Trace Analyzer

Use this skill to move from raw LangSmith traces to actionable debugging/evaluation insights.

Quick Start

# Install dependencies
uv pip install langsmith langsmith-fetch

# Auth
export LANGSMITH_API_KEY=<your_langsmith_api_key>

Fast workflow

  1. Download traces with scripts/download_traces.py (or scripts/download_traces.ts).
  2. Analyze downloaded JSON with scripts/analyze_traces.py.
  3. Load targeted references only when needed:

- references/filtering-querying.md for query/filter syntax - references/analysis-patterns.md for deeper diagnostics - references/benchmark-analysis.md for benchmark-specific workflows

Decision Guide

  1. Known trace IDs Use langsmith-fetch trace <id> directly, or --trace-ids in downloader scripts.
  2. Need to discover traces first Use LangSmith SDK list_runs/listRuns with filters, then download selected trace IDs.
  3. Need aggregate insights Run analyze_traces.py for summary stats, patterns, and passed-vs-failed comparisons.

Core Workflows

1) Download and organize traces

Python:

uv run skills/langsmith-trace-analyzer/scripts/download_traces.py \
  --project "my-project" \
  --filter "job_id=abc123" \
  --last-hours 24 \
  --limit 100 \
  --output ./traces \
  --organize

TypeScript:

ts-node skills/langsmith-trace-analyzer/scripts/download_traces.ts \
  --project "my-project" \
  --filter "job_id=abc123" \
  --last-hours 24 \
  --limit 100 \
  --output ./traces

Output layout:

traces/
├── manifest.json
└── by-outcome/
    ├── passed/
    ├── failed/
    └── error/
        ├── GraphRecursionError/
        ├── TimeoutError/
        └── DaytonaError/

Notes:

  • Python script supports --organize/--no-organize.
  • Both scripts use SDK filtering plus langsmith-fetch for full trace payload export.

2) Analyze downloaded traces

# Markdown report
uv run skills/langsmith-trace-analyzer/scripts/analyze_traces.py ./traces --output report.md

# JSON output
uv run skills/langsmith-trace-analyzer/scripts/analyze_traces.py ./traces --json

# Compare passed vs failed (expects by-outcome folders)
uv run skills/langsmith-trace-analyzer/scripts/analyze_traces.py ./traces --compare --output comparison.md

The analyzer reports:

  • message/tool-call/token/duration summaries
  • top tool usage
  • anomaly patterns (high message count, repeated tools, quick failures)
  • passed-vs-failed metric deltas when comparison is enabled

3) Query traces correctly (SDK)

Use official LangSmith run filter syntax via filter and/or start_time:

from datetime import datetime, timedelta, timezone
from langsmith import Client

client = Client()

start = datetime.now(timezone.utc) - timedelta(hours=24)
filter_query = 'and(eq(metadata_key, "job_id"), eq(metadata_value, "abc123"))'

runs = client.list_runs(
    project_name="my-project",
    is_root=True,
    start_time=start,
    filter=filter_query,
)

For TypeScript:

import { Client } from "langsmith";

const client = new Client();
for await (const run of client.listRuns({
  projectName: "my-project",
  isRoot: true,
  filter: 'and(eq(metadata_key, "job_id"), eq(metadata_value, "abc123"))',
})) {
  console.log(run.id, run.status);
}

Accuracy and Schema Notes

  • LangSmith run fields are commonly top-level (status, error, total_tokens, start_time, end_time).
  • Some exported traces also include nested metadata (metadata or extra.metadata) and/or messages.
  • analyze_traces.py is resilient to multiple payload shapes, including raw array payloads.
  • For full conversation content, prefer downloaded trace payloads over bare list_runs results.

Troubleshooting

IssueLikely CauseAction
LANGSMITH_API_KEY missingAuth not configuredexport LANGSMITH_API_KEY=<your_langsmith_api_key>
No runs returnedWrong project/filter/time rangeVerify project name and filter syntax
Empty/partial message arraysRun schema differs or incomplete dataUse downloaded trace JSON and inspect status/error fields
JSON parse error on downloaded filesBad/incomplete exportRe-download trace; use --format raw paths in scripts
Re-downloading same traces repeatedlyExisting files in nested foldersUse current scripts (they check existing files across output tree)

Safety for Open Source

  • Do not commit downloaded trace artifacts (manifest.json, trace JSON dumps) unless sanitized.
  • Trace payloads can contain user prompts, outputs, metadata, and other sensitive runtime data.
  • Keep this skill repository focused on scripts/templates, not production trace exports.

Resources

scripts/

  • scripts/download_traces.py: Python downloader + organizer
  • scripts/download_traces.ts: TypeScript downloader + organizer
  • scripts/analyze_traces.py: Offline analysis and reporting

references/

  • references/filtering-querying.md: LangSmith query/filter examples
  • references/analysis-patterns.md: Diagnostic patterns and heuristics
  • references/benchmark-analysis.md: Benchmark-oriented analysis

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.61%
按下载量换算52

Claude

28.39%
按下载量换算41

Cursor

21.28%
按下载量换算30

Gemini CLI

9.36%
按下载量换算13

安全审计

Gen Agent Trust Hub

未通过

Socket

通过

Snyk

可疑

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills