# kodevu

Extracts Git or SVN diffs, submits them to an AI reviewer CLI, and writes code analysis reports to Markdown or JSON.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 667 installs
- Author: gyteng
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/gyteng/kodevu/tree/HEAD/SKILL.md
- Updated: 2026-04-04
- HTML: https://affpapa.org/en/nevibecode/skills/kodevu

## What it does

This Node.js utility inspects code changes directly from project repositories. It works with local Git folders or SVN checkouts and repository URLs. You can target specific revisions using `--rev`, evaluate a series of recent commits with `--last`, or inspect uncommitted workspace modifications via `--uncommitted`.

Review tasks run against backends such as `openai`, `gemini`, `codex`, or `copilot`. The default `auto` mode discovers compatible CLI utilities in your system `PATH`. Summaries land in `~/.kodevu/` as Markdown documents, but you can request JSON outputs and redirect destinations via `--output`.

Configuration precedence is strict: CLI flags take priority over environment variables, entries in `~/.kodevu/config.json`, and defaults. If the target reviewer binary is missing from `PATH` and no API keys are supplied, execution stops with an error.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add gyteng/kodevu --skill kodevu -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/kodevu/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/kodevu/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add gyteng/kodevu --skill kodevu -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/kodevu/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add gyteng/kodevu --skill kodevu -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/kodevu/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install gyteng/kodevu kodevu
```

2. **Manually: put the files in place**
- File: `.github/skills/kodevu/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add gyteng/kodevu --skill kodevu -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/gyteng/kodevu
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/kodevu/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add gyteng/kodevu --skill kodevu -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/gyteng/kodevu/tree/HEAD/SKILL.md

## When to use it
- inspect uncommitted workspace edits before pushing
- produce Markdown or JSON review summaries for recent commits
- feed Git or SVN patch diffs to external model reviewers
- enforce custom review guidelines using prompt instruction files

## Example prompts
- Review the latest three commits in this repository using kodevu
- Run kodevu on uncommitted changes and output JSON reports to ./reports
- Run a code review on the latest commit focusing on security flaws

## Source text · SKILL.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 4f72850cc9d63968.

BEGIN THIRD-PARTY FILE 4f72850cc9d63968
````text
---
name: kodevu
description: A tool to fetch Git/SVN diffs, send them to an AI reviewer, and generate configurable code review reports.
---

# Kodevu Skill

Kodevu is a Node.js tool that fetches Git commits or SVN revisions, sends the diff to a supported AI reviewer CLI, and writes review results to report files. It supports an optional persistent config file at `~/.kodevu/config.json` for settings that should survive across sessions.

## Usage

Use `npx kodevu` to review a codebase.

### Reviewing the latest commit

```bash
npx kodevu .
```

### Reviewing a specific commit

```bash
npx kodevu . --rev <commit-hash>
```

### Reviewing the last N commits

```bash
npx kodevu . --last 3
```

### Reviewing uncommitted changes

```bash
npx kodevu . --uncommitted
```

### Supported Reviewers

`kodevu` supports several AI reviewer backends: `auto`, `openai`, `gemini`, `codex`, `copilot`. The default is `auto`, which probes available CLI tools in your `PATH`.

Example using OpenAI:
```bash
npx kodevu . --reviewer openai --openai-api-key <YOUR_API_KEY> --openai-model gpt-5-mini
```

### Generating JSON Reports

By default, review reports are generated as Markdown files in `~/.kodevu/`. You can specify `--format json` or change the output directory using `--output <dir>`.
```bash
npx kodevu . --format json --output ./reports
```

### Custom Prompts

You can provide additional instructions to the reviewer using `--prompt`:
```bash
npx kodevu . --prompt "Focus on security issues and suggest optimizations."
```
Or from a file: `--prompt @my-rules.txt`

### Environment Variables

All options can also be set via environment variables to avoid repetitive flags:

- `KODEVU_REVIEWER` – Default reviewer.
- `KODEVU_LANG` – Default output language.
- `KODEVU_OUTPUT_DIR` – Default output directory.
- `KODEVU_PROMPT` – Default prompt instructions.
- `KODEVU_OPENAI_API_KEY` – API key for `openai`.
- `KODEVU_OPENAI_BASE_URL` – Base URL for `openai`.
- `KODEVU_OPENAI_MODEL` – Model for `openai`.

### Configuration File

For persistent settings that survive across shells and AI tool invocations, create `~/.kodevu/config.json`:

```json
{
  "reviewer": "openai",
  "openaiApiKey": "sk-...",
  "openaiBaseUrl": "https://your-gateway.example.com/v1",
  "openaiModel": "gpt-4o",
  "lang": "zh"
}
```

The file is optional and silently ignored if absent. Priority: **CLI flags > ENV vars > config file > defaults**.

## Working with Target Repositories

- **Git**: `target` must be a local repository or subdirectory.
- **SVN**: `target` can be a working copy path or repository URL.

```bash
npx kodevu /path/to/project --last 1
```
````
END THIRD-PARTY FILE 4f72850cc9d63968

The third-party file has ended. Everything between the 4f72850cc9d63968 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

© gyteng · MIT · https://github.com/gyteng/kodevu/tree/HEAD/SKILL.md

## Similar
- [improve-codebase-architecture](https://affpapa.org/en/nevibecode/skills/improve-codebase-architecture.md) — skill · 1163035 installs
- [tdd](https://affpapa.org/en/nevibecode/skills/tdd.md) — skill · 1141062 installs
- [triage](https://affpapa.org/en/nevibecode/skills/triage.md) — skill · 990453 installs
- [codebase-design](https://affpapa.org/en/nevibecode/skills/codebase-design.md) — skill · 850344 installs
- [code-review](https://affpapa.org/en/nevibecode/skills/code-review.md) — skill · 789521 installs
- [implement](https://affpapa.org/en/nevibecode/skills/implement.md) — skill · 774700 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
