claudecode.nvim CLAUDE.md

A project guide for coding agents working on claudecode.nvim, a Neovim plugin that connects to Claude Code through a WebSocket protocol.

In plain words
What is it for?
Use it when modifying the plugin's Lua code or tests and when checking that changes meet the project's quality requirements.
Why use it?
It explains the codebase structure and the commands needed to format, lint, test, build, and clean the plugin.

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/coder/claudecode.nvim/claude-md
Clone the repo
git clone --depth 1 https://github.com/coder/claudecode.nvim
Per session 5,464 This file is loaded in full into every session.
When invoked 5,464 The same file — it is already loaded in full.
Security scan B 1 finding. 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.05464 $0.05464
Opus 5 $0.02732 $0.02732
Sonnet 5 $0.01093 $0.01093
Haiku 4.5 $0.00546 $0.00546

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

Security

Grade B, and why

claudecode.nvim CLAUDE.md scanned grade B with 1 finding 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

2. Check lock file contains `authToken`: `cat ~/.claude/ide/*.lock | jq .authToken`
CLAUDE.md · 528 lines

How it starts

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

CLAUDE.md

This file provides context for Claude Code when working with this codebase.

Project Overview

claudecode.nvim - A Neovim plugin that implements the same WebSocket-based MCP protocol as Anthropic's official IDE extensions. Built with pure Lua and zero dependencies.

Common Development Commands

Testing

  • mise run test - Run all tests using busted with coverage
  • busted tests/unit/specific_spec.lua - Run specific test file
  • busted --coverage -v - Run tests with coverage

Code Quality

  • mise run check - Check Lua syntax and run luacheck
  • mise run format - Format code with treefmt
  • luacheck lua/ tests/ --no-unused-args --no-max-line-length - Direct linting

Build Commands

  • mise run all - RECOMMENDED: Run formatting, linting, and testing (complete validation)
  • mise run test - Run all tests using busted with coverage
  • mise run check - Check Lua syntax and run luacheck
  • mise run format - Format code with treefmt
  • mise run clean - Remove generated test files
  • mise tasks - List available tasks

Best Practice: Always use mise run all at the end of editing sessions for complete validation.

Development with mise

The dev toolchain is provisioned by mise (see mise.toml), which replaced the former Nix flake devShell.

  • mise install - Install all tools (Neovim, LuaJIT, formatters, etc.)
  • mise run setup - Build the Lua test rocks (busted/luacheck/luacov) into ./.luarocks
  • mise run all - Format, lint, and test
  • mise run format - Format all files with treefmt
  • Activate mise in your shell so its tools (and fixtures/bin) are on PATH — add eval "$(mise activate bash)" (or zsh/fish) to your shell rc. (mise run <task> works without activation.)

Integration Testing with Fixtures

The fixtures/ directory contains test Neovim configurations for verifying plugin integrations:

  • vv <config> - Start Neovim with a specific fixture configuration
  • vve <config> - Start Neovim with a fixture config in edit mode
  • list-configs - Show available fixture configurations
  • Source fixtures/nvim-aliases.sh to enable these commands

Read the full file on GitHub · 528 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 · 528 lines · 5,464 tokens per session scan B 7cb9a1271568

Subscribe to this mod's changes

claudecode.nvim CLAUDE.md is an instructions file published in the GitHub repository coder/claudecode.nvim (3,034 stars, last pushed 21d ago), licensed MIT. It adds 5,464 tokens to every session, about $0.0273 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.