LibreChat AGENTS.md

LibreChat AGENTS.md is an instructions file for Codex, OpenCode from danny-avila/LibreChat. It costs 655 tokens per session, scanned A, original, MIT.

Repository instructions for LibreChat, a chat application, covering how to style its frontend and keep its backend authentication cache accurate.

In plain words
What is it for?
Use them when changing LibreChat's frontend themes or styles, or when code changes user records, roles, or authentication data.
Why use it?
They help developers follow the project's shared design rules and avoid showing outdated user permissions after account changes.

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/danny-avila/librechat/agents-md
Clone the repo
git clone --depth 1 https://github.com/danny-avila/LibreChat

Made for: Codex, OpenCode.

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 LibreChat AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/danny-avila/librechat/agents-md.svg)](https://agentmods.dev/instructions/danny-avila/librechat/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/danny-avila/librechat/agents-md"><img src="https://agentmods.dev/badge/instructions/danny-avila/librechat/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 655 This file is loaded in full into every session.
When invoked 655 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.00655 $0.00655
Opus 5 $0.00328 $0.00328
Sonnet 5 $0.00131 $0.00131
Haiku 4.5 $0.00065 $0.00065

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

Security

Grade A, and why

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

AGENTS.md · 47 lines

How it starts

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

See CLAUDE.md.

Branching and pull requests

Branch off dev and target dev with every pull request; gh pr create defaults to main, so pass --base dev explicitly. main is the released branch, kept as a fast-forward of dev and synced as-is — never open a backport pull request to main, because anything merged to dev reaches it at the next sync. Pull requests opened against main are retargeted automatically. Fixes #N does not close the issue on a dev merge — GitHub honors closing keywords only on the default branch, so close linked issues by hand. Worktrees share one stash stack, so never use a bare git stash pop. See the detailed policy in CLAUDE.md under "Branching and Pull Requests".

Verification

A green build is not a typecheck: packages/api, packages/client and packages/data-schemas build with tsdown, which emits without checking types. Run npx tsc --noEmit in the workspace you changed. packages/client excludes *.spec.ts(x) and *.test.ts(x) from typechecking entirely. npm run sort-imports with no arguments rewrites every source root — pass the paths you touched. See CLAUDE.md under "Typechecking" and "Formatting".

Frontend theming and styling

For frontend work, compose existing @librechat/client primitives and variants before adding feature-local styles. Use semantic theme/Tailwind roles for color and shared appearance; do not introduce raw palette utilities, hard-coded colors, or arbitrary theme CSS. If the system cannot express a reusable design need, deepen the shared primitive or versioned theme-token registry instead of copying classes into a feature. Keep genuine layout and behavior local, and document why any new custom CSS cannot be expressed by the shared system. See the detailed policy in CLAUDE.md under “Theming and styling.”

Backend auth cache

When adding or changing code that mutates user documents, invalidate the auth user document cache for affected users, including bulk role and user mutations. See the detailed policy in CLAUDE.md under “Auth cache invalidation”.

Read the full file on GitHub · 47 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 Changed · +29 lines · +463 tokens per session 73f4084f398b
  2. 4d ago First seen · 18 lines · 192 tokens per session scan A 72d9789830f5

Subscribe to this mod's changes

LibreChat AGENTS.md is an instructions file published in the GitHub repository danny-avila/LibreChat (42,698 stars, last pushed 2d ago), licensed MIT. It adds 655 tokens to every session, about $0.0033 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.