lens

lens is a command for coding agents from proticom/gnosys. It costs 0 tokens per session (603 once invoked), scanned A, original, MIT.

A command for showing a filtered view of stored memories, such as decisions, imported notes, or active records. Gnosys is the memory system named by the command.

In plain words
What is it for?
Use it to review selected project decisions, filter security-related memories, or inspect records matching specific metadata.
Why use it?
It helps narrow a large memory collection by category, tags, status, author, authority, confidence, or date instead of searching everything at once.

Command

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 commands/proticom/gnosys/lens
Clone the repo
git clone --depth 1 https://github.com/proticom/gnosys

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 lens

README.md
[![agentmods](https://agentmods.dev/badge/commands/proticom/gnosys/lens.svg)](https://agentmods.dev/commands/proticom/gnosys/lens)
Your own site
<a href="https://agentmods.dev/commands/proticom/gnosys/lens"><img src="https://agentmods.dev/badge/commands/proticom/gnosys/lens.svg" alt="Measured on agentmods" 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 603 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.00000 $0.00603
Opus 5 $0.00000 $0.00302
Sonnet 5 $0.00000 $0.00121
Haiku 4.5 $0.00000 $0.00060

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

Security

Grade A, and why

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 3d 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.

docs/commands/lens.md · 85 lines

How it starts

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

gnosys lens

Filtered view of memories. Combine criteria to focus on what matters.

Usage

gnosys lens --category decisions
gnosys lens --tag auth security --match all
gnosys lens --status active archived --min-confidence 0.75 --json
gnosys lens --category decisions --author ai --or

Options

Option Description
-c, --category <category> Filter by category
-t, --tag <tags...> Filter by tag(s)
--match <mode> Tag match mode: any (default) or all
--status <statuses...> Filter by status (active, archived, superseded)
--author <authors...> Filter by author (human, ai, human+ai)
--authority <authorities...> Filter by authority (declared, observed, imported, inferred)
--min-confidence <n> Minimum confidence (0–1)
--max-confidence <n> Maximum confidence (0–1)
--created-after <date> Created after ISO date
--created-before <date> Created before ISO date
--modified-after <date> Modified after ISO date
--modified-before <date> Modified before ISO date
--or Combine filters with OR instead of AND (default: AND)
--json Output as JSON

Behavior

  1. Loads all memories via getResolver().getAllMemories().
  2. Builds a LensFilter from CLI options.
  3. With --or, sets operator: "OR" so a memory matches if any active criterion matches; otherwise all active criteria must match (AND).
  4. Applies applyLens and outputs human-readable results or JSON.

Human output

Empty result:

No memories match the lens filter.

Matches:

2 memories match:

  [active] Auth Decision (0.9)
    project:decisions/d1.md

JSON output

{
  "count": 2,
  "items": [
    {
      "title": "Auth Decision",
      "status": "active",
      "confidence": 0.9,
      "sourceLabel": "project",
      "relativePath": "decisions/d1.md"
    }
  ]
}

Validation

cd gnosys-public
npm run cli -- lens --help

Read the full file on GitHub · 85 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. 3d ago First seen · 85 lines · 0 tokens per session scan A 88378d84f128

Subscribe to this mod's changes

lens is a command published in the GitHub repository proticom/gnosys (4 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 603 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-31.