llm-tools: Instructions file for Codex

AGENTS.md

llm-tools AGENTS.md is an instructions file for Codex, OpenCode from chrisgleissner/llm-tools. It costs 12,648 tokens per session, scanned A, original, Apache-2.0.

Repository instructions for llm-tools, a collection of Linux command-line programs that check usage, schedule work, and switch between several AI provider command-line tools. A repository is the folder containing a project's code and supporting files.

In plain words
What is it for?
Use them when modifying llm-usage, llm-scheduler, ralph-robin, sleep testing, shared helpers, or provider integrations in the llm-tools repository.
Why use it?
They give contributors the project's scope, structure, implementation guidance, and rules for adding providers or changing shared behavior. This reduces the risk of making changes that conflict with existing commands.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: reads .claude/ paths; positional $N argument; mentions Claude Code.

This is chrisgleissner/llm-tools's own configuration. It tells Codex and OpenCode how to work on llm-tools itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything llm-tools configures →

Reuse

Borrowing it

Nothing to install: this file belongs to chrisgleissner/llm-tools. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/chrisgleissner/llm-tools/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/chrisgleissner/llm-tools

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 llm-tools AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/chrisgleissner/llm-tools/agents-md/github.svg)](https://agentmods.dev/instructions/chrisgleissner/llm-tools/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/chrisgleissner/llm-tools/agents-md"><img src="https://agentmods.dev/badge/instructions/chrisgleissner/llm-tools/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for llm-tools AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/chrisgleissner/llm-tools/agents-md"><img src="https://agentmods.dev/badge/instructions/chrisgleissner/llm-tools/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 12,648 This file is loaded in full into every session.
When invoked 12,648 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.12648 $0.12648
Opus 5.5 $0.05059 $0.05059
Sonnet 5.5 $0.02530 $0.02530
Haiku 4.5 $0.01265 $0.01265

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

Security

Grade A, and why

llm-tools 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 · 357 lines

How it starts

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

AGENTS.md

Scope

This repo contains small Linux Python CLIs for Codex, Claude Code, GitHub Copilot, and Kilo Code CLI:

  • llm-usage — show local usage/quota for each provider, optionally through a local Unix-socket sampler service.
  • llm-scheduler — submit a prompt to a provider CLI once usage data says it is usable (optionally waking/suspending around a scope reset).
  • ralph-robin — keep using one configured provider until it is exhausted, then rotate to the next provider and delegate launch/suspend behavior to llm-scheduler. Holds an OS idle inhibitor for the whole run so a desktop idle timer cannot suspend the machine mid-work, and when every provider is rate-limited it sleeps the machine itself via a verified RTC wake (see Suspend/wake reliability below).
  • llm-sleep-soak — repeatedly suspend and wake the machine using the exact production suspend path to prove sleep/resume is reliable on this hardware. Real-hardware test; cannot run in CI.
  • llm-bridge — create durable local engineering missions, order tasks, inspect verification evidence, and supervise provider work through a terminal control station.
  • llm_tools/common.py — shared helpers (provider readers, normalization, time/reset formatting, subprocess execution, usage decisions, PTY capture, wake diagnostics, and common CLI plumbing: argument validation, run-dir logging, prompt loading, argv/JSON conversion).
  • llm_tools/bridge.py, bridge_store.py, bridge_runtime.py, bridge_monitor.py, bridge_sessions.py, bridge_logs.py, bridge_log_sink.py, bridge_refresh.py, bridge_tui.py, and terminal.py — Bridge CLI, private SQLite mission state, controller, bounded status projection, typed provider-session identity, bounded operation logs, asynchronous capacity observer and terminal UI, and isolated tmux station.
  • llm_tools/usage_service.py — local-only llm-usage sampler service (Unix socket, latest snapshot, append-only history; systemd user service / launchd LaunchAgent install helpers).
  • llm_tools/capacity.py — generic ProviderId, CapacityKind, CapacityScope, ProviderSnapshot, and UsageDecision dataclasses plus the decide/validate_scope/scope_pace helpers. All provider-specific reader code lives outside this module.
  • llm_tools/providers/kilo.py — Kilo Code CLI adapter (parser for kilo stats --days <MTD> output, env-var fallback, command construction).
  • llm_tools/providers/minimax.py — MiniMax adapter (parser for mmx quota show --output json output, env-var fallback, command construction).
  • Python modules: llm_tools/usage.py, llm_tools/scheduler.py, llm_tools/ralph_robin.py, llm_tools/sleep_soak.py, llm_tools/copilot_refresh.py, and package marker llm_tools/__init__.py.
  • Public direct-run command files: llm-usage, llm-scheduler, ralph-robin, llm-sleep-soak, llm-bridge.
  • Regression tests: tests/ with pytest and fake provider commands.
  • Test helpers: tests/conftest.py; main suites: tests/test_contracts.py, tests/test_additional_paths.py, tests/test_capacity.py, tests/test_kilo.py, tests/test_minimax.py, tests/test_ralph_kilo.py, tests/test_zai.py, tests/test_enabled_providers.py.
  • Project/package config: pyproject.toml.
  • Import/test bootstrap: sitecustomize.py.
  • CI: .github/workflows/test.yml.
  • User docs: README.md.
  • Local planning/work logs: PLANS.md, WORKLOG.md.
  • Runtime data root: ${XDG_CACHE_HOME:-$HOME/.cache}/llm-tools, one subdirectory per tool. Legacy ~/.cache/llm-usage, ~/.cache/llm-scheduler, and ~/.cache/ralph-robin dirs are auto-migrated by migrate_legacy_cache_dirs in llm_tools/common.py.
  • Usage cache and samples log: ${XDG_CACHE_HOME:-$HOME/.cache}/llm-tools/llm-usage (claude-status.json, claude-usage-api.json, llm-usage.log)
  • Usage service history/logs: ${XDG_CACHE_HOME:-$HOME/.cache}/llm-tools/llm-usage/service (latest.json, history.jsonl, service logs)
  • Usage service socket/pid: ${XDG_RUNTIME_DIR:-/tmp/llm-tools-$UID} (llm-usage.sock, llm-usage.pid) so Unix socket paths stay below platform length limits.
  • Copilot background refresh helper: llm_tools/copilot_refresh.py, launched by read_copilot for detached cache refreshes.
  • Bridge durable state: ${XDG_STATE_HOME:-$HOME/.local/state}/llm-tools/llm-bridge (override LLM_BRIDGE_STATE_DIR); SQLite mission/task/event/operation state, controller runtime files, verifier artifacts, and controller logs are stored below this private state directory. Provider-run logs are bounded by per-mission settings (default 4 MiB per file, three rotations, latest 20 run directories); pruned operation logs retain size and SHA-256 audit metadata.
  • Bridge tmux socket: ${XDG_RUNTIME_DIR}/llm-bridge/m-<mission-hash>.sock when a suitable private runtime directory is available, otherwise /tmp/lb-$UID/m-<mission-hash>.sock. This short private path avoids Unix socket length limits. No network listener is used.
  • Scheduler run logs: ${XDG_CACHE_HOME:-$HOME/.cache}/llm-tools/llm-scheduler/logs
  • Ralph Robin run logs: ${XDG_CACHE_HOME:-$HOME/.cache}/llm-tools/ralph-robin/logs
  • Ralph Robin state: ${XDG_CACHE_HOME:-$HOME/.cache}/llm-tools/ralph-robin/state.json
  • Suspend cycle ledger (durable, fsync'd; shared by ralph-robin and the soak): ${XDG_CACHE_HOME:-$HOME/.cache}/llm-tools/ralph-robin/suspend-ledger.jsonl
  • Sleep-soak run logs: ${XDG_CACHE_HOME:-$HOME/.cache}/llm-tools/llm-sleep-soak/logs

Read the full file on GitHub · 357 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 Changed · +9 lines · +537 tokens per session cda8bc5a89be
  2. 18d ago Changed · +2 lines · +83 tokens per session 65ba2df8bd65
  3. 26d ago Changed · +1 lines · +158 tokens per session 0988f00b8ec2
  4. 1mo ago First seen · 345 lines · 11,870 tokens per session scan A d624ca9d3ad6

Subscribe to this mod's changes

llm-tools AGENTS.md is an instructions file published in the GitHub repository chrisgleissner/llm-tools (2 stars, last pushed yesterday), licensed Apache-2.0. It adds 12,648 tokens to every session, about $0.0506 per session on Opus 5.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.