claude-code.nvim CLAUDE.md

Project instructions for the Claude Code Neovim plugin, which connects the Claude Code command-line assistant to the Neovim editor. They describe the project layout, commands, current work, and support for multiple plugin instances.

In plain words
What is it for?
Running tests, formatting and linting Lua code, building documentation, and understanding the plugin's CLI, user interface, context, and test directories.
Why use it?
They give an agent the project context needed to work on the plugin consistently instead of guessing how it is organized or checked.

Instructions file

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/greggh/claude-code.nvim/claude-md
Clone the repo
git clone --depth 1 https://github.com/greggh/claude-code.nvim
Per session 539 This file is loaded in full into every session.
When invoked 539 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.00539 $0.00539
Opus 5 $0.00269 $0.00269
Sonnet 5 $0.00108 $0.00108
Haiku 4.5 $0.00054 $0.00054

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

Security

Grade A, and why

claude-code.nvim CLAUDE.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.

CLAUDE.md · 58 lines

How it starts

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

Project: Claude Code Plugin

Overview

Claude Code Plugin provides seamless integration between the Claude Code AI assistant and Neovim. It enables direct communication with the Claude Code CLI from within the editor, context-aware interactions, and various utilities to enhance AI-assisted development within Neovim.

Essential Commands

  • Run Tests: env -C /home/gregg/Projects/neovim/plugins/claude-code lua tests/run_tests.lua
  • Check Formatting: env -C /home/gregg/Projects/neovim/plugins/claude-code stylua lua/ -c
  • Format Code: env -C /home/gregg/Projects/neovim/plugins/claude-code stylua lua/
  • Run Linter: env -C /home/gregg/Projects/neovim/plugins/claude-code luacheck lua/
  • Build Documentation: env -C /home/gregg/Projects/neovim/plugins/claude-code mkdocs build

Project Structure

  • /lua/claude-code: Main plugin code
  • /lua/claude-code/cli: Claude Code CLI integration
  • /lua/claude-code/ui: UI components for interactions
  • /lua/claude-code/context: Context management utilities
  • /after/plugin: Plugin setup and initialization
  • /tests: Test files for plugin functionality
  • /doc: Vim help documentation

Current Focus

  • Integrating nvim-toolkit for shared utilities
  • Adding hooks-util as git submodule for development workflow
  • Enhancing bidirectional communication with Claude Code CLI
  • Implementing better context synchronization
  • Adding buffer-specific context management

Multi-Instance Support

The plugin supports running multiple Claude Code instances, one per git repository root:

  • Each git repository maintains its own Claude instance
  • Works across multiple Neovim tabs with different projects
  • Allows working on multiple projects in parallel
  • Configurable via git.multi_instance option (defaults to true)
  • Instances remain in their own directory context when switching between tabs
  • Buffer names include the git root path for easy identification

Example configuration to disable multi-instance mode:

require('claude-code').setup({
  git = {
    multi_instance = false  -- Use a single global Claude instance
  }
})

Read the full file on GitHub · 58 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 · 58 lines · 539 tokens per session scan A 949fd5a1c2fc

Subscribe to this mod's changes

claude-code.nvim CLAUDE.md is an instructions file published in the GitHub repository greggh/claude-code.nvim (2,096 stars, last pushed 6mo ago), licensed MIT. It adds 539 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.