Agent skill
nvim-context
Get the current Neovim context as JSON (cursor position, current file, visual selection and diagnostics) to help answer questions about code at the current cursor position, visual selections and diagnostics. Use when users ask about "this line", "current file", "selection" or need context about their Neovim editor state.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/development/nvim-context
SKILL.md
Neovim context provider
Purpose
Provides live context from the user's Neovim editor session to help answer context-aware questions about code.
How it works
- Executes the
nvim-contexttool to get the current editor state. - Returns JSON data including cursor position, open file, visual selection and diagnostics.
- Use this information to understand references like "this line", "the selection", "current file", etc.
Usage examples
- "What's wrong with this line?" → Check diagnostics at cursor
- "Explain the selected code" → Analyze visual selection
- "What file am I in?" → Return current file path
- "Show me all errors" → List all LSP diagnostics
Technical details
To use this skill, execute the nvim-context CLI command which outputs JSON:
{
"cursor": {
"line": 43,
"col": 3
},
"file": "/path/to/current/file.rb",
"selection": null,
"diagnostics": []
}
Implementation
When this skill is loaded, execute nvim-context via Bash and parse the JSON
output to understand the current editor state. Use the returned data to answer
user questions about their code.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?