langsmith-fetch — Claude Code skill for LangSmith traces
Pulls LangSmith traces into local files so you can see which tools an agent called and what came back.
npx skills add langchain-ai/lca-skills --skill langsmith-fetch -a claude-codeWhat langsmith-fetch does
The skill walks your agent through the langsmith-fetch CLI. It starts by locating the .env file that holds the key, then fetches recent traces or a single one by ID into a folder you pick.
Two things have to be in place: langsmith-fetch in your project dependencies and LANGSMITH_API_KEY in .env. No key, no traces. Every command runs with --env-file <path-to-.env>; the project comes from LANGSMITH_PROJECT unless you pass --project-uuid.
Output comes in three shapes. --format pretty is for reading, --format json and --format raw are for parsing or piping. Add --include-metadata and you also get timing, token counts and cost. From there the agent opens the saved files and answers the useful questions: what was called, what it returned, did that match what you expected.
What it helps with
- dump recent agent traces into a local folder
- inspect one trace by ID when you know which run broke
- check which tools the agent called and what they returned
- compare timing, tokens and cost for a trace
- locate the
.envholding the LangSmith key in an unfamiliar repo
Example prompts for the agent
- find the .env with LANGSMITH_API_KEY and fetch the last 10 traces into ./traces
- show trace <trace-id> with metadata: timing, tokens, cost
- export the project traces as json and tell me which tools failed
How to install langsmith-fetch
1Skills CLI (Vercel)
npx skills add langchain-ai/lca-skills --skill langsmith-fetch -a claude-code2Manually: put the files in place
~/.claude/skills/langsmith-fetch/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/langsmith-fetch/
1Skills CLI (Vercel)
npx skills add langchain-ai/lca-skills --skill langsmith-fetch -a codex2Manually: put the files in place
.agents/skills/langsmith-fetch/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add langchain-ai/lca-skills --skill langsmith-fetch -a cursor2Manually: put the files in place
.cursor/skills/langsmith-fetch/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install langchain-ai/lca-skills langsmith-fetch2Manually: put the files in place
.github/skills/langsmith-fetch/SKILL.md1Skills CLI (Vercel)
npx skills add langchain-ai/lca-skills --skill langsmith-fetch -a gemini-cli2Platform CLI
gemini skills install https://github.com/langchain-ai/lca-skills --path skills/langsmith-fetchManually: put the files in place
.devin/skills/langsmith-fetch/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add langchain-ai/lca-skills --skill langsmith-fetch -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about langsmith-fetch
How do I install langsmith-fetch in Claude?
Run npx skills add langchain-ai/lca-skills --skill langsmith-fetch -a claude-code. The skill lands at ~/.claude/skills/langsmith-fetch/SKILL.md.
What does langsmith-fetch do?
It fetches LangSmith traces through the CLI and saves them locally so you can review agent behavior: tool calls, responses, conversation history.
What does the skill need to work?
langsmith-fetch in your project dependencies and LANGSMITH_API_KEY in .env. Commands run with --env-file <path-to-.env>.