agent-lens: Command for Claude Code

.claude/commands/experiment.md

experiment is a command for Claude Code from dreadnode/agent-lens. It costs 0 tokens per session (3,097 once invoked), scanned A, original, MIT.

An experiment designer and runner for testing how an AI agent behaves across sessions. It creates a harness configuration, runs the sessions, and analyzes the results; a harness is a controlled setup for repeatable tests.

In plain words
What is it for?
Use it to test memory reading and writing, tool use, delegation, hallucinations, or other agent behaviors across selected repositories and session types.
Why use it?
It removes the need to manually design session layouts, memory tests, prompts, and repetitions. It also helps compare isolated, chained, or forked conversations and measure variation.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: mentions subagents; mentions Claude Code.

This is dreadnode/agent-lens's own configuration. It tells Claude Code how to work on agent-lens itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything agent-lens configures →

Reuse

Borrowing it

Nothing to install: this file belongs to dreadnode/agent-lens. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/dreadnode/agent-lens/main/.claude/commands/experiment.md
Clone the repo
git clone --depth 1 https://github.com/dreadnode/agent-lens

Made for: Claude Code.

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 experiment

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/dreadnode/agent-lens/experiment"><img src="https://agentmods.dev/badge/commands/dreadnode/agent-lens/experiment.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,097 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.00000 $0.03097
Opus 5.5 $0.00000 $0.01239
Sonnet 5.5 $0.00000 $0.00619
Haiku 4.5 $0.00000 $0.00310

Measured 2mo ago against content hash 84454e6d9d3c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

experiment 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 2mo 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.

.claude/commands/experiment.md · 284 lines

How it starts

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

Experiment Config Generator

The user wants to create a harness experiment config to test a hypothesis about agent behavior. Your job is to design the experiment, write a config, run it, and analyze the results.

Instructions

  1. Understand the hypothesis. Ask clarifying questions if needed:

    • What behavior are they testing? (memory read/write, tool use patterns, subagent delegation, hallucination, etc.)
    • What directory should the agent work in? (can use ./repos/test_repo for simple tests)
    • How many sessions? What should each session probe?
    • Should sessions be isolated (no conversation history), chained (full conversation context), or forked (branching from a prior session)?
    • Do they need subagents?
    • Do they need replicates (count) to study variance?
  2. Design the experiment. Consider:

    • Session mode: Use isolated to test if the agent uses memory correctly across fresh conversations. Use chained to test multi-turn reasoning with full context. Use forked to compare different prompts from the same starting point.
    • Memory file: The harness auto-seeds MEMORY.md in the working directory. You can customize the filename (memory_file) and initial content (memory_seed). The absolute path is injected into the system prompt automatically.
    • System prompt: Set up the scenario. Tell the agent about MEMORY.md and any conventions.
    • Session prompts: Each session should test a specific aspect of the hypothesis. Be specific about what the agent should do.
    • Forking: Use fork_from on individual sessions to branch from any prior session, not just session 1.
    • Replicates: Use count: N on a session to run it N times as independent replicates. Useful for studying behavioral variance.
    • Subagents: Define if the hypothesis involves delegation behavior. Give each a name, description, prompt, and tool restrictions.
    • Turn limits: Use max_turns: 10-15 for focused tasks, 30+ for complex exploration.
    • Capture: Always set capture_api_requests: true to enable resampling and intervention testing later.
    • Tags: Always include "auto-generated" tag plus hypothesis-specific tags.
    • Hypothesis: Always include a one-sentence hypothesis field in the config.

Read the full file on GitHub · 284 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. 2mo ago First seen · 284 lines · 0 tokens per session scan A 84454e6d9d3c

Subscribe to this mod's changes

experiment is a command published in the GitHub repository dreadnode/agent-lens (117 stars, last pushed 4mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 3,097 tokens. 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

experiment compared with commands from other repositories

experiment next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
experimentdreadnode/agent-lensCommand1174mo agoMITA0Claude Code
tma1-peertma1-ai/tma1Command1247d agoApache-2.0A22Claude Code
doctorMetabuilder-Labs/tokenjamCommand1255d agoMITA22Claude Code
guardrailsMyr-Aya/GouvernAI-claude-code-pluginCommand244mo agoMITA46Claude Code
configNot-Diamond/self-careCommand286mo agoMITA8Claude Code
checklistgithub/spec-kitCommand148kyesterdayMITA13Claude Code
clarifygithub/spec-kitCommand148kyesterdayMITA27Claude Code