Borrowing it
Nothing to install: this file belongs to dansreis/speclens. 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/dansreis/speclens/main/CLAUDE.mdgit clone --depth 1 https://github.com/dansreis/speclensWrote 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/dansreis/speclens/claude-md)<a href="https://agentmods.dev/instructions/dansreis/speclens/claude-md"><img src="https://agentmods.dev/badge/instructions/dansreis/speclens/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.03978 | $0.03978 |
| Opus 5 | $0.01989 | $0.01989 |
| Sonnet 5 | $0.00796 | $0.00796 |
| Haiku 4.5 | $0.00398 | $0.00398 |
Grade A, and why
speclens CLAUDE.md 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 6d 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 — 134 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CLAUDE.md
Context for working on SpecLens with Claude Code. Read this before making changes.
What it is
Desktop reader (Tauri 2 + React 19) for OpenSpec - the markdown convention with proposal.md / tasks.md / specs/<capability>/spec.md inside <repo>/openspec/changes/<change-slug>/. Archived changes live under changes/archive/.
Reads OpenSpec projects from local folders at runtime via a Tauri command. Users add folders themselves via "Add repository" in the sidebar; the list is persisted. The app starts empty and users point it at whatever they want. GitHub integration is explicitly off the roadmap - see the no-GitHub direction memory.
Stack decisions
- MUI + Emotion. Confirmed UI stack. Don't add Tailwind.
- Zustand + SQLite write-through (not
persistmiddleware).useAppStoreholds UI state (theme, sidebar collapse, selected repo/change/tab, scroll target,markdownZoom,highlightEars, session-only panel state) plusrepoSources: { path, missing }[](the user-added folder list - paths persist,missingresets tofalseon cold start) plussettings: AppSettings. Persistence is done manually insrc/store/bootstrap.ts:bootstrap()hydrates from SQLite on start, thenattachWriteThrough()subscribes to each persisted slice and writes it back (UI keys →kv_state, sources →repo_sources). The loadedrepos: Repo[]is not persisted -reloadAllSources()re-walks each path on mount.useCommentsStorepersists via SQLite (commentstable).useAiStoreholds AI generation state + session summary caches. - Settings.
AppSettings+DEFAULT_SETTINGS+HIGHLIGHT_COLORS+sanitizeSettings()live inuseAppStore.ts; the whole object persists as one"settings"kv blob. Mutate viasetSetting(key, value)/resetSettings(). The dialog is insrc/sidebar/SidebarFooter.tsx(General / Reading / AI tabs). To add a setting: extend the type + defaults, add a validated branch insanitizeSettings, reads.settings.<key>at the consumer, add a control to the dialog - no new subscription needed. - Tauri
load_repo(path)command insrc-tauri/src/lib.rsloads one project: walks itsopenspec/subtree, reads markdown + yaml, and (when a.git/exists at the project root or its immediate parent - seefind_git_root) derivesDocAuthorshipper file via thegit2crate (vendored libgit2 - no git binary needed). Authorship comes from one history walk for all files (collect_file_histories) - see "Authorship pipeline". The git-root walk is intentionally capped at one level up so that loading a folder from inside an unrelated git checkout (e.g. somewhere under~) doesn't pull authorship from that repo. JS calls the command once per source and catches per-source errors to markmissing: true. Git is optional - when absent,Change.authorship,createdAt, andarchivedAtarenulland the UI degrades gracefully. - Per-repo cold-start cache. Each
load_reporesponse includes asignature(git:HEAD-sha + scoped porcelain statushash; non-git: hash ofopenspec/file mtimes). The fast Tauri commandrepo_signature(path)returns the signature alone (no file reads). On cold start,reloadAllSourcesfetches the signature first; if it matches the cached entry in SQLite (repo_cachetable, keyed by path), the savedRepois used as-is - no walking, no git log. Mismatch → full reload + cache overwrite. Seesrc/lib/repoCache.ts(thin wrapper oversrc/lib/db.ts). Dates in cached entries get revived (JSON round-trip loses theDatetype).useRepoSyncWatcherpolls the selected repo's signature (15s + window focus) and only marks it stale - reload is always user-initiated. - Local AI (
src-tauri/src/ai.rs). On-device summaries via llama.cpp (Metal) or an Ollama backend, exposed asai_*commands. Nothing downloads or runs until the user fetches a model, so the no-network promise holds. Prompts are built on the JS side (src/lib/aiSummary.ts,aiDocSummary.ts- pure, unit-tested); Rust just receives the final string. - Spec checks (deterministic lint, labelled Beta).
src/lib/specChecks.tsis the engine (structural SL00x errors, consistency SL01x warnings, language SL02x checks) covering active change deltas + canonicalspecs/<cap>/spec.md;src/lib/specChecksConfig.tsis the registry - ids, severities, titles, message templates, and word lists all live there, the engine holds only detection logic. Both modules must stay pure (no Tauri imports) so the lint core can be extracted into a CLI later (seedocs/design/checks-and-claims.md). Surfaced as: a Checks navigation view (two-level tree, by change or by check), a drag-resizable right panel that scopes to the open change/spec and hides on non-checkable views, in-document wavy underlines with hover diagnostics, list badges, and a ChangeViewer banner for findings with no text anchor. All UI reads results throughsrc/specs/useSpecChecks.ts(useSpecCheckResults) - never callrunSpecChecksfrom a component directly, the hook owns the settings wiring (specChecks, default on;specChecksIncludeArchived, default off). - One right panel at a time. Comments, spec checks, and the AI summary are mutually exclusive: an arbiter effect in App.tsx closes the other two on any panel's closed→open transition (last opened wins). Panel open state stays where it always lived (App / useAppStore / useAiStore).
@tauri-apps/plugin-dialogpowers the "Add repository" folder picker (capabilitydialog:default).- No i18n - deferred. Tests: Vitest covers the pure
src/libhelpers (*.test.tsco-located);cargo testcovers the git2 authorship/signature layer (temp repos built with git2, no git binary). UI is untested. Seedocs/ROADMAP.md.
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.
- 6d ago First seen · 134 lines · 3,978 tokens per session scan A fb0cd4cf118c
speclens CLAUDE.md is an instructions file published in the GitHub repository dansreis/speclens (24 stars, last pushed 13d ago), licensed Apache-2.0. It adds 3,978 tokens to every session, about $0.0199 per session on Opus 5. 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-30.
Other instructions, from other repositories
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.
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).
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).
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.
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.