AGENTS

A command and keyboard-shortcut registry for an application, with AGENTS.md as its source file; CLAUDE.md points to the same file.

In plain words
What is it for?
Use it when changing application commands, command-palette entries, keyboard shortcuts, focus handling, or how mounted components override built-in commands.
Why use it?
It keeps shortcut availability, dispatch rules, and component-specific behavior in one defined system.

Command

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 commands/lodyai/lody/agents
Clone the repo
git clone --depth 1 https://github.com/LodyAI/Lody
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 947 The whole file, excluding the scripts and references it only reads on demand.
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.00000 $0.00947
Opus 5 $0.00000 $0.00474
Sonnet 5 $0.00000 $0.00189
Haiku 4.5 $0.00000 $0.00095

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

Security

Grade A, and why

AGENTS 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 3d 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.

packages/components/src/lib/commands/AGENTS.md · 73 lines

How it starts

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

lib/commands command and shortcut system

CLAUDE.md is a symlink to this file. Edit AGENTS.md only.

This directory is the source of truth for application-level shortcuts, the command registry, the command palette, and keyboard-shortcut settings. Local interactions such as dialog Escape, list j/k, or composer Submit stay in their component key handlers.

KeyScope lets local and application-level shortcuts negotiate ownership. For example, when a rich-text editor owns focus, Cmd+B must format text rather than toggle the sidebar. A scope is not a command: it is not listed, configurable, or executable. It only tells global dispatch to yield for events originating in its subtree.

Invariants

  • when() is the sole command-availability predicate. Both palette visibility and dispatch honor it; do not add screen-specific filters elsewhere.
  • built-ins.ts registers when: () => false placeholders so configurable shortcuts remain visible when their real component is unmounted. A mounted implementation shadows the placeholder and removal restores it.
  • The registry is a per-id stack. Multiple register calls push implementations and the most recently mounted one wins. Hidden retained tabs/toolbars must pass enabled=false to useCommand or they can shadow the active surface.
  • Binding-level when limits only the default binding. User overrides do not inherit it. Command-level when limits the command through every execution path.
  • useKeyScope(id, ref) registers a scope and automatically removes it. Dispatch finds scopes containing event.target, preferring the innermost. A matched scope yields all app shortcuts unless the command has allowInTextInput: true; claims narrows the yielded bindings.
  • A scope that yields an event must not call preventDefault: the editor/local keymap still needs to receive it. This applies after a shortcut is rebound as well.
  • $mod means Command on macOS and Control elsewhere. Formatting is platform-aware.
  • Alt+letter matching and recording must use event.code; macOS event.key may be a generated glyph such as .
  • Shortcut capture pauses dispatch. It finishes after the last modifier is released and keeps a one-second settle window because macOS may suppress letter keyup while Command remains held.
  • User bindings are per-device localStorage state. [] explicitly unbinds all defaults; null restores defaults.

Read the full file on GitHub · 73 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. 3d ago First seen · 73 lines · 0 tokens per session scan A 6c6bca4e3ea8

Subscribe to this mod's changes

AGENTS is a command published in the GitHub repository LodyAI/Lody (801 stars, last pushed 3d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 947 tokens. 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.