setup

setup is a skill for Claude Code from Tiltely/lens. It costs 80 tokens per session (777 once invoked), scanned B, original, MIT.

A one-time setup tool for a personal lens memory loop in Claude Code. The loop queues finished sessions, reviews them for patterns, and helps create or improve reusable lenses.

In plain words
What is it for?
It helps configure a private, non-versioned foundry for session data on Claude Code. After setup, it supports later retrospective reviews and lens creation.
Why use it?
It removes the manual work of creating the private storage folder and connecting the session-end process. It also explains that the loop is not supported in Claude Cowork.

Skill for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT} variable. Also seen: reads .claude/ paths; mentions Claude Code.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the lens plugin — 11 skills, 1 hook shipped together

Good fit It helps configure a private, non-versioned foundry for session data on Claude Code. After setup, it supports later retrospective reviews and lens creation.

Compare 6 skills from other repositories ↓
View source ↗ Tiltely/lens
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add Tiltely/lens
Claude Code
/plugin install lens

Made for: Claude Code.

Or install lens, the plugin that ships this one along with the rest of its 11 skills, 1 hook.

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 setup

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/tiltely/lens/setup"><img src="https://agentmods.dev/badge/skills/tiltely/lens/setup.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 80 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 777 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00080 $0.00777
Opus 5.5 $0.00032 $0.00311
Sonnet 5.5 $0.00016 $0.00155
Haiku 4.5 $0.00008 $0.00078

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

Security

Grade B, and why

setup scanned grade B with 1 finding 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 1mo 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

from other projects' sessions. Do NOT edit `~/.claude/settings.json` yourself —
skills/setup/SKILL.md · 55 lines

How it starts

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

Lens Setup (Claude Code)

The memory loop — a SessionEnd hook that queues lens sessions, /lens:retro to mine them, /lens:new to grow your collection — is a Claude Code feature. Setup creates your foundry and wires it up. Without setup, all bundled lenses and /lens:socratic still work; setup only adds the loop.

On Claude Cowork: not supported — stop here

If you detect Cowork, do NOT set up a foundry. The memory loop does not run on Cowork: its sandbox spawns the CLI with --setting-sources user, so plugin-provided hooks (the SessionEnd queue) never fire, and the VM home is ephemeral. Tell the user plainly: on Cowork, just use the lenses and /lens:socratic directly — they work fully. Run /lens:setup on Claude Code to enable the loop there. Then stop — no foundry, no config, no folder grant.

On Claude Code: set up the loop

The foundry holds PERSONAL session data (session IDs, project/transcript paths, mined observations) — never commit it to git. Use a private, persistent, non-tracked folder.

  1. Choose the foundry location — default ~/.claude/lens-foundry/; any non-git folder is fine, but NEVER inside a git working tree. Create it with empty pending-retros.jsonl and processed-retros.jsonl, an observations.md with a one-line header ("Cross-project learnings mined by /lens:retro; append-only"), a registry.md (your lenses — same columns as ${CLAUDE_PLUGIN_ROOT}/core/registry.md, starting empty), and an empty lenses/ dir (where /lens:new writes your global lenses; /lens:socratic reads them inline).

  2. Write the config at ~/.claude/lens.json (show the user first):

    { "foundry": "<foundry path>" }
    
  3. Hand the user the cross-cwd permission rule so retro/hook writes never prompt from other projects' sessions. Do NOT edit ~/.claude/settings.json yourself — permission-widening by an agent is blocked by the auto-mode classifier by design. Print a paste-ready node -e one-liner the USER runs, merging into their settings and preserving everything else:

Read the full file on GitHub · 55 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. 1mo ago First seen · 55 lines · 80 tokens per session scan B b08eec255e11

Subscribe to this mod's changes

setup is a skill published in the GitHub repository Tiltely/lens (5 stars, last pushed 2mo ago), licensed MIT. It adds 80 tokens to every session and 777 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

mem0-oss-to-platform

Plan, then execute, a migration of a project from the mem0 open-source / self-hosted SDK (local Memory class) to the mem0 Platform / hosted SDK (MemoryClient). TRIGGER when: the developer wants to move, switch, or migrate mem0 off OSS/self-hosted to the hosted API, e.g. "migrate my mem0 setup to the platform", "switch…

mem0ai/mem0 · 217 tokens

forget

Remove a personal fact, preference, relationship detail, topic, or prior event from Muse's active memory and stop existing copies or automations from bringing it back. Use for explicit requests such as 'forget that', 'don't remember this about me', or 'remove that from your memory'. Do not use when 'forget it' merely…

asgeirtj/system_prompts_leaks · 74 tokens

Cortex

Operate Cortex, the LifeOS memory system — the typed Knowledge Archive (People, Companies, Ideas, Research with typed related: links) plus recall of prior work sessions, ISAs, and conversations. Search, add, harvest, develop, ingest, distill, graph-navigate, recall. USE WHEN cortex, knowledge, knowledge base, search…

danielmiessler/LifeOS · 196 tokens

memory

Use when the user asks to remember, recall, forget, update, search, or inspect durable OpenSquilla memory, including profile facts in USER.md and long-term notes in MEMORY.md or memory//.md.

opensquilla/opensquilla · 44 tokens

ha-data-stores

Map of Hope Agent's local data stores and safe read-only query workflow. Use when the user asks where Hope Agent stores data, wants to inspect sessions/messages/memory/logs/background jobs/knowledge indexes/settings, asks the model to query local app data, or debugging requires checking persisted state. Trigger…

shiwenwen/hope-agent · 115 tokens

establishing-project-context

Use when the user asks to establish shared project language, or project work exposes a conflicting, renamed, or deprecated domain term that needs active semantic modeling. Routine small tasks stay on the fast path.

GanyuanRan/Aegis · 45 tokens