---
title: "crit-tui"
url: "https://claudemods.dev/ko/builds/crit-tui-ad49d9"
source: "https://github.com/tomasz-tomczyk/crit/tree/main/integrations/claude-code-tui"
source_type: "github"
repo: "https://github.com/tomasz-tomczyk/crit/tree/main/integrations/claude-code-tui"
author: "tomasz-tomczyk"
author_handle: "tomasz-tomczyk"
stars: 1354
category: "워크플로 및 CI"
categories: ["workflow"]
tags: ["claude-code", "code-review", "crit", "hooks", "mcp-tools", "plugin", "tui"]
permission_level: 2
scan_complete: true
install: "claude plugin marketplace add tomasz-tomczyk/crit\nclaude plugin install crit-tui@crit"
added: "2026-10-05T17:23:41.137Z"
updated: "2026-11-21T14:16:04Z"
locale: "ko"
content_locale: "ko"
---

# crit-tui

Claude Code 안의 초기 crit입니다. 패널에서 대화, diff 또는 파일에 댓글을 달고 리뷰를 Claude에 보낸 뒤 스레드에서 Claude의 답변을 읽을 수 있습니다.

## Description

# crit-tui

Claude Code 안에서 작동하는 리뷰 루프를 mod로 제공합니다. 대화의 줄, 작업 트리 diff 또는 패널의 파일에 댓글을 달고 리뷰를 한 번에 Claude에 보낼 수 있습니다. Claude는 도구를 통해 각 댓글의 스레드에 답합니다.

**초기 버전입니다.**

## 설치

Claude Code 2.1.287 이상（mods）과 PATH에서 사용할 수 있는 `crit` CLI가 필요합니다.

```
/plugin marketplace add tomasz-tomczyk/crit
/plugin install crit-tui@crit
```

같은 마켓플레이스의 기본 `crit` 플러그인 옆에서 동작하므로 둘 다 사용할 수 있습니다. checkout에서 시험하려면 다음을 실행하세요.

```sh
claude --plugin-dir integrations/claude-code-tui
```

## 사용법

- `/crit-tui` 패널 열기（마지막으로 사용한 소스를 사용하며, 처음에는 대화를 표시）
- `/crit-tui chat`, `/crit-tui diff`, `/crit-tui file <path>` 소스 선택
- `/crit-tui send` 리뷰 보내기, `/crit-tui close` 패널 닫기

패널은 하나의 `Client` 영역입니다. 원시 키와 마우스 이벤트를 받습니다. 한 번 클릭하면 키 입력을 패널에 넘길 수 있습니다（Esc를 누르면 프롬프트로 돌려줍니다）.

| 입력 | 동작 |
| --- | --- |
| 줄 클릭 | 커서를 해당 줄로 이동 |
| 드래그 | 줄 선택 |
| 스레드 클릭 | `r` / `x`의 대상으로 선택 |
| `j` `k`, ↑ ↓, 휠 | 이동 |
| shift+↑ ↓, 또는 `v`를 누른 뒤 이동 | 줄 선택 |
| space / pagedown, ctrl+u / pageup | 페이지 이동 |
| `g` `G`, home end | 위, 아래 |
| `n` `p`, → ← | 다음, 이전 메시지 또는 파일 |
| `l`, tab | 다음 스레드 |
| `c`, enter | 줄 또는 선택 영역에 댓글 |
| `r` | 선택한 스레드 또는 현재 줄의 스레드에 답장 |
| `x` | 해결 처리 |
| `s` | 초안과 답장을 Claude에 보내기 |
| `a` | Claude에 diff 리뷰를 요청하고 댓글 남기기 |
| `1` `2` `3` | 대화, diff, 파일 |
| `h` | 해결된 스레드 표시 또는 숨기기 |
| `f` | 소스 새로고침 |

댓글을 입력할 때는 enter로 저장하고, shift+enter로 줄을 추가하며, ctrl+u로 지웁니다. 취소하려면 빈 입력 상자에서 enter 또는 backspace를 누르거나 `cancel`을 클릭하세요. ctrl+c와 Esc는 패널에 전달되지 않고 Claude Code가 처리합니다.

패널이 닫혀 있으면 프롬프트 위의 밴드에 Claude의 초안과 새 답장이 표시되고 `send`, `open` 버튼이 나타납니다. 상태 줄에도 같은 개수가 표시됩니다. transcript에서는 댓글이 있는 답장 아래에 댓글 수가 적힌 줄이 추가됩니다.

## Claude가 받는 내용

도구는 3개입니다.

- `mcp__crit-tui__reply` `{ id, body, resolve? }`: 댓글에 답하기
- `mcp__crit-tui__comment` `{ file, line, end_line?, body }`: 코드에 댓글 남기기
- `mcp__crit-tui__threads` `{ include_resolved? }`: 열린 스레드 나열

`send`는 새 댓글（위치, 인용 줄, 본문, id）과 새 답장을 하나의 프롬프트로 제출하고, 각 항목에 `reply`로 답하라고 Claude에 요청합니다.

## 댓글 저장 위치

모든 내용은 crit CLI로 전달되므로 crit 브라우저 UI와 `crit comments`에서 같은 리뷰를 볼 수 있습니다.

- **diff 및 파일 댓글**은 저장소의 리뷰 파일에 `crit comment --json`으로 기록됩니다. 일부를 선택하면 웹 UI의 텍스트 선택처럼 `quote`와 `quote_offset`이 포함됩니다（이전 crit는 두 필드를 무시합니다）.
- **채팅 댓글**은 `claude-chat-<session id>`라는 crit 계획에 저장됩니다. 첫 채팅 댓글에서 mod는 `crit plan --name <slug> --no-wait`로 대화를 한 줄씩 저장한 뒤 `crit comment --plan <slug>`로 댓글을 남깁니다. 각 턴이 끝난 뒤 다시 저장하며, 텍스트가 바뀔 때만 crit가 버전을 추가합니다. 채팅 댓글이 없는 세션에는 아무것도 만들지 않습니다. `crit plan --no-wait`를 지원하는 crit가 필요합니다. 이전 crit에서는 채팅 댓글이 세션에 남습니다.
- **Claude의 답장**은 `--author Claude`와 함께 기록됩니다.
- crit CLI（`critBin` 설정）가 없으면 모든 댓글은 세션에 남습니다.

## 패널 구성

- `hooks/register.tsx`가 데이터（문서, 스레드, crit 동기화）를 관리하고 패널을 하나의 `<Client module="./client.tsx">`로 그립니다.
- `hooks/client.tsx`가 커서, 선택, 스크롤, 댓글 상자를 관리하고 각 변경（`comment`, `reply`, `resolve`, `send` 등）을 `ui.message`로 hooks 모듈에 보냅니다.
- Client props는 약 100k자로 제한되므로 커서 주변의 줄을 가져오고 가장자리에 가까워지면 새 창을 요청합니다.
- Client가 그리는 동안의 `setState`는 엔진이 무시합니다. 그래서 Client는 모듈 변수에 상태를 보관하고 키와 마우스 핸들러에서만 `setState`를 호출합니다.

## 개발

```sh
claude plugin validate integrations/claude-code-tui
claude plugin test integrations/claude-code-tui
```

## 이 초기 버전의 제한

- crit 경로는 저장소 루트 기준 상대 경로로 처리됩니다. 저장소 루트에서 Claude Code를 시작하세요.
- 제거된（`-`）diff 줄은 새 쪽 줄에 anchor됩니다. `crit comment --json`에는 이전 쪽 anchor가 없습니다.
- `crit comment --plan`은 `anchor`를 비워 둡니다（crit 버그）. 따라서 대화 앞부분의 줄이 바뀌면 채팅 댓글이 해당 텍스트를 따라가지 않습니다.
- 해결된 crit 스레드를 다시 열려면 crit 브라우저 UI를 사용해야 합니다.
- diff는 `git diff HEAD`에 최대 20개의 추적되지 않은 파일을 더한 것입니다.

## Install

```
claude plugin marketplace add tomasz-tomczyk/crit
claude plugin install crit-tui@crit
```

## Original README

# crit-tui

A crit review loop inside Claude Code, as a mod. Comment on lines of the
conversation, the working-tree diff, or a file in a pane. Send the review to
Claude in one go. Claude answers each comment in its thread through a tool.

**Early version.**

## Install

Needs Claude Code 2.1.287 or later (mods) and the `crit` CLI on your PATH.

```
/plugin marketplace add tomasz-tomczyk/crit
/plugin install crit-tui@crit
```

It sits next to the main `crit` plugin from the same marketplace; you can
have both. To try it from a checkout instead:

```sh
claude --plugin-dir integrations/claude-code-tui
```

## Use

- `/crit-tui` opens the pane (last source used, the conversation at first)
- `/crit-tui chat`, `/crit-tui diff`, `/crit-tui file <path>` pick the source
- `/crit-tui send` sends the review, `/crit-tui close` closes the pane

The pane is one `Client` region: it gets raw keys and mouse events. Click
it once to give it the keys (Esc gives them back to the prompt).

| input | does |
| --- | --- |
| click a line | move the cursor there |
| drag | select rows |
| click a thread | pick it for `r` / `x` |
| `j` `k`, ↑ ↓, wheel | move |
| shift+↑ ↓, or `v` then move | select rows |
| space / pagedown, ctrl+u / pageup | page |
| `g` `G`, home end | top, bottom |
| `n` `p`, → ← | next, previous message or file |
| `l`, tab | next thread |
| `c`, enter | comment on the line or selection |
| `r` | reply to the picked thread, or the one on this line |
| `x` | resolve it |
| `s` | send drafts and replies to Claude |
| `a` | ask Claude to review the diff and leave comments |
| `1` `2` `3` | conversation, diff, file |
| `h` | show or hide resolved threads |
| `f` | reload the source |

While typing a comment: enter saves, shift+enter adds a line, ctrl+u
clears. To cancel: enter or backspace on an empty box, or click `cancel`.
ctrl+c and Esc never reach the pane: Claude Code takes them.

While the pane is closed, a band above the prompt shows drafts and new
replies from Claude, with `send` and `open` buttons. The status line shows
the same counts. A reply in the transcript that has comments gets a line
under it with the count.

## What Claude gets

Three tools:

- `mcp__crit-tui__reply` `{ id, body, resolve? }`: answer a comment
- `mcp__crit-tui__comment` `{ file, line, end_line?, body }`: leave a comment on code
- `mcp__crit-tui__threads` `{ include_resolved? }`: list open threads

`send` submits one prompt with each new comment (where, quoted lines, body,
id) and each new reply, and asks Claude to answer every item with `reply`.

## Where comments live

Everything goes to crit through its CLI, so the crit browser UI and
`crit comments` see the same review.

- **Diff and file comments** go to the repo's review file with
  `crit comment --json`. A partial selection carries `quote` and
  `quote_offset`, as a web UI text selection does (an older crit ignores
  the two fields).
- **Chat comments** go to a crit plan named `claude-chat-<session id>`.
  On the first chat comment the mod saves the conversation with
  `crit plan --name <slug> --no-wait` (one row per line), then comments
  with `crit comment --plan <slug>`. After each turn it saves again; crit
  adds a version only when the text changed. Sessions with no chat comments
  create nothing. Needs a crit with `crit plan --no-wait`; with an older
  crit, chat comments stay in the session.
- **Claude's replies** are written with `--author Claude`.
- Without the crit CLI (setting `critBin`), all comments stay in the session.

## How the pane is built

- `hooks/register.tsx` owns the data (documents, threads, crit sync) and
  draws the pane as one `<Client module="./client.tsx">`.
- `hooks/client.tsx` owns the cursor, selection, scrolling and the comment
  box, and posts each change (`comment`, `reply`, `resolve`, `send`, ...) to
  the hooks module through `ui.message`.
- A Client's props are capped near 100k characters, so it gets a window of
  rows around the cursor and asks for a new window near the edges.
- The engine ignores a `setState` made while the Client draws, so the
  Client keeps its state in a module variable and calls `setState` only
  from its key and mouse handlers.

## Developing

```sh
claude plugin validate integrations/claude-code-tui
claude plugin test integrations/claude-code-tui
```

## Limits of this early version

- crit paths are taken as repo-root relative. Start Claude Code at the repo root.
- Removed (`-`) diff lines anchor to the new-side line they sit at; crit has
  no old-side anchor in `crit comment --json`.
- `crit comment --plan` leaves `anchor` empty (crit bug), so a chat comment
  does not follow its text if earlier lines of the conversation change.
- Reopening a resolved crit thread is left to the crit browser UI.
- The diff is `git diff HEAD` plus up to 20 untracked files.
