add-lens

add-lens is a skill for Claude Code from redis/agent-skills. It costs 161 tokens per session (3,550 once invoked), scanned A, original, MIT.

A tracing connection records each AI agent turn in the Redis Iris Lens interface. A trace can include model calls, token use, tool calls, memory, document retrievals, and which retrieved items were put into the prompt.

In plain words
What is it for?
It is for adding turn-level observability to agents built with supported frameworks or a hand-written loop. It also helps inspect sessions, model calls, tools, memory, and retrievals.
Why use it?
It makes the steps inside an agent turn visible instead of leaving model and tool activity spread across logs or hidden inside a framework.

Skill for Claude Code ✓ vendor

Written for Claude Code: shipped in a Claude Code plugin.

Part of the redis-development plugin — 14 skills, 1 MCP server shipped together

Good fit It is for adding turn-level observability to agents built with supported frameworks or a hand-written loop. It also helps inspect sessions, model calls, tools, memory, and retrievals.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/redis/agent-skills/add-lens
About the project

Redis Agent Skills is Redis's collection of packaged instructions and resources that teach AI coding agents how to work with Redis data structures, connections, search, caching, clustering, security, observability, and agent memory. It is for developers using coding agents to build or troubleshoot Redis-backed applications. The catalogue entries are the project's own agent skills, instructions, and plugin packaging.

redis/agent-skills · 178 stars · on GitHub · redis.io

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 redis/agent-skills --skill add-lens
Clone the repo
git clone --depth 1 https://github.com/redis/agent-skills

Made for: Claude Code.

Or install redis-development, the plugin that ships this one along with the rest of its 14 skills, 1 MCP server.

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 add-lens

README.md
[![agentmods](https://agentmods.dev/badge/skills/redis/agent-skills/add-lens/github.svg)](https://agentmods.dev/skills/redis/agent-skills/add-lens)
Your own site
<a href="https://agentmods.dev/skills/redis/agent-skills/add-lens"><img src="https://agentmods.dev/badge/skills/redis/agent-skills/add-lens/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 add-lens

Your own site · 80×15
<a href="https://agentmods.dev/skills/redis/agent-skills/add-lens"><img src="https://agentmods.dev/badge/skills/redis/agent-skills/add-lens.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 161 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,550 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.
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.00161 $0.03550
Opus 5.5 $0.00064 $0.01420
Sonnet 5.5 $0.00032 $0.00710
Haiku 4.5 $0.00016 $0.00355

Measured 29d ago against content hash a0129a7abfc8, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

add-lens 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 29d ago.

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.

plugins/redis-development/skills/add-lens/SKILL.md · 179 lines

How it starts

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

Add Lens

One trace per agent turn, visible in the Lens UI under the agent's agent_id. Lens runs inside redis-iris; it has no service to provision and no CLI. Two lines at start-up, one turn per message, then close the gaps the agent has. Lens sits next to any other Iris product, or none.

Full reference: Lens (docs/core/lens.md in redis-iris).

1. Discover

Read the project:

  • The turn: where one user message becomes one answer (app.invoke, Runner.run, runner.run_async, agent.run, kickoff, or the handler around a hand-written loop).
  • The ids: where the agent's own name lives, and where each request's session or thread id and user id live. Always set both agent_id and session_id. Every Lens UI view is filtered by agent_id, so a trace without one never shows. Turns are shown grouped by session, so a turn without a session id does not show either (showing turns without a session is an upcoming feature).
  • Start-up: the one place that runs before the first turn (app factory, main, worker boot).
  • The model client: the library that finally calls the model, under any framework. Lens instruments four: openai, anthropic, botocore (Bedrock) and langchain_core. Many frameworks call one of these underneath; confirm in step 2. Any other client (for example google-genai or litellm) records no LLM span and no tokens unless step 6 adds an instrumentor for it.
  • Existing telemetry: opentelemetry, TracerProvider, opentelemetry-instrument, OTEL_* variables, or another LLM instrumentation. Note who installs the global provider and when.
  • The gaps in step 5: .client calls, custom retrieval, thread pools, process hops, short-lived processes.

Then match the shape. It decides who opens the turn:

The agent Turn opened by You add
redis_iris.integrations.langgraph.attach(hooks, graph) attach, on every invoke / stream and async twin, session from configurable.thread_id, user from configurable.user_id lens.init() only
workflows.turn(...) / workflows.aturn(...) workflows.turn, from session= and owner= lens.init() only
LangGraph without attach you lens.turn() around app.invoke / app.ainvoke, thread id as the session
Google ADK, including redis_iris.integrations.adk.attach you: ADK attach does not open one, so before and after would be two traces lens.turn() around runner.run_async
OpenAI Agents SDK you lens.turn() around Runner.run
Pydantic AI, CrewAI, any other framework you lens.turn() around agent.run / kickoff
Plain loop (openai, anthropic, another client) you lens.turn() around the handler for one message, not around one model call

Read the full file on GitHub · 179 lines

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. 29d ago First seen · 179 lines · 161 tokens per session scan A a0129a7abfc8

Subscribe to this mod's changes

add-lens is a skill published in the GitHub repository redis/agent-skills (178 stars, last pushed 28d ago), licensed MIT. It adds 161 tokens to every session and 3,550 once invoked, about $0.0006 per session on Opus 5.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-11-04.

Related

add-lens compared with skills from other repositories

add-lens next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
add-lensredis/agent-skillsSkill17828d agoMITA161Claude Code
implementing-api-rate-limiting-and-throttlingxalgorix/xalgorixSkill1.6kyesterdayApache-2.0A114Claude Code, Codex
redis-jsupstash/redis-jsSkill9895d agoMITA93Claude Code, Codex
redisericrisco/rsc-harnessSkill701yesterdayMITA111Claude Code, Codex
frontmcp-configagentfront/frontmcpSkill154todayApache-2.0A187Claude Code
Docker TestcontainersPramodDutta/qaskillsSkill2531mo agoMITA42Claude Code, Codex
huawei-cloud-mrs-redis-meta-checkhuaweicloud/huaweicloud-skillsSkill59todayMITA167Claude Code, Codex