agent-term.nvim AGENTS.md

agent-term.nvim AGENTS.md is an instructions file for Codex, OpenCode from alsi-lawr/agent-term.nvim. It costs 1,321 tokens per session, scanned A, original, MIT.

A repository guidance document for the agent-term.nvim Neovim plugin. It records project direction, folder responsibilities, naming rules, and validation expectations so code changes fit the existing design.

In plain words
What is it for?
Use it when working on the plugin’s Lua code, especially its terminal sessions, user interface, editor context handling, setup code, or Codex-specific examples.
Why use it?
It gives coding agents the project-specific rules they need when modifying this plugin, reducing inconsistent module boundaries and unsupported compatibility code.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions Codex; mentions OpenCode.

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/alsi-lawr/agent-term.nvim/agents-md
Clone the repo
git clone --depth 1 https://github.com/alsi-lawr/agent-term.nvim

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 agent-term.nvim AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/alsi-lawr/agent-term.nvim/agents-md.svg)](https://agentmods.dev/instructions/alsi-lawr/agent-term.nvim/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/alsi-lawr/agent-term.nvim/agents-md"><img src="https://agentmods.dev/badge/instructions/alsi-lawr/agent-term.nvim/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,321 This file is loaded in full into every session.
When invoked 1,321 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.1 $0.01321 $0.01321
Opus 5 $0.00660 $0.00660
Sonnet 5 $0.00264 $0.00264
Haiku 4.5 $0.00132 $0.00132

Measured 5d ago against content hash 0b8b8a72d593, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

agent-term.nvim 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 5d 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 · 115 lines

How it starts

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

Repository Guidelines

Project Direction

  • Prefer clean, direct design with explicit module boundaries. Add compatibility layers only when there is a concrete supported-compatibility requirement.
  • Keep the plugin agent-neutral. Use agent, session, terminal, or capability-oriented names for new code.
  • Use codex only for the Codex preset/default command, demo material, or user-facing examples that explicitly refer to Codex.
  • Do not add root-level shim modules in lua/agent_term/ just to re-export deeper modules. Require the real module path directly.
  • Favor clear module boundaries over broad compatibility surfaces. If an API is internal, keep it internal and update call sites when it moves.

Project Structure

  • Core plugin code lives in lua/agent_term/.
  • Entry point: lua/agent_term/init.lua.
  • Functional areas are split by concern:
    • lua/agent_term/runtime/: terminal session lifecycle, resume behavior, and shared state.
    • lua/agent_term/ui/: float, panel, and view-controller behavior.
    • lua/agent_term/context/: editor context capture, message building, hook submission, and diagnostics formatting.
    • lua/agent_term/setup/: defaults, preset expansion, schema helpers, commands, and keymaps.
  • Tests live under tests/:
    • tests/spec/: Plenary/Busted specs.
    • tests/helpers/: test utilities.
  • Docs/media live in README.md, docs/, and assets/.

Agent And Context Semantics

  • Agent behavior should be expressed as capabilities on agent, not as hard-coded agent names.
  • Presets may provide defaults, but explicit user config should override preset behavior.
  • Context submission supports agent modes:
    • paste: send context visibly to the running terminal job.
    • hook: emit the configured User autocmd hook and fall back to paste if no receiver handles it.
  • Hook mode is agent-driven, not view-driven. It must work from panel mode, float mode, and source windows while a panel exists.
  • Do not infer hook context support from an agent having hooks generally. For example, Copilot and Opencode use paste mode because their hooks are not compatible with this context-injection path.
  • Panel focus only affects which editor context is used. When the panel is focused, use the last captured source context instead of reading context from the terminal buffer.

Read the full file on GitHub · 115 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. 5d ago First seen · 115 lines · 1,321 tokens per session scan A 0b8b8a72d593

Subscribe to this mod's changes

agent-term.nvim AGENTS.md is an instructions file published in the GitHub repository alsi-lawr/agent-term.nvim (7 stars, last pushed 1mo ago), licensed MIT. It adds 1,321 tokens to every session, about $0.0066 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.