weave-instrument
Skill by wandb
Adds Weave (Weights & Biases) tracing to Python or TypeScript/Node LLM and agent code. It helps choose between OTEL auto-instrumentation and the Session SDK agent-logging APIs, then checks that traces arrive.
Install weave-instrument
Built from the published package, never by AI.
git clone --depth 1 https://github.com/wandb/weave /tmp/weave && mkdir -p ~/.claude/skills && cp -r /tmp/weave/skills/weave-instrument ~/.claude/skills/weave-instrumentRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/wandb/weave /tmp/weave && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/weave/skills/weave-instrument ~/.gemini/antigravity-cli/skills/weave-instrumentAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill adds Weave (Weights & Biases) observability to an LLM or agent codebase in Python or TypeScript/Node. It walks the assistant through installing the package, calling weave.init(), and setting up authentication. The user keeps their own API key, and the assistant never reads or writes it.
The skill helps choose between OTEL auto-instrumentation, which captures recognized libraries with weave.init() alone, and the explicit Session SDK. The Session SDK wraps an agent's own structure with Turn, LLM, Tool and SubAgent spans, and it works for custom loops too. Agent-shaped traces appear in the Agents tab and flat call traces in the Calls tab. It is aimed at developers who want to trace agents, chatbots, RAG pipelines or tool calls.
Written from the project's SKILL.md and checked against it.
What it can do
- weave.init setupAdds a single weave.init call at each real entry point, with the project URL shown up front.
- Authentication guidanceTells the user how to set WANDB_API_KEY or log in, without handling the key itself.
- Strategy selectionChooses between OTEL auto-instrumentation and the Session SDK based on the code's libraries and shape.
- Session SDK mappingMaps an agent loop onto Turn, LLM, Tool and SubAgent spans without changing program behavior.
- Raw OTEL exportCovers adding Weave's exporter to an app's own TracerProvider when it already emits OTel spans.
- Trace verificationChecks that spans arrive, including operation names such as invoke_agent, chat and execute_tool.
What you need
- Python or Node.js runtime
- A Weights & Biases account and API key
- The weave package (pip install weave or npm install weave)
- weave 0.52.42 or newer for the Python Session SDK
Try asking
- Add Weave tracing to my agent loop in agent.py
- Get my agent into the Weave Agents tab
- Trace my tool calls with the Weave Session SDK
Good to know
- Some features, such as set_attributes and add_event, need a newer Python build of Weave.
- If the app installs its own global TracerProvider, weave.init() will not export to Weave.
- Without auth, the Weave calls are no-ops, so traces will not appear.
- Node ESM projects need the --import=weave/instrument preload.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: skills/weave-instrument/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to weave-instrument
All alternatives →Aligns a Qwen Code feature with a Codex or Claude Code reference agent. It runs both under the same scenario, captures HTTP and terminal traces, and compares them until behavior matches.
Searches, views, creates, updates, and deletes the user's Google Contacts from an AI assistant. It is for people who want to manage their address book through conversation. A one-time Google connect is required before it returns data.
Guides an AI assistant on error handling choices. It covers when to use Result, Option, ? propagation, unwrap, expect and panic, plus anyhow and thiserror.
Caveman is an agent skill that makes an AI assistant reply in a terse style. It cuts filler and keeps technical facts, code, commands and errors exact. It is built for users who want shorter, cheaper replies.
docs-sync audits or updates English SDK documentation against the requested implementation scope. It is for maintainers who want docs to match main branch features, configuration options, and defaults.
Guides an AI assistant through setting up and running monorepos with pnpm workspaces, Turborepo and Nx. Aimed at developers who need faster builds, shared code and managed dependencies across multiple packages.
Compare with agent-reproduce-align, google_contacts or m06-error-handling
weave-instrument: common questions
What is the difference between the Agents and Calls tabs in Weave?
Agent-shaped spans land in the Agents tab, and flat call traces land in the Calls tab. The skill chooses the approach based on the shape the user wants.
Does this skill need my Weights & Biases API key?
The user must authenticate in their own terminal. The skill may check that a key is reachable, but it never reads or prints the key's value.
Can I use this with a custom agent loop or an unfamiliar framework?
Yes. The source says the Session SDK is the universal path and works for any agent, including custom loops and frameworks Weave does not map.
How do I install weave-instrument?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is weave-instrument free?
The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.
Is weave-instrument safe to use?
It scores 81 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to weave-instrument?
Similar skills: agent-reproduce-align, google_contacts, m06-error-handling, caveman.
