llm-tools AGENTS.md

llm-tools AGENTS.md is an instructions file for Codex, OpenCode from chrisgleissner/llm-tools. It costs 11,870 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

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/chrisgleissner/llm-tools/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.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.svg" alt="Measured on agentmods" height="20"></a>
Per session 11,870 This file is loaded in full into every session.
When invoked 11,870 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.11870 $0.11870
Opus 5 $0.05935 $0.05935
Sonnet 5 $0.02374 $0.02374
Haiku 4.5 $0.01187 $0.01187

Measured 4d ago against content hash d624ca9d3ad6, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 4d 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 · 345 lines

How it starts

The opening of the file, as written. The whole thing — 345 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_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/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.
  • 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.
  • 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.
  • 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 · 345 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. 4d 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 1mo ago), licensed Apache-2.0. It adds 11,870 tokens to every session, about $0.0593 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.