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.
npx agentmods add commands/proticom/gnosys/lensgit clone --depth 1 https://github.com/proticom/gnosysWrote 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.
[](https://agentmods.dev/commands/proticom/gnosys/lens)<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>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.
| Model | Per session | Once 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 |
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.
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
- Loads all memories via
getResolver().getAllMemories(). - Builds a
LensFilterfrom CLI options. - With
--or, setsoperator: "OR"so a memory matches if any active criterion matches; otherwise all active criteria must match (AND). - Applies
applyLensand 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
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.
- 3d ago First seen · 85 lines · 0 tokens per session scan A 88378d84f128
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.
Other commands, from other repositories
wrap
Close the session cleanly. Update entity state. Capture decisions. Detect momentum shifts.
promote
Move .memory/ artifacts to permanent knowledge locations.
checkpoint
Create or update .memory/ with current conversation state.
cleanup
Delete promoted content from the .memory/ directory.
perf-investigate
Drive an iOS performance or memory-leak investigation on using Memory Graph + Time Profiler. Enforce data-before-architecture and stacked PRs.
gains
Show what Kage saved you — tokens, cost, stale memories blocked, stale knowledge caught.