Code Preview.Nvim
Description
A Neovim plugin that shows a live diff preview of AI coding agent's file edits before you accept or reject them.
Installation
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open the source below and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
README
code-preview.nvim
A Neovim plugin that shows a **diff preview before your AI coding agent applies any file change** — letting you review exactly what's changing before accepting.
Supports [Claude Code](https://docs.anthropic.com/en/docs/claude-code) and [OpenCode](https://opencode.ai) as backends.
Demo
Claude Code

OpenCode

Table of Contents
- Features
- Requirements
- Installation
- Quick Start
- How it works
- Configuration
- Commands
- Diff Layouts
- Neo-tree Integration
- Testing
- Troubleshooting
Features
- Diff preview — side-by-side or inline diff opens in Neovim before any file is written
- Multiple layouts — tab, vsplit, or GitHub-style inline diff with syntax highlighting
- Neo-tree integration — file tree indicators show which files are being modified, created, or deleted
- Multi-backend — works with Claude Code CLI and OpenCode
- No Python dependency — file transformations use
nvim --headless -l
Requirements
- Neovim >= 0.9
**For Claude Code backend:**
- Claude Code CLI with hooks support
- jq — for JSON parsing in hook scripts
**For OpenCode backend:**
- OpenCode >= 1.3.0
Installation
lazy.nvim
{
"Cannon07/code-preview.nvim",
config = function()
require("code-preview").setup()
end,
}
Manual (path-based)
vim.opt.rtp:prepend("/path/to/code-preview.nvim")
require("code-preview").setup()
Quick Start
Claude Code
- Install the plugin and call
setup() - Open a proje
Related Skills
Agency Agents
A complete AI agency at your fingertips - From frontend wizards to Reddit community ninjas, from whimsy inject
AI Firecrawl
🔥 The API to search, scrape, and interact with the web for AI
AI Artifacts Builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web tech
AI CrewAI
Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewA
AI TrendRadar
⭐AI-driven public opinion & trend monitor with multi-platform aggregation, RSS, and smart alerts.🎯 告别信息过载,你的
AI mem0
| Universal memory layer for AI Agents | 51341 | 221 | 1 |
AI