# review-hog-perspective-logic-correctness

review-hog-perspective-logic-correctness reviews one slice of a pull request for correctness: arithmetic, branches, data mapping, database queries. Useful when you want a focused second pass before merging.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 187 installs · ★ 101 repo stars
- Author: PostHog
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/PostHog/ai-plugin/tree/HEAD/skills/review-hog-perspective-logic-correctness/SKILL.md
- Updated: 2026-10-24
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/review-hog-perspective-logic-correctness

## What it does

The skill reads a chunk of a pull request and hunts for mistakes in the logic: wrong arithmetic, branches that miss a case, fields dropped during mapping, queries that come back with the wrong rows. State updates in frontend code get a look too, as do blocking SQL calls issued from async code. Prompts for an LLM are in scope as well, including how the answer is parsed and how token limits are handled.

What you get is a checklist over four areas plus a handful of `rg` searches: for calculation code, for conditionals and `switch`, for SQL keywords, for state setters. Findings land only on files that carry real logic. Tests and config are read for context and never flagged.

It is one of several viewpoints running over the same diff in parallel. Security and performance belong to other perspectives, and a later dedup pass sorts out whatever overlaps. Run on its own, it covers just one part of a review.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add PostHog/ai-plugin --skill review-hog-perspective-logic-correctness -a claude-code
```

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

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add PostHog/ai-plugin --skill review-hog-perspective-logic-correctness -a codex
```

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

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add PostHog/ai-plugin --skill review-hog-perspective-logic-correctness -a cursor
```

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

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install PostHog/ai-plugin skills/review-hog-perspective-logic-correctness
```

2. **Manually: put the files in place**
- File: `.github/skills/review-hog-perspective-logic-correctness/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add PostHog/ai-plugin --skill review-hog-perspective-logic-correctness -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/PostHog/ai-plugin --path skills/review-hog-perspective-logic-correctness
```

### Windsurf (Devin Desktop)

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

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add PostHog/ai-plugin --skill review-hog-perspective-logic-correctness -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/PostHog/ai-plugin/tree/HEAD/skills/review-hog-perspective-logic-correctness/SKILL.md

## When to use it
- Catch an off-by-one error before merge
- Check that a JOIN and its WHERE clause return the right rows
- Spot a field that disappears during mapping between layers
- Trace an unexpected state mutation in a component
- Confirm a sync SQL call is not running inside async code

## Example prompts
- Review the changes in `billing/calc.py` through the logic and correctness perspective
- Check this diff for missed edge cases and broken queries
- Run a correctness pass over `api/handlers/orders.ts`

## Similar
- [caveman-review](https://affpapa.org/en/nevibecode/skills/caveman-review.md) — skill · 437600 installs
- [code-review-and-quality](https://affpapa.org/en/nevibecode/skills/code-review-and-quality.md) — skill · 92300 installs
- [om-code-review](https://affpapa.org/en/nevibecode/skills/om-code-review.md) — skill · 4200 installs
- [ce-code-review](https://affpapa.org/en/nevibecode/skills/ce-code-review.md) — skill · 4100 installs
- [om-review-prs](https://affpapa.org/en/nevibecode/skills/om-review-prs.md) — skill · 3600 installs
- [review-pr](https://affpapa.org/en/nevibecode/skills/neolabhq-review-pr.md) — skill · 1300 installs

From the same set: [posthog/ai-plugin](https://affpapa.org/en/nevibecode/by/posthog/ai-plugin.md) — 82 cards

---
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
