Borrowing it
Nothing to install: this file belongs to enjalot/latent-scope. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/enjalot/latent-scope/main/CLAUDE.mdgit clone --depth 1 https://github.com/enjalot/latent-scopeWrote 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/instructions/enjalot/latent-scope/claude-md)<a href="https://agentmods.dev/instructions/enjalot/latent-scope/claude-md"><img src="https://agentmods.dev/badge/instructions/enjalot/latent-scope/claude-md.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.1 | $0.03071 | $0.03071 |
| Opus 5 | $0.01536 | $0.01536 |
| Sonnet 5 | $0.00614 | $0.00614 |
| Haiku 4.5 | $0.00307 | $0.00307 |
Grade A, and why
latent-scope CLAUDE.md scanned grade A 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 8d 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.
Runs shell commandslowCapability
Expected in a hook, worth knowing in a rule or an instructions file.
subprocess.Popen(command, ...) How it starts
The opening of the file, as written. The whole thing — 243 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CLAUDE.md — Latent Scope
Guidance for AI agents (Claude Code and others) working on this codebase. If you are an agent asked to "run the pipeline" or "show me the results", jump to Agent quickstart.
Using Latent Scope for a user (running the pipeline, choosing a model, serving results) → the cross-provider runbook is
AGENTS.md(Claude Code also loads it via.claude/skills/latent-scope/). This file (CLAUDE.md) focuses on the codebase itself — layout, design decisions, and contributing. When the two overlap,AGENTS.mdis authoritative for usage.
What Latent Scope does
Latent Scope is a Python + React tool for embedding, projecting, clustering,
labeling, and exploring datasets through the lens of their latent space. The
backend is a Flask server; the frontend is a React/Vite SPA. Pipeline steps run
as CLI subprocesses (ls-embed, ls-umap, …) that can be driven from the web
UI or scripted directly.
ingest → embed → umap → cluster → label → scope → (sprite atlas) → explore
Capabilities (what an agent can offer a user)
- Text and image datasets. Ingest CSV/Parquet/JSON/JSONL/XLSX, a pandas
DataFrame, or a directory of images (
ls-ingest <ds> --path <dir>reads bytes + filename/date/size_kb columns). Image columns (HF{bytes,path}dicts, raw bytes, or URLs) are auto-detected and embeddable (issue #87); local file paths in a table are not. - Dense embeddings from many providers (sentence-transformers/HF, OpenAI, Cohere, Voyage, Mistral, Together, and any OpenAI-compatible endpoint).
- ColBERT late-interaction (multi-vector) embeddings via
pylate— per-token vectors stored fp16, searched with MaxSim (issue #64). Seeexamples/colbert_quickstart/. - Token maps: for late-interaction embeddings, an alternative granularity
that maps one point per token (not per document) while the table shows
parent documents with the selected token highlighted in context. Pipeline:
ls-tokenize→ls-umap --granularity tokens→ls-cluster(token-frequency default labels) → optionalls-sae --granularity tokens --checkpoint <dir>(token-level SAE features) →ls-scope. Seedocs/token-maps.md. - LanceDB vector storage (replaced HDF5). Embeddings live in a per-dataset LanceDB table; old HDF5 embeddings are migrated on demand.
- UMAP projection + clustering, with LLM cluster labeling. Four clustering
methods:
ls-cluster --method {evoc,hdbscan,kmeans,gmm}with a--cluster_on {umap,embedding}input choice (issue #41). Forkmeans/gmmthesamplespositional is the number of clusters. Seedocs/clustering.md. - GPU acceleration (optional): cuML-accelerated UMAP, HDBSCAN, and KMeans on
NVIDIA GPUs with graceful CPU fallback, controlled by the
LATENT_SCOPE_DEVICEenv var (cpu|cuda|auto, defaultauto). Installpip install "latentscope[gpu]" --extra-index-url=https://pypi.nvidia.com. EVoC and GMM stay on CPU. Seedocs/gpu-acceleration.md(issue #63). - Named experiments + gallery: umap/cluster runs take optional
--name/--description(stored in their metadata JSON, editable in Setup); the Setup UI shows a browsable thumbnail gallery instead of a bare id list. - Explore UI: GPU scatterplot with hover/select, density heatmap, cluster outlines, similarity + late-interaction search, filtering, tagging, and color-by any numeric/categorical column (issue #131). The Compare page shows two scopes side by side with a shared lasso/brush selection (issue #132).
- Image map (sprite atlas): for image datasets the map is a continuous
level-of-detail — heatmap when zoomed out, a tiled representative-image
pyramid as you zoom in, then individual points on top for hovering. Built by
the optional post-scope
ls-sprite-atlasstep (issue #24).
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.
- 8d ago First seen · 243 lines · 3,071 tokens per session scan A 973c877c7a6d
latent-scope CLAUDE.md is an instructions file published in the GitHub repository enjalot/latent-scope (792 stars, last pushed 17d ago), licensed MIT. It adds 3,071 tokens to every session, about $0.0154 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other instructions, from other repositories
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).
spec-kit AGENTS.md
AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.