latent-scope: Instructions file for Claude Code

CLAUDE.md

latent-scope CLAUDE.md is an instructions file for Claude Code from enjalot/latent-scope. It costs 3,071 tokens per session, scanned A, original, MIT.

Repository instructions for Latent Scope, a Python and React tool that turns text or image datasets into grouped, labeled visual maps. The process includes preparing data, creating numerical representations, grouping similar items, and exploring the result in a web interface.

In plain words
What is it for?
Use them when running the data pipeline, choosing or using its web interface, changing the Flask or React code, or working with supported dataset formats.
Why use it?
They explain what the project does, how its backend, frontend, and command-line steps fit together, and which guide controls how agents should run it.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions Claude Code.

This is enjalot/latent-scope's own configuration. It tells Claude Code how to work on latent-scope 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 latent-scope configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/enjalot/latent-scope/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/enjalot/latent-scope

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 latent-scope CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/enjalot/latent-scope/claude-md.svg)](https://agentmods.dev/instructions/enjalot/latent-scope/claude-md)
Your own site
<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>
Per session 3,071 This file is loaded in full into every session.
When invoked 3,071 The same file — it is already loaded in full.
Security scan A 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.03071 $0.03071
Opus 5 $0.01536 $0.01536
Sonnet 5 $0.00614 $0.00614
Haiku 4.5 $0.00307 $0.00307

Measured 8d ago against content hash 973c877c7a6d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

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, ...)
CLAUDE.md · 243 lines

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.md is 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). See examples/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-tokenizels-umap --granularity tokensls-cluster (token-frequency default labels) → optional ls-sae --granularity tokens --checkpoint <dir> (token-level SAE features) → ls-scope. See docs/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). For kmeans/gmm the samples positional is the number of clusters. See docs/clustering.md.
  • GPU acceleration (optional): cuML-accelerated UMAP, HDBSCAN, and KMeans on NVIDIA GPUs with graceful CPU fallback, controlled by the LATENT_SCOPE_DEVICE env var (cpu|cuda|auto, default auto). Install pip install "latentscope[gpu]" --extra-index-url=https://pypi.nvidia.com. EVoC and GMM stay on CPU. See docs/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-atlas step (issue #24).

Read the full file on GitHub · 243 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. 8d ago First seen · 243 lines · 3,071 tokens per session scan A 973c877c7a6d

Subscribe to this mod's changes

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.

Related

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.

openai/codex · 5,182 tokens

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).

microsoft/vscode · 6,785 tokens

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.

vercel/next.js · 7,296 tokens

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.

langchain-ai/langchain · 4,469 tokens

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).

microsoft/vscode · 5,001 tokens

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.

github/spec-kit · 7,104 tokens