nvim-context

A way to read the live state of a Neovim editor, including open files, windows, the cursor, selected text, and unsaved changes.

In plain words
What is it for?
It is for working accurately with the file, selection, or editor view currently open in a running Neovim session.
Why use it?
The editor can contain changes that are not yet saved to disk, so reading its live state prevents answers and edits based on outdated files.

Skill for Claude CodeCodex

Part of the vibing-nvim plugin — 11 skills, 1 agent shipped together

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 skills/shabaraba/vibing.nvim/nvim-context
Any agent
npx skills add shabaraba/vibing.nvim --skill nvim-context
Clone the repo
git clone --depth 1 https://github.com/shabaraba/vibing.nvim

Made for: Claude Code, Codex.

Or install vibing-nvim, the plugin that ships this one along with the rest of its 11 skills, 1 agent.

Per session 75 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,058 The whole file, excluding the scripts and references it only reads on demand.
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.00075 $0.01058
Opus 5 $0.00037 $0.00529
Sonnet 5 $0.00015 $0.00212
Haiku 4.5 $0.00007 $0.00106

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

Security

Grade A, and why

nvim-context 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 3d 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-plugin/skills/nvim-context/SKILL.md · 68 lines

How it starts

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

Neovim Live Context

When the vibing-nvim MCP server is available, a real Neovim instance is running and its in-memory state (open buffers, splits, cursor position, unsaved edits) is the ground truth — it can differ from what's on disk. Prefer live state over assumptions whenever the user references "this file", "current buffer", "my selection", "what I have open", etc.

Calling the tools

Two things decide whether a vibing-nvim tool call reaches the editor the user is looking at. Both apply to every skill and subagent in this plugin, so they are stated once here.

Which name. Tools are written below as mcp__vibing-nvim__<tool>, which is the plain user-level MCP server registration. Loaded as a Claude Code plugin — which is how vibing.nvim itself provides them, handing the CLI this directory with --plugin-dir — they appear as mcp__plugin_vibing-nvim_vibing-nvim__<tool> instead. If the plain prefix is not available, look for a tool whose name ends in the one you need rather than assuming it is missing.

Which instance. Every tool takes an rpc_port naming the target Neovim.

  • Inside a vibing.nvim chat, the port is in your system prompt for the turn — pass that exact value on every call.
  • A subagent does not inherit it. Take it from your task prompt, and if it isn't there, call nvim_list_instances and use the port it reports.
  • Anywhere else (an ordinary Claude Code session that loaded this plugin some other way — a --plugin-dir of your own, or a leftover install), nvim_list_instances is the only way to know. If it lists more than one, say which you found and ask rather than guessing.

Omitting rpc_port works only while exactly one Neovim is live: reads fall back to the instance registry, and writes refuse outright. Worktrees and concurrent chats make more than one the normal case, so treat the fallback as a diagnostic, not a default.

Workflow

  1. Ground yourself first. Call mcp__vibing-nvim__nvim_get_info for the active file and mcp__vibing-nvim__nvim_list_windows / mcp__vibing-nvim__nvim_list_buffers to see everything open across splits/tabs before deciding which file the user means.
  2. Use the real selection. If the user mentions a visual selection, call mcp__vibing-nvim__nvim_get_visual_selection instead of asking them to paste code.
  3. Respect unsaved state. mcp__vibing-nvim__nvim_get_buffer returns the buffer's current content, which may include unsaved edits that differ from the file on disk — read the buffer, not the file, when a buffer for that path is already loaded.
  4. Cursor-relative requests. For "here", "at my cursor", "this function" type requests, use mcp__vibing-nvim__nvim_get_cursor to resolve the exact line/column before acting.
  5. Actual edits still go through your normal file tools (Read/Edit/Write). The vibing-nvim MCP tools are for observing and controlling the live editor (buffers, windows, commands), not a substitute for making code changes.

Read the full file on GitHub · 68 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. 3d ago First seen · 68 lines · 75 tokens per session scan A 3448f6b192c9

Subscribe to this mod's changes

nvim-context is a skill published in the GitHub repository shabaraba/vibing.nvim (13 stars, last pushed 3d ago), licensed MIT. It adds 75 tokens to every session and 1,058 once invoked, about $0.0004 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.

Related

Other skills, from other repositories

add-sponsor

Add, move or remove a sponsor logo in the README and on the install page. Use when a GitHub sponsor reaches the Team or Company tier, when a sponsorship lapses, or when a sponsor sends a new logo asset.

agarwalvishal/claude-chat-exporter · 50 tokens

code-review

Pre-commit code review using code-reviewer agent for bug detection, security analysis, and quality assurance. Manual invocation only. Use before git commits to catch issues early. Blocks commits on REQUESTCHANGES verdict.

arpitnath/claude-capsule-kit · 45 tokens

debug

Systematic debugging using error-detective and debugger agents instead of manual investigation. Triggers automatically on: error, bug, broken, failing, exception, stack trace, test failure. Orchestrates RCA-first approach with parallel agent investigation.

arpitnath/claude-capsule-kit · 50 tokens

deep-context

Build deep codebase understanding using Capsule context, progressive-reader, and specialist agents instead of overwhelming main context. Triggers on: don't have context, understand codebase, learn about, need background. Implements progressive context building.

arpitnath/claude-capsule-kit · 47 tokens

workflow

Systematic task orchestration for complex multi-step tasks. Triggers automatically when detecting: complex task, multi-step work, coordinate, orchestrate, break down. Guides through Understand → Strategy → Plan → Execute → Verify phases for comprehensive systematic approach.

arpitnath/claude-capsule-kit · 51 tokens

task-router

Decision matrix for choosing optimal approach to any task. Helps Claude decide when to delegate to sub-agents vs. working directly. Use when starting a new task or unsure of best approach.

arpitnath/claude-capsule-kit · 43 tokens