trulens-instrumentation

trulens-instrumentation is a skill for Claude Code, Codex from truera/trulens. It costs 25 tokens per session (3,164 once invoked), scanned A, original, MIT.

A guide for adding TruLens tracing to an application that uses large language models. It records steps such as model calls and framework operations so they can be inspected.

In plain words
What is it for?
Use it to set up tracing, add custom trace sections, improve names and missing context, fix evaluation data problems, and choose what information to record.
Why use it?
It helps reveal what happened inside an AI application when an evaluation fails or a trace is hard to understand.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Good fit Use it to set up tracing, add custom trace sections, improve names and missing context, fix evaluation data problems, and choose what information to record.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/truera/trulens/trulens-instrumentation
About the project

TruLens is an open-source system for tracing and evaluating LLM applications and AI agents. It records each step's inputs, outputs, latency, tokens, and cost, then uses evaluations to find failures and compare application versions.

truera/trulens · 3,547 stars · on GitHub · trulens.org

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add truera/trulens --skill trulens-instrumentation
Clone the repo
git clone --depth 1 https://github.com/truera/trulens

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for trulens-instrumentation

README.md
[![agentmods](https://agentmods.dev/badge/skills/truera/trulens/trulens-instrumentation/github.svg)](https://agentmods.dev/skills/truera/trulens/trulens-instrumentation)
Your own site
<a href="https://agentmods.dev/skills/truera/trulens/trulens-instrumentation"><img src="https://agentmods.dev/badge/skills/truera/trulens/trulens-instrumentation/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for trulens-instrumentation

Your own site · 80×15
<a href="https://agentmods.dev/skills/truera/trulens/trulens-instrumentation"><img src="https://agentmods.dev/badge/skills/truera/trulens/trulens-instrumentation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 25 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,164 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00025 $0.03164
Opus 5 $0.00013 $0.01582
Sonnet 5 $0.00005 $0.00633
Haiku 4.5 $0.00003 $0.00316

Measured 13d ago against content hash 1df6f95b19b9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

trulens-instrumentation scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 13d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (debug_utils.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

src/core/trulens/.agents/skills/trulens-instrumentation/SKILL.md · 443 lines

How it starts

The opening of the file, as written. The whole thing — 443 lines — stays where its author put it; the contents beside it link to each section on GitHub.

TruLens Instrumentation

Instrument your LLM application to capture traces for evaluation and debugging. This skill covers everything from initial setup to iterative improvement of trace quality.

When to Use This Skill

  • Setting up instrumentation for a new app
  • Adding custom spans to framework-wrapped apps
  • Improving trace readability (unclear span names, missing context)
  • Debugging why evaluations aren't working (missing attributes)
  • Optimizing what gets captured for visualization

Part 1: Setup

Instrument your LLM application to capture traces for evaluation and debugging.

Interactive Instrumentation Setup

Let's identify what you need to instrument for visualization and/or evaluation.

Question 1: What framework are you using?

Framework Wrapper Auto-instrumented
LangChain TruChain Chain components, LLM calls
LangGraph TruGraph Graph nodes, @task decorators
LlamaIndex TruLlama / TruLlamaWorkflow Query engines, retrievers, workflows
Custom/Other TruApp Only what you explicitly @instrument()

→ If using a framework, the wrapper handles basic instrumentation automatically. Continue to Question 2 to add custom attributes.


Question 2: What data do you want to capture?

Tell me what's important to track in your app. This could be for:

  • Visualization: Understanding execution flow in the dashboard
  • Evaluation: Feeding data into feedback functions

Common attributes to instrument:

What to Capture Span Type Attributes
User query/input RECORD_ROOT INPUT
Final response RECORD_ROOT OUTPUT
Retrieved documents/chunks RETRIEVAL QUERY_TEXT, RETRIEVED_CONTEXTS
LLM prompts/completions GENERATION (auto-captured by wrappers)
Tool calls TOOL Tool name, arguments, results
Agent reasoning AGENT Plans, decisions
Reranking results RERANKING QUERY_TEXT, INPUT_CONTEXT_TEXTS, TOP_N

Read the full file on GitHub · 443 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 13d ago First seen · 443 lines · 25 tokens per session scan A 1df6f95b19b9

Subscribe to this mod's changes

trulens-instrumentation is a skill published in the GitHub repository truera/trulens (3,547 stars, last pushed today), licensed MIT. It adds 25 tokens to every session and 3,164 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

playground

Author, edit, or iterate on prompts in the Phoenix prompt playground, including running experiments over a dataset. Load before any playground ui. operation call, including single-shot prompt rewrites.

Arize-ai/phoenix · 42 tokens

datasets

Understand what a Phoenix dataset is and reason well about its examples, outputs, splits, and how it feeds evaluators and experiments. Load this whenever a dataset is in view or the user asks what a dataset is, how splits work, what an output "means", or how datasets relate to experiments and evals. This skill governs…

Arize-ai/phoenix · 78 tokens

evaluators

Author or refine a Phoenix evaluator — code or LLM-as-a-judge — that scores a run's output. Trigger when the user wants to create a new evaluator, improve an existing one's logic or rubric, choose labels, or decide what to measure on a dataset or experiment. Do NOT trigger on: (1) manual prompt drafting (use…

Arize-ai/phoenix · 114 tokens

experiments

Run, read, and compare dataset-backed experiments to find evidence that a prompt or pipeline is improving. Trigger when the user wants to iterate over a dataset with experiments, compare experiment runs, read experiment quality/latency/cost, or decide whether a change actually helped. Running a prompt over a dataset…

Arize-ai/phoenix · 165 tokens

ml-expert

Expert-level machine learning, deep learning, model training, and MLOps. Use when the user mentions machine learning, deep learning, neural networks, MLOps, or data science, or when the task involves Machine Learning Fundamentals, Data Preparation, or Model Training.

personamanagmentlayer/pcl · 58 tokens

tracelet-instrument

Instrument an AI agent or LLM app with OpenTelemetry and watch its runs live in tracelet (local DevTools). Use when asked to add tracing/observability to an agent, or to debug what an agent actually did.

jnMetaCode/skillet · 51 tokens