home / skills / bityoungjae / marketplace / config-auditing

This skill audits Neovim configuration for issues, deprecated APIs, and optimizations, delivering actionable checklists and best practices.

npx playbooks add skill bityoungjae/marketplace --skill config-auditing

Review the files below or copy the command above to add this skill to your agents.

Files (4)
SKILL.md
3.9 KB
---
name: config-auditing
description: "Neovim configuration audit knowledge base. Use when: reviewing config files for issues, checking deprecated APIs, optimizing settings, or performing health checks. Provides checklists, best practices, and version-specific deprecated API detection patterns."
allowed-tools: Read, Bash, Grep, Glob
context: fork
---

# Neovim Configuration Auditing Skill

Systematic configuration analysis for identifying issues, optimizations, and deprecated API usage in Neovim setups.

## Supporting Documents

| Document | Purpose | When to Use |
|----------|---------|-------------|
| [audit-checklist.md](audit-checklist.md) | Structured audit categories with detection patterns | Systematic config review |
| [best-practices.md](best-practices.md) | lazy.nvim patterns, vim.opt usage, keymap conventions | Optimization suggestions |
| [deprecated-apis.md](deprecated-apis.md) | Version-specific deprecated APIs with grep patterns | Compatibility checks |

## Quick Validation Commands

Run these headless commands for rapid assessment:

```bash
# Get Neovim version
nvim --version | head -1

# Get config path
nvim --headless -c "lua print(vim.fn.stdpath('config'))" -c "qa" 2>&1

# Count Lua files in config
find ~/.config/nvim -name "*.lua" 2>/dev/null | wc -l

# Count plugins (lazy.nvim)
ls ~/.local/share/nvim/lazy 2>/dev/null | wc -l

# Check for deprecated vim.api.nvim_buf_set_option usage
grep -rn "nvim_buf_set_option\|nvim_win_set_option" ~/.config/nvim --include="*.lua" 2>/dev/null | head -10

# Check startup time
nvim --startuptime /tmp/nvim-startup.log +q && tail -5 /tmp/nvim-startup.log

# Validate Lua syntax in config
nvim --headless -c "lua dofile(vim.fn.stdpath('config')..'/init.lua')" -c "qa" 2>&1

# Check for error on startup
nvim --headless -c "qa" 2>&1 | head -20
```

## Scoring Criteria

Assign grades based on issue severity and count:

| Grade | Criteria | Description |
|-------|----------|-------------|
| **A** | 0 Critical, 0-2 Warnings | Excellent - Production ready |
| **B** | 0 Critical, 3-5 Warnings | Good - Minor improvements possible |
| **C** | 0 Critical, 6+ Warnings OR 1 Critical | Acceptable - Needs attention |
| **D** | 2-3 Critical issues | Poor - Significant problems |
| **F** | 4+ Critical issues | Failing - Requires immediate fixes |

### Issue Severity Definitions

**Critical**: Security risks, breaking deprecated APIs (removed in current version), runtime errors
**Warning**: Performance issues, deprecated APIs (still working), code style violations
**Suggestion**: Optional improvements, modern alternatives, organization tips

## Audit Workflow

1. **Gather Environment Info**
   - Neovim version (determines which deprecated APIs apply)
   - Plugin manager type (lazy.nvim, packer.nvim, etc.)
   - Config structure (single file vs modular)

2. **Run Category Audits**
   - Follow [audit-checklist.md](audit-checklist.md) categories in order
   - Use grep patterns to detect issues programmatically
   - Note severity for each finding

3. **Check Version Compatibility**
   - Reference [deprecated-apis.md](deprecated-apis.md) for user's Neovim version
   - Flag APIs deprecated OR removed in their version

4. **Apply Best Practices**
   - Compare against [best-practices.md](best-practices.md)
   - Suggest optimizations where applicable

5. **Calculate Grade**
   - Count Critical/Warning/Suggestion issues
   - Apply scoring criteria above
   - Provide overall health assessment

## Output Template

```xml
<audit_report>
## Summary
- **Grade**: [A-F]
- **Neovim Version**: [detected version]
- **Config Location**: [path]
- **Plugin Count**: [count]

## Critical Issues
[List each critical issue with file:line and fix]

## Warnings
[List each warning with file:line and recommendation]

## Suggestions
[List optional improvements]

## Statistics
| Metric | Value |
|--------|-------|
| Total Lua files | X |
| Total lines | Y |
| Plugins | Z |
| Startup time | Nms |
| Deprecated APIs | N |
</audit_report>
```

Overview

This skill audits Neovim configurations to find issues, deprecated API usage, performance pitfalls, and optimization opportunities. It provides checklists, headless validation commands, and a version-aware detection of removed or deprecated APIs. Use it to generate a clear health score and actionable remediation items for any Neovim setup.

How this skill works

The skill inspects the user's Neovim environment, config layout, and plugin manager by running headless validation commands and grep-style detection patterns against Lua and vimscript files. It cross-references the detected Neovim version with a curated deprecated-API list to flag incompatible or removed calls. Findings are categorized by severity and summarized with a grade, stats, and concrete fixes.

When to use it

  • Performing a first-time or periodic health check of a Neovim configuration
  • Reviewing configs before upgrading Neovim to a newer major/minor version
  • Checking for deprecated or removed API usage that may break startup
  • Optimizing startup time and plugin loading strategies
  • Validating config syntax and detecting runtime errors during headless startup

Best practices

  • Run headless validation commands to capture startup errors and startup time before manual testing
  • Prefer vim.opt and lazy.nvim patterns recommended for modern Neovim setups
  • Use grep patterns to detect deprecated APIs and flag them by Neovim version
  • Modularize config into vetted modules to simplify audits and isolate failures
  • Document plugin manager type and plugin count in the audit report for reproducibility

Example use cases

  • Quickly assess whether a config will break after a Neovim upgrade by scanning for removed APIs
  • Generate an audit report with grade, critical issues, warnings, and suggestions for a client or team
  • Optimize a slow startup by identifying heavy plugins and measuring startuptime
  • Validate Lua syntax and capture runtime errors with headless dofile and qa checks
  • Create automated CI checks that fail when critical deprecated API usage is introduced

FAQ

What determines a Critical vs Warning issue?

Critical issues are runtime errors, security risks, or use of APIs removed in the detected Neovim version. Warnings are performance problems, still-working deprecated APIs, or style violations.

How is the overall grade calculated?

Grades map to counts of Critical and Warning findings: A for 0 critical and 0–2 warnings, B for 0 critical and 3–5 warnings, C for 0 critical and 6+ warnings or 1 critical, D for 2–3 criticals, and F for 4+ criticals.