string-le AGENTS.md

A repository instruction document for Strings-LE, a VS Code extension and Rust command-line tool that extract text values from files. It explains the architecture, shared test data, and rules contributors and coding agents must follow.

In plain words
What is it for?
Use it when changing the project to understand its two products, supported file formats, shared extraction behavior, architecture boundaries, and required verification scripts.
Why use it?
It provides the technical source of truth and helps keep the extension and command-line tool consistent, including checks that compare their results.

Instructions file for CodexOpenCode

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 instructions/nolindnaidoo/string-le/agents-md
Clone the repo
git clone --depth 1 https://github.com/nolindnaidoo/string-le

Made for: Codex, OpenCode.

Per session 5,317 This file is loaded in full into every session.
When invoked 5,317 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin 88% copy Near-identical to another mod 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.05317 $0.05317
Opus 5 $0.02658 $0.02658
Sonnet 5 $0.01063 $0.01063
Haiku 4.5 $0.00532 $0.00532

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

Security

Grade A, and why

string-le AGENTS.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 2d 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.

Origin

This is a copy

88% identical to regex-le AGENTS.md — 72 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

AGENTS.md · 321 lines

How it starts

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

AGENTS.md — Strings-LE

Technical source of truth for this repo. README.md is the user-facing doc; this file is for anyone (human or agent) changing the code.

This repo hosts two products: the extension at the root (this document's scope) and the Rust CLI in crate/ (its own AGENTS.md + SPEC.md). The shared extraction corpus lives at crate/fixtures/; scripts/check-extraction-parity.ts fails CI when this extension drifts from it.

scripts/check-differential.ts is the second half of that guard: it drives the shared extract_strings MCP tool on both servers — this one and the crate's — over generated documents, and requires byte-identical answers. The corpus pins the cases somebody thought of; that pins the ones nobody did. Scope is the shared tool only. The two surfaces are meant to differ — this one is IDE-first, for one open buffer; the CLI is terminal-first, for trees, exit codes and pipes — so the walk, --strict, --values and --multiline are the crate's alone and are never held against this side.

What this is

A VS Code extension that extracts string values from the active document (JSON, YAML, CSV, TOML, INI, dotenv — anything else falls back to a quoted-string scan) into a results editor, with dedupe/sort post-processing and a streaming mode for large CSVs. No network access, no filesystem writes.

Architecture

extension.ts            activate(): create telemetry/notifier/statusBar -> registerAllCommands()
commands/               one file per command; deps injected as a frozen bag
                        (extract, dedupe, sort, toggleCsvStreaming, help;
                        postProcessHelper shares new-file-vs-in-place output)
extraction/extract.ts   dispatcher: fileType -> extractor (unknown -> fallback)
extraction/collect.ts   THE shared value-collection heuristics for parsed formats
extraction/formats/*.ts one extractor per format:
                        json (JSON.parse), yaml (js-yaml loadAll),
                        toml (@iarna/toml), ini (ini), csv (csv-parse,
                        + streamCsvStrings + readCsvHeader), dotenv
                        (line-based), fallback (quoted-string regex)
ui/                     notifier (window messages, gated by notificationsLevel:
                        all -> everything, important -> warn+error, silent -> error only;
                        error/warn text sanitized), statusBar, prompts
                        (file-type picker, CSV column selection), largeOutput dialogs
providers/codeActions   "Extract strings" quick fix for supported languages
config/config.ts        readConfig() snapshot; CONFIG_DEFAULTS table
utils/                  errors (sanitizeErrorMessage), filename (.env detection), text (dedupe/sort)
types.ts                shared types only — no logic

Read the full file on GitHub · 321 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. 2d ago First seen · 321 lines · 5,317 tokens per session scan A 57f1e875b5fc

Subscribe to this mod's changes

string-le AGENTS.md is an instructions file published in the GitHub repository nolindnaidoo/string-le (1 stars, last pushed 7d ago), licensed MIT. It adds 5,317 tokens to every session, about $0.0266 per session on Opus 5. A static security scan graded it A with 0 findings. It is 88% identical to regex-le AGENTS.md, differing in 72 lines, and is treated as a copy.