add-nixvim-plugin
Add Neovim plugins not available in NixVim's official plugin set using extraPlugins and extraConfigLua. Use this skill when the user requests adding a plugin by GitHub URL or mentions a plugin that doesn't exist as a native NixVim module.
Best use case
add-nixvim-plugin is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Add Neovim plugins not available in NixVim's official plugin set using extraPlugins and extraConfigLua. Use this skill when the user requests adding a plugin by GitHub URL or mentions a plugin that doesn't exist as a native NixVim module.
Teams using add-nixvim-plugin should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/add-nixvim-plugin/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How add-nixvim-plugin Compares
| Feature / Agent | add-nixvim-plugin | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Add Neovim plugins not available in NixVim's official plugin set using extraPlugins and extraConfigLua. Use this skill when the user requests adding a plugin by GitHub URL or mentions a plugin that doesn't exist as a native NixVim module.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Add NixVim Plugin
## Overview
Add custom Neovim plugins to NixVim using `extraPlugins` when the plugin isn't available in NixVim's official plugin set. This skill guides through fetching plugin information, creating configuration files, and maintaining consistency with the existing plugin structure.
## When to Use This Skill
Use this skill when:
- User provides a GitHub URL for a Neovim plugin
- User requests a plugin that doesn't have a native NixVim module (e.g., `plugins.plugin-name`)
- User asks how to add plugins not in NixVim
Do NOT use this skill when:
- The plugin already has native NixVim support (use the standard `plugins.plugin-name` configuration)
- User is asking about configuring an already-added plugin
## Workflow
### Step 1: Gather Plugin Information
Fetch information about the plugin from its GitHub repository:
1. Use WebFetch to visit the plugin's GitHub URL
2. Extract:
- Plugin purpose and key features
- Default configuration structure
- Any setup requirements
- Latest stable commit hash or release tag
### Step 2: Determine Plugin Category
Identify the appropriate subdirectory in `config/plugins/`:
- `ui/` - UI enhancements, windows, buffers
- `editing/` - Text editing, manipulation
- `lsp/` - Language server related
- `navigation/` - Movement, jumping
- `git/` - Git integration
- `files/` - File management
- `completion/` - Completion engines
- `search/` - Search and replace
- `terminal/` - Terminal integration
- `workflow/` - Productivity, helpers
- `testing/` - Test frameworks
- `statusline/` - Status line plugins
- `treesitter/` - Treesitter related
- `snippets/` - Snippet engines
- `ai/` - AI assistants
- `langs/` - Language-specific
### Step 3: Create Plugin Configuration File
Create `config/plugins/<category>/<plugin-name>.nix` with this structure:
```nix
# ABOUTME: [Brief description of what the plugin does]
# ABOUTME: [Secondary description line if needed]
{pkgs, ...}: {
extraPlugins = [
(pkgs.vimUtils.buildVimPlugin {
name = "plugin-name";
src = pkgs.fetchFromGitHub {
owner = "github-username";
repo = "repo-name";
rev = "commit-hash-or-tag";
sha256 = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="; # Use fake hash initially
};
})
];
extraConfigLua = ''
require("plugin-name").setup({
-- Start with minimal default configuration
-- Add essential settings only
})
'';
keymaps = [
{
mode = "n";
key = "<leader>xy";
action = "<cmd>PluginCommand<CR>";
options = {
desc = "Brief description";
silent = true;
};
}
];
}
```
**Important notes:**
- Start with fake SHA256 hash - Nix will provide correct hash on first build
- Follow existing keymap groups (`<leader>f` = file, `<leader>u` = UI, `<leader>w` = window, etc.)
- Keep initial configuration minimal - add incrementally as needed
- Include ABOUTME comments at the top of the file
### Step 4: Update default.nix
Add the new plugin file to `config/default.nix` imports in the appropriate section:
```nix
{
imports = [
# ... other imports
./plugins/<category>/<plugin-name>.nix
];
}
```
Maintain alphabetical or logical ordering within each section.
### Step 5: Update Documentation
Update three locations to document the new plugin:
#### 5a. Update recent_plugins in config/options.nix
Add entry at the TOP of the `recent_plugins` table (around line 96):
```lua
{
name = "plugin-name",
date = "YYYY-MM-DD", -- Today's date
description = "Brief description of functionality",
keymaps = {
"<leader>xy = Action Description",
-- additional keymaps
},
usage = "How to use the plugin, key features"
},
```
#### 5b. Add whichkey entries in config/plugins/workflow/whichkey.nix
Add entries to the `spec` array for each keymap:
```nix
{
"__unkeyed-1" = "<leader>xy";
desc = "Action Description";
icon = {
icon = ""; # Choose appropriate Nerd Font icon
color = "blue"; # Choose appropriate color
};
}
```
Icon colors available: blue, yellow, orange, cyan, purple, green, red, azure
#### 5c. Update WISHLIST.md (if applicable)
If the plugin was on the wishlist, mark it as completed or remove the entry.
### Step 6: Build and Test
1. Stage files: `git add .` (required for Nix flakes)
2. Build: `nix build` or `just build`
3. If SHA256 hash error occurs:
- Copy correct hash from error message
- Update the config file with correct hash
- Build again
4. Test: `nix run .` or `just run`
### Step 7: Lazy Loading (Optional)
If the plugin should be lazy-loaded to improve startup time:
1. Read `references/lazy-loading.md` for detailed patterns
2. Modify the plugin configuration to use lz.n
3. Test that the plugin loads correctly when triggered
Common lazy-loading scenarios:
- Load on command: `cmd = "CommandName"`
- Load on keypress: `keys = "<leader>key"`
- Load on event: `event = "BufEnter"`
- Load on filetype: `ft = "python"`
## Troubleshooting
**Build fails with "file not found"**
- Ensure `git add .` was run before building
- Nix flakes only see tracked files
**Wrong SHA256 hash error**
- Expected on first build
- Copy correct hash from error message
- Update config file and rebuild
**Plugin not loading**
- Check plugin is imported in `config/default.nix`
- Verify `extraConfigLua` has no syntax errors
- Ensure plugin name matches exactly (case-sensitive)
**Formatter changes files**
- Pre-commit hooks with alejandra automatically format Nix files
- This is expected behavior
## Resources
See `references/lazy-loading.md` for detailed lazy loading configuration patterns.Related Skills
ontopo
An AI agent skill to search for Israeli restaurants, check table availability, view menus, and retrieve booking links via the Ontopo platform, acting as an unofficial interface to its data.
lets-go-rss
A lightweight, full-platform RSS subscription manager that aggregates content from YouTube, Vimeo, Behance, Twitter/X, and Chinese platforms like Bilibili, Weibo, and Douyin, featuring deduplication and AI smart classification.
grail-miner
This skill assists in setting up, managing, and optimizing Grail miners on Bittensor Subnet 81, handling tasks like environment configuration, R2 storage, model checkpoint management, and performance tuning.
chrome-debug
This skill empowers AI agents to debug web applications and inspect browser behavior using the Chrome DevTools Protocol (CDP), offering both collaborative (headful) and automated (headless) modes.
whisper-transcribe
Transcribes audio and video files to text using OpenAI's Whisper CLI, enhanced with contextual grounding from local markdown files for improved accuracy.
vly-money
Generate crypto payment links for supported tokens and networks, manage access to X402 payment-protected content, and provide direct access to the vly.money wallet interface.
thor-skills
An entry point and router for AI agents to manage various THOR-related cybersecurity tasks, including running scans, analyzing logs, troubleshooting, and maintenance.
ux
This AI agent skill provides comprehensive guidance for creating professional and insightful User Experience (UX) designs, covering user research, information architecture, interaction design, visual guidance, and usability evaluation. It aims to produce actionable, user-centered solutions that avoid generic AI aesthetics.
modal-deployment
Run Python code in the cloud with serverless containers, GPUs, and autoscaling using Modal. This skill enables agents to generate code for deploying ML models, running batch jobs, serving APIs, and scaling compute-intensive workloads.
astro
This skill provides essential Astro framework patterns, focusing on server-side rendering (SSR), static site generation (SSG), middleware, and TypeScript best practices. It helps AI agents implement secure authentication, manage API routes, and debug rendering behaviors within Astro projects.
tech-blog
Generates comprehensive technical blog posts, offering detailed explanations of system internals, architecture, and implementation, either through source code analysis or document-driven research.
advanced-skill-creator
Meta-skill that generates domain-specific skills using advanced reasoning techniques. PROACTIVELY activate for: (1) Create/build/make skills, (2) Generate expert panels for any domain, (3) Design evaluation frameworks, (4) Create research workflows, (5) Structure complex multi-step processes, (6) Instantiate templates with parameters. Triggers: "create a skill for", "build evaluation for", "design workflow for", "generate expert panel for", "how should I approach [complex task]", "create skill", "new skill for", "skill template", "generate skill"