claudecode.nvim AGENTS.md

Repository instructions for claudecode.nvim, a Neovim plugin written in Lua. They describe its folders, development tools, checks, formatting, and tests.

In plain words
What is it for?
Use them when editing the plugin, running syntax and lint checks, formatting Lua code, running Busted tests, or cleaning coverage files.
Why use it?
They show coding agents where each part belongs and which commands verify that changes are valid.

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

Made for: Codex, OpenCode.

Per session 747 This file is loaded in full into every session.
When invoked 747 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.00747 $0.00747
Opus 5 $0.00374 $0.00374
Sonnet 5 $0.00149 $0.00149
Haiku 4.5 $0.00075 $0.00075

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

Security

Grade A, and why

claudecode.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 2d 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 · 48 lines

How it starts

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

Repository Guidelines

Project Structure & Module Organization

  • lua/claudecode/: Core plugin modules (init.lua, config.lua, diff.lua, terminal/, server/, tools/, logger.lua, etc.).
  • plugin/: Lightweight loader that guards startup and optional auto-setup.
  • tests/: Busted test suite (unit/, integration/, helpers/, mocks/).
  • fixtures/: Minimal Neovim configs for manual and integration testing.
  • scripts/: Development helpers; dev-config.lua aids local testing.

Build, Test, and Development Commands

  • Setup (one time): install mise, then mise install && mise run setup to provision the toolchain and build the Lua test rocks. Activate mise in your shell (eval "$(mise activate bash)" in your rc) so bare tools like busted/nvim are on PATH; otherwise prefix with mise exec --. Run mise tasks to list all tasks.
  • mise run check: Syntax checks + luacheck on lua/ and tests/.
  • mise run format: Format the tree with treefmt (replaces the former nix fmt).
  • mise run test: Run Busted tests with coverage (outputs luacov.stats.out).
  • mise run clean: Remove coverage artifacts. Examples:
  • Run all tests: mise run test
  • Run one file: busted -v tests/unit/terminal_spec.lua

Coding Style & Naming Conventions

  • Lua: 2‑space indent, 120‑column width, double quotes preferred.
  • Formatting: StyLua configured in .stylua.toml (require-sort enabled).
  • Linting: luacheck with settings in .luacheckrc (uses luajit+busted std).
  • Modules/files: lower_snake_case; return a module table M with documented functions (EmmyLua annotations encouraged).
  • Avoid one-letter names; prefer explicit, testable functions.

Testing Guidelines

  • Frameworks: Busted + Luassert; Plenary used where Neovim APIs are needed.
  • File naming: *_spec.lua or *_test.lua under tests/unit or tests/integration.
  • Mocks/helpers: place in tests/mocks and tests/helpers; prefer pure‑Lua mocks.
  • Coverage: keep high signal; exercise server, tools, diff, and terminal paths.
  • Quick tip: prefer mise run test (it sets LUA_PATH and coverage flags).

Read the full file on GitHub · 48 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. 2d ago First seen · 48 lines · 747 tokens per session scan A e0463d39d582

Subscribe to this mod's changes

claudecode.nvim AGENTS.md is an instructions file published in the GitHub repository coder/claudecode.nvim (3,034 stars, last pushed 20d ago), licensed MIT. It adds 747 tokens to every session, about $0.0037 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.