autocontext AGENTS.md

autocontext AGENTS.md is an instructions file for Codex, OpenCode from greyhaven-ai/autocontext. It costs 536 tokens per session, scanned A, original, Apache-2.0.

A guide for coding agents working in the autocontext repository, covering which project area to use, where to run Python and TypeScript commands, setup steps, and checks for keeping implementations consistent.

In plain words
What is it for?
Use it when setting up or modifying the Python toolkit, TypeScript toolkit, terminal interface, or agent integration documentation in that repository.
Why use it?
It prevents commands from being run in the wrong directory and clarifies when changes to public commands, settings, or workflows require matching documentation updates.

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

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

README.md
[![agentmods](https://agentmods.dev/badge/instructions/greyhaven-ai/autocontext/agents-md.svg)](https://agentmods.dev/instructions/greyhaven-ai/autocontext/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/greyhaven-ai/autocontext/agents-md"><img src="https://agentmods.dev/badge/instructions/greyhaven-ai/autocontext/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 536 This file is loaded in full into every session.
When invoked 536 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.00536 $0.00536
Opus 5 $0.00268 $0.00268
Sonnet 5 $0.00107 $0.00107
Haiku 4.5 $0.00054 $0.00054

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

Security

Grade A, and why

autocontext 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 · 89 lines

How it starts

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

Agent Guide

Use this file as the first pointer for coding agents and automation that need to work in or against this repo.

Pick The Right Surface

  • Full autocontext control plane: autocontext/
  • Node/TypeScript toolkit and CLI: ts/
  • Interactive terminal UI: ts/src/tui/
  • External agent usage guide: autocontext/docs/agent-integration.md

Working Directories

  • Run Python commands from autocontext/.
  • Run Node/TypeScript commands from ts/.
  • Run TUI-related commands from ts/.

Most repo-level commands in the READMEs assume one of those package directories as the current working directory.

Setup

Python:

cd autocontext
uv venv
source .venv/bin/activate
uv sync --group dev

TypeScript:

cd ts
npm install

Parity-Last Changes

Implement one runtime first unless cross-runtime parity is user-visible in the same release. If parity is deferred, say where and why in the PR.

Common Checks

Python:

cd autocontext
uv run ruff check src tests
uv run mypy src
uv run pytest

TypeScript:

cd ts
npm run lint
npm test

Public Docs To Keep In Sync

If you change public commands, environment variables, package names, or agent-facing workflows, update the relevant docs in the same change:

  • README.md
  • docs/README.md
  • autocontext/README.md
  • ts/README.md
  • examples/README.md
  • autocontext/docs/agent-integration.md
  • CONTRIBUTING.md
  • CHANGELOG.md

Key References

  • Repo overview: README.md
  • Docs overview: docs/README.md
  • Contributor workflow: CONTRIBUTING.md
  • Python package guide: autocontext/README.md
  • TypeScript package guide: ts/README.md
  • Copy-paste examples: examples/README.md
  • External agent guide: autocontext/docs/agent-integration.md

Intentional Deletions

  • Before restoring deleted modules to make CI green, check whether autocontext/src/ still imports them.
  • If only tests are failing, prefer rewriting or deleting the tests instead of restoring removed modules.
  • Treat importable module paths as compatibility surfaces until callers are rewired or the removal is explicitly accepted as breaking.

Read the full file on GitHub · 89 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 · 89 lines · 536 tokens per session scan A 77ecb3672400

Subscribe to this mod's changes

autocontext AGENTS.md is an instructions file published in the GitHub repository greyhaven-ai/autocontext (1,290 stars, last pushed 2d ago), licensed Apache-2.0. It adds 536 tokens to every session, about $0.0027 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.