layerlens

A connection to LayerLens, a service for scoring AI responses and agent runs against quality rules called judges.

In plain words
What is it for?
Use it to upload execution traces, create evaluation criteria for qualities such as safety or accuracy, run evaluations, and retrieve results.
Why use it?
It helps turn a subjective review of an AI output into a recorded pass-or-fail result, score, and explanation.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/layerlens/stratix-python/layerlens_skill
Any agent
npx skills add LayerLens/stratix-python --skill layerlens_skill
Clone the repo
git clone --depth 1 https://github.com/LayerLens/stratix-python

Made for: Claude Code, Codex.

Per session 31 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 609 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00031 $0.00609
Opus 5 $0.00015 $0.00304
Sonnet 5 $0.00006 $0.00122
Haiku 4.5 $0.00003 $0.00061

Measured 2d ago against content hash f552b7d4ba39, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

layerlens 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 2d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/evaluate.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.

samples/openclaw/layerlens_skill/SKILL.md · 93 lines

How it starts

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

LayerLens Skill for OpenClaw

This skill lets OpenClaw interact with the LayerLens AI evaluation platform. Use it to upload traces of agent executions, create quality judges, run evaluations, and retrieve scored results.

Prerequisites

Install the LayerLens Python SDK:

pip install layerlens --index-url https://sdk.layerlens.ai/package

Set your API key:

export LAYERLENS_STRATIX_API_KEY=your-api-key

What This Skill Does

When triggered, this skill:

  1. Uploads a trace -- captures the input (task) and output (agent response) as a LayerLens trace with metadata about the execution context.
  2. Creates a judge -- defines an evaluation rubric based on the requested quality dimension (safety, accuracy, helpfulness, etc.).
  3. Runs an evaluation -- scores the trace against the judge criteria.
  4. Returns results -- provides a pass/fail verdict, numeric score, and reasoning explanation.

Usage

Ask OpenClaw to evaluate an output:

Evaluate the last response for safety using LayerLens.
Run a quality check on this output: "The capital of France is Berlin."
Upload a trace of our conversation and score it for helpfulness.

Evaluation Script

The skill delegates to scripts/evaluate.py, which accepts input via stdin or command-line arguments:

# Via arguments
python scripts/evaluate.py --input "What is 2+2?" --output "2+2 is 4." --goal "factual accuracy"

# Via stdin (JSON)
echo '{"input": "What is 2+2?", "output": "2+2 is 4.", "goal": "factual accuracy"}' | python scripts/evaluate.py

SDK Reference

The skill uses these LayerLens SDK methods:

  • client.traces.upload(path) -- upload a JSONL trace file
  • client.judges.create(name=, evaluation_goal=) -- create an evaluation judge
  • client.trace_evaluations.create(trace_id=, judge_id=) -- run an evaluation
  • client.trace_evaluations.get_results(evaluation_id) -- retrieve results

See the LayerLens Python SDK documentation for full API details.

Read the full file on GitHub · 93 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. 2d ago First seen · 93 lines · 31 tokens per session scan A f552b7d4ba39

Subscribe to this mod's changes

layerlens is a skill published in the GitHub repository LayerLens/stratix-python (260 stars, last pushed 4d ago), licensed Apache-2.0. It adds 31 tokens to every session and 609 once invoked, about $0.0002 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.