lambe AGENTS.md

Instructions for using Lambë, a query language that extracts, filters, transforms, validates, and converts structured data such as JSON, YAML, TOML, CSV, and Markdown. It also covers inspecting unfamiliar data and accessing properties.

In plain words
What is it for?
It is for querying structured files, filtering records, reshaping data, calculating aggregates, checking schemas or values, converting formats, and printing a data shape.
Why use it?
It gives a coding agent rules for deciding when this data language is appropriate and when another tool, such as SQL or jq, is better suited.

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/hakimjonas/lambe/agents-md
Clone the repo
git clone --depth 1 https://github.com/hakimjonas/lambe

Made for: Codex, OpenCode.

Per session 2,883 This file is loaded in full into every session.
When invoked 2,883 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.02883 $0.02883
Opus 5 $0.01442 $0.01442
Sonnet 5 $0.00577 $0.00577
Haiku 4.5 $0.00288 $0.00288

Measured yesterday against content hash fdbf6345b8a1, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

lambe 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 yesterday.

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.

AGENTS.md · 247 lines

How it starts

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

AGENTS.md — using Lambë

Lambë (lam) is a query language for structured data. It extracts, filters, transforms, validates, and converts JSON, YAML, TOML, HCL, CSV, TSV, and Markdown — auto-detecting format from file extension.

This file teaches you (the agent) when to reach for lam and how to write queries that work. The lam binary is on the user's PATH after dart pub global activate lambe; you can invoke it from a shell tool.

When to use it

Reach for lam when the user wants to:

  • Extract values from a structured file (one field, an array, a nested path).
  • Filter records by a predicate.
  • Transform records into a different shape.
  • Aggregate numbers (sum, avg, min, max, count).
  • Validate structure or values (--assert, --schema, --explain).
  • Convert between formats (--to yaml, --to csv, etc.).
  • Inspect unfamiliar data (--print-shape returns JSON Schema).

Lambë is a bounded tree transformer — every query terminates, no recursion, no def/lambdas. Don't reach for it when the user wants:

  • Binary data, images, databases, streaming.
  • jq syntax specifically (use jq).
  • SQL queries (use SQL).
  • Programmatic processing with loops or accumulating state (write code instead).
  • Recursive descent (..), try/catch, regex, getpath/setpath, in-place mutation. See doc/non-goals.md for the full list and the lambë idiom that replaces each omission. If you hit "unknown pipe op" or a _jqIdiomHint message, that page is the canonical reference.

Natural language → lam query

User says Query
"Get the database host" lam '.database.host' config.yaml
"List all user names" lam '.users | map(.name)' data.json
"Filter active users over 30" lam '.users | filter(.active && .age > 30)' data.json
"How many items?" lam '.items | length' data.json
"Sort by price descending" lam '.items | sort_by(.price) | reverse' data.json
"Group by department" lam '.users | group_by(.dept)' data.json
"Total price" lam '.items | map(.price) | sum' data.json
"Show the structure" lam --print-shape data.json
"Check version isn't empty" lam --assert '.version != ""' package.json
"Convert to YAML" lam --to yaml '.' data.json
"Export as CSV" lam --to csv '.users | map({name, age})' data.json
"Get all unique tags" lam '.items | map(.tags) | flatten | unique' data.json
"Get the first 3 items" lam '.items[:3]' data.json
"Build a summary object" lam '{count: .items | length, total: .items | map(.price) | sum}' data.json
"Find containers without limits" lam '.spec.template.spec.containers | filter(has("resources") == false) | map(.name)' deployment.yaml
"List Terraform resources" lam '.resource | map(._labels)' main.tf
"Query CSV data" lam '. | filter(.status != "closed") | map(.title)' issues.csv
"Sum a CSV numeric column" lam '. | map(.price | to_number) | sum' orders.csv
"Inspect a value's type" lam '.config | type' data.yaml
"List all headings in this markdown" lam '.children | filter(.type == "heading") | map(text)' README.md
"What languages are in the code blocks?" lam '.children | filter(.type == "code_block") | map(.language)' tutorial.md
"Run a query without input" lam -n '[1, 2, 2, 3] | unique'
"Explore interactively" lam -i data.json

Read the full file on GitHub · 247 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. yesterday First seen · 247 lines · 2,883 tokens per session scan A fdbf6345b8a1

Subscribe to this mod's changes

lambe AGENTS.md is an instructions file published in the GitHub repository hakimjonas/lambe (1 stars, last pushed 2mo ago), licensed MIT. It adds 2,883 tokens to every session, about $0.0144 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-31.