[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-81066":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":15,"stars7d":16,"stars30d":16,"stars90d":15,"forks30d":15,"starsTrendScore":15,"compositeScore":17,"rankGlobal":10,"rankLanguage":10,"license":18,"archived":19,"fork":19,"defaultBranch":20,"hasWiki":21,"hasPages":19,"topics":22,"createdAt":10,"pushedAt":10,"updatedAt":33,"readmeContent":34,"aiSummary":35,"trendingCount":15,"starSnapshotCount":15,"syncStatus":36,"lastSyncTime":37,"discoverSource":38},81066,"slop-review","dbachelder\u002Fslop-review","dbachelder","A native \u002Fslop-review window for Claude Code, Codex CLI, and pi — review the slop before you ship it. Monaco-powered inline comments, agent reads them back. Forked from badlogic\u002Fpi-diff-review.","https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fpi-slop-review",null,"JavaScript",47,3,46,0,1,42.41,"Other",false,"main",true,[23,24,25,26,27,28,29,30,31,32],"ai-tools","claude-code","code-review","codex-cli","developer-tools","diff-review","glimpse","monaco-editor","pi-coding-agent","slash-commands","2026-06-12 04:01:31","# slop-review\n\nA native diff review window for terminal coding agents, powered by [Glimpse](https:\u002F\u002Fgithub.com\u002Fhazat\u002Fglimpse) and [Monaco](https:\u002F\u002Fmicrosoft.github.io\u002Fmonaco-editor\u002F). Ships for **[Claude Code](https:\u002F\u002Fdocs.anthropic.com\u002Fen\u002Fdocs\u002Fclaude-code)**, **[Codex CLI](https:\u002F\u002Fgithub.com\u002Fopenai\u002Fcodex)**, and **[pi](https:\u002F\u002Fpi.dev)** — review the slop before you ship it.\n\n- In **Claude Code** it adds a `\u002Fslop-review` slash command.\n- In **Codex CLI** it ships as a `slop-review` skill (auto-invoked when you ask for a review, or explicitly via `@slop-review`).\n- In **pi** it registers a `\u002Fslop-review` slash command (the upstream this is forked from — see Credit below).\n\nAll three:\n\n1. Open a native review window\n2. Default to a **PR-style review** of all changes since your branch diverged from the base branch (auto-detected: `origin\u002FHEAD` → `origin\u002Fmain` → `main` → `origin\u002Fmaster` → `master`), and also support `last-commit` and `uncommitted` modes — see [Scopes](#scopes)\n3. Show a collapsible sidebar with fuzzy file search and git status markers\n4. Lazy-load file contents on demand as you switch files and scopes\n5. Let you draft comments on the original side, modified side, or whole file\n6. Write the composed feedback to a temp file when you submit; the agent reads it back, so the review shows up in the chat as a regular tool call and gets addressed item-by-item\n\n![slop-review reviewing its own README change](docs\u002Fscreenshot.png)\n\n## Install\n\nThree hosts, three install paths. All three end with the same review window.\n\n### pi\n\n```bash\n# Recommended: from npm (also lists on https:\u002F\u002Fpi.dev\u002Fpackages)\npi install npm:pi-slop-review\n\n# Or from GitHub (handy for unreleased commits)\npi install git:github.com\u002Fdbachelder\u002Fslop-review\n\n# Or pin to a tag\npi install git:github.com\u002Fdbachelder\u002Fslop-review@v0.5.0\n\n# Or try without installing (single-run)\npi -e npm:pi-slop-review\n```\n\nThen inside pi:\n\n```\n\u002Fslop-review                       # default: PR-style review\n\u002Fslop-review last-commit\n\u002Fslop-review --base origin\u002Fdevelop\n```\n\nWhen you submit feedback, the composed prompt drops into pi's input editor\n(idiomatic for pi — same UX as the upstream `pi-diff-review`). Press\n`Escape` while the window is open to cancel.\n\n> **Note on the npm name.** The npm package is `pi-slop-review` (matches\n> pi.dev's gallery `pi-\u003Cname>` convention). The slash command, the bin name,\n> and the plugin name everywhere else are still `slop-review`.\n\n### Claude Code\n\n```bash\n# inside Claude Code\n\u002Fplugin marketplace add dbachelder\u002Fslop-review\n\u002Fplugin install slop-review@slop-review\n```\n\nThis registers the `\u002Fslop-review` slash command.\n\n### Codex CLI\n\nCodex separates marketplace registration (CLI) from plugin enablement (TUI).\nBoth steps are required:\n\n```bash\n# 1. Register the marketplace\ncodex plugin marketplace add dbachelder\u002Fslop-review\n```\n\n```\n# 2. Inside `codex`, type:\n\u002Fplugins\n```\n\nIn the plugin browser, switch to the `Slop Review` (slop-review) marketplace\ntab, select the `slop-review` plugin, and press *Install plugin*. This enables\nthe `slop-review` skill, which the model auto-loads when you ask it to review\nyour changes (or which you can invoke explicitly with `@slop-review`).\n\n> **Why a skill instead of a slash command in Codex?** Codex's plugin system\n> doesn't expose user-defined slash commands; it uses *skills* (markdown the\n> model loads when descriptions match the user's intent) and `@`-invocation.\n\nIf you prefer to skip the TUI, enable the plugin by editing\n`~\u002F.codex\u002Fconfig.toml`:\n\n```toml\n[plugins.\"slop-review@slop-review\"]\nenabled = true\n```\n\nThen restart Codex.\n\n### How updates flow\n\n| Host | Install source | Update command |\n|---|---|---|\n| pi | npm (`pi-slop-review`) or GitHub clone | `pi update` |\n| Claude Code | GitHub marketplace (`dbachelder\u002Fslop-review`) | `\u002Fplugin update` |\n| Codex CLI | GitHub marketplace (`dbachelder\u002Fslop-review`) | `codex plugin marketplace upgrade slop-review` |\n\nFor Claude Code and Codex, the GitHub marketplace clone runs a one-time\n`npm install` inside the plugin checkout on first invocation — that's what\ninstalls [`glimpseui`](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fglimpseui) and builds\nits per-platform native helper. Codex sets `CLAUDE_PLUGIN_ROOT` for plugin\nshell calls so the same dispatcher works in both agents with no\nspecial-casing. A stamp file under `plugin\u002Fnode_modules\u002F` makes the\ndispatcher skip `npm install` unless `plugin\u002Fpackage.json` actually\nchanged.\n\n### Standalone CLI \u002F development install\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fdbachelder\u002Fslop-review.git\ncd slop-review\u002Fplugin\nnpm install\nnpm install -g .                # puts `slop-review` on PATH as a standalone binary\nnpm run install-command         # copies commands\u002Fslop-review.md → ~\u002F.claude\u002Fcommands\u002F\n```\n\nAll the plugin contents live under `slop-review\u002Fplugin\u002F`. The top-level\n`slop-review\u002F` directory holds only the two marketplace manifests, the\nroot `package.json` (which exists solely to point pi's `git:` install at\nthe extension under `.\u002Fplugin\u002F`), and `README` \u002F `LICENSE` \u002F `NOTICE`.\n\n## Credit\n\nThis is a fork of **[badlogic\u002Fpi-diff-review](https:\u002F\u002Fgithub.com\u002Fbadlogic\u002Fpi-diff-review)** by [Mario Zechner](https:\u002F\u002Fgithub.com\u002Fbadlogic), which provides the same UI for [`pi`](https:\u002F\u002Fpi.dev). All of the heavy lifting — the Glimpse window orchestration, the Monaco-based review UI, the comment-and-prompt pipeline, and the in-terminal Escape-to-cancel waiting overlay (in our pi adapter) — was designed and implemented there. This repo:\n\n- Adds a standalone Node CLI (`plugin\u002Fbin\u002Fslop-review.js`) so the same UI can be driven from any host that can shell out.\n- Adds Claude Code (slash command) and Codex CLI (skill) adapters that use a temp-file + `Read` round-trip so the review stays visible in the chat UI.\n- Adds a pi extension under `plugin\u002Fextensions\u002Fpi\u002F` that registers `\u002Fslop-review` in pi (parallel to the upstream's `\u002Fdiff-review`) and uses upstream's idiomatic `setEditorText` flow — same UX as the upstream.\n- Adds PR-style review (everything since merge-base with the auto-detected base branch) as the default scope, with explicit `last-commit`, `uncommitted`, and `all` modes also available.\n- Keeps `plugin\u002Fweb\u002Findex.html` and `plugin\u002Fweb\u002Fapp.js` from the upstream essentially unchanged.\n\nIf you only use pi and just want the upstream behavior, install [`badlogic\u002Fpi-diff-review`](https:\u002F\u002Fgithub.com\u002Fbadlogic\u002Fpi-diff-review) instead. Please ⭐ the upstream regardless.\n\n## Requirements\n\n- macOS, Linux, or Windows\n- Node.js 20+\n- [Claude Code](https:\u002F\u002Fdocs.anthropic.com\u002Fen\u002Fdocs\u002Fclaude-code), [Codex CLI](https:\u002F\u002Fgithub.com\u002Fopenai\u002Fcodex), **or** [pi](https:\u002F\u002Fpi.dev)\n- Internet access at runtime for the Tailwind and Monaco CDNs used by the review window\n- **Native build toolchain** — Glimpse compiles a per-platform native helper on first install:\n  - **macOS**: Xcode Command Line Tools (`xcode-select --install`)\n  - **Linux**: Rust (https:\u002F\u002Frustup.rs) + GTK4\u002FWebKit2GTK dev packages\n    - Fedora: `dnf install gtk4-devel webkitgtk6.0-devel gtk4-layer-shell-devel`\n    - Ubuntu: `apt install libgtk-4-dev libwebkitgtk-6.0-dev libgtk4-layer-shell-dev`\n    - Arch: `pacman -S gtk4 webkitgtk-6.0 gtk4-layer-shell`\n  - **Windows**: .NET 8 SDK\n\n  Claude Code and some other agents run `npm install --ignore-scripts` when materializing plugins, which suppresses Glimpse's normal postinstall build. `plugin\u002Fbin\u002Fplugin-run.sh` detects this and re-builds the helper explicitly on first invocation, so you'll see a one-time delay (a few seconds for Swift, longer for Rust) before the review window opens.\n\n### Windows notes\n\nGlimpse supports Windows, but the native host build during install requires:\n\n- .NET 8 SDK\n- Microsoft Edge WebView2 Runtime\n\n## Usage\n\n### From Claude Code\n\n```\n\u002Fslop-review                       # default: all changes since base branch merge-base\n\u002Fslop-review last-commit           # only HEAD vs HEAD^\n\u002Fslop-review uncommitted           # only working-tree changes vs HEAD\n\u002Fslop-review --base origin\u002Fdevelop # override the base branch\n```\n\nThe slash command declares an `argument-hint`, so Claude Code's input autocompletes the available forms.\n\n### From pi\n\n```\n\u002Fslop-review                       # default: all changes since base branch merge-base\n\u002Fslop-review last-commit\n\u002Fslop-review uncommitted\n\u002Fslop-review --base origin\u002Fdevelop\n```\n\nThe pi adapter also registers an autocomplete for the scope argument, so\ntab-complete works in pi's input.\n\nWhen you submit, the composed feedback is dropped into pi's input editor for\nyou to review and send. While the window is open, press `Escape` from the\npi terminal to cancel.\n\n### From Codex CLI\n\nJust ask for a review in natural language and the `slop-review` skill auto-loads:\n\n```\n> review my changes\n> review the slop on this branch against main\n> open a PR-style review\n```\n\nOr invoke it explicitly:\n\n```\n> @slop-review\n> @slop-review last-commit\n> @slop-review --base origin\u002Fdevelop\n```\n\n### What happens\n\nA native window opens. Browse files, leave inline or whole-file comments, then click **Submit feedback**. The CLI writes your feedback to `$TMPDIR\u002Fslop-review-\u003Ctimestamp>.md` and prints the path. The agent then reads the file (visible in the UI as a `Read` \u002F file-read tool call) and addresses each item. Click **Cancel** or close the window to abort.\n\n### Standalone CLI\n\nThe binary is a normal Node CLI; nothing about it is agent-specific. You can invoke it directly to drive your own tool integrations:\n\n```\nslop-review [base|last-commit|uncommitted|all] [--base \u003Cref>] [--help]\n```\n\nContract:\n\n| Outcome | stdout | exit |\n|---|---|---|\n| User submits feedback | `FEEDBACK_FILE: \u003Cabsolute path>\\n` | `0` |\n| User cancels \u002F closes window \u002F no reviewable files | `REVIEW_CANCELLED\\n` | `0` |\n| Bad arguments | (nothing; usage on stderr) | `2` |\n| Other error | (nothing; error on stderr) | `1` |\n\nStatus messages (\"Opened review window…\", base-ref resolution, etc.) go to **stderr**, so stdout stays clean for piping. Example:\n\n```bash\nout=$(slop-review last-commit)\ncase \"$out\" in\n  FEEDBACK_FILE:*) cat \"${out#FEEDBACK_FILE: }\" ;;\n  REVIEW_CANCELLED) echo \"cancelled\" ;;\nesac\n```\n\n### Scopes\n\n| Scope | Compares | Use when |\n|---|---|---|\n| `base` *(default)* | merge-base of HEAD and base branch → working tree | You want the full PR-style review of everything you've done on this branch, committed or not. Base branch is auto-detected: `origin\u002FHEAD` → `origin\u002Fmain` → `main` → `origin\u002Fmaster` → `master`. Override with `--base \u003Cref>`. |\n| `last-commit` | HEAD^ → HEAD | You just committed and want to review only that commit. |\n| `uncommitted` | HEAD → working tree | You want to review only what's still unstaged\u002Fstaged but not committed. |\n| `all` | (no diff; shows working tree) | Browsing the tree without a diff scope. Mostly for debugging. |\n\nIn `base` mode, the \"git diff\" tab in the window is relabelled `vs \u003Cbase-ref>` so you can tell which ref you're comparing against. If no base branch is found, the CLI falls back to `uncommitted` and logs a warning.\n\n## How it works\n\n```\n  Agent                     bash plugin-run.sh                slop-review\n  \u002Fslop-review        ───────────────────────────────────►    (Node CLI)\n  @slop-review                                                     │\n                                                                   │ glimpseui\n                                                                   ▼\n                          \"FEEDBACK_FILE: \u003Cpath>\"             Native window\n                       ◄──────────────────────────            (Monaco diff)\n  Read tool: \u003Cpath>\n        │\n        ▼\n  feedback rendered in chat, agent addresses each item\n```\n\nThe two-step (`Bash` → `Read`) flow is what makes the review visible in the\nchat UI: the bash output alone gets folded into the prompt as context, but\nthe subsequent `Read` of the feedback file shows up as a regular tool call\nwith the full file contents.\n\n- **`plugin\u002Fbin\u002Fslop-review.js`** — CLI entry. Parses arguments, resolves the base ref + merge-base when in `base` mode, opens the Glimpse window, handles file-content requests. On submit, writes the composed prompt to `$TMPDIR\u002Fslop-review-\u003Cts>.md` and prints `FEEDBACK_FILE: \u003Cpath>` to stdout. On cancel, prints `REVIEW_CANCELLED`.\n- **`plugin\u002Fbin\u002Fplugin-run.sh`** — Plugin dispatcher. Resolves the plugin root from `$CLAUDE_PLUGIN_ROOT` (set by both Claude Code and Codex), `npm install`s on first run, then exec's the CLI.\n- **`plugin\u002Fsrc\u002Fgit.js`** — Git scope\u002Fdiff loader (ported from `src\u002Fgit.ts`).\n- **`plugin\u002Fsrc\u002Fprompt.js`** — Feedback prompt composer (ported verbatim from `src\u002Fprompt.ts`).\n- **`plugin\u002Fsrc\u002Fui.js`** — Inlines `web\u002Findex.html` + `web\u002Fapp.js` for the Glimpse window.\n- **`plugin\u002Fweb\u002F`** — Static UI assets (Monaco, Tailwind via CDN, app logic). Copied from upstream.\n- **`plugin\u002Fcommands\u002Fslop-review.md`** — Claude Code slash command. Forwards `$ARGUMENTS` to the dispatcher, then instructs Claude to `Read` the feedback file and address each item.\n- **`plugin\u002Fskills\u002Fslop-review\u002FSKILL.md`** — Codex skill. Same instructions, formatted as a skill that the model auto-loads when the user asks for a review.\n\n## Layout\n\n```\nslop-review\u002F\n├── .claude-plugin\u002F\n│   └── marketplace.json          # Claude Code marketplace (string source: \".\u002Fplugin\")\n├── .agents\u002Fplugins\u002F\n│   └── marketplace.json          # Codex CLI marketplace (object source, path: \".\u002Fplugin\")\n├── .github\u002Fworkflows\u002F\n│   └── publish-npm.yml           # publishes plugin\u002F to npm on `v*` tag push\n├── package.json                  # ROOT manifest — read only by `pi install git:`\n│                                  # so pi finds `pi.extensions: .\u002Fplugin\u002Fextensions\u002Fpi\u002Findex.ts`\n├── docs\u002F\n│   └── screenshot.png            # README image (also used by pi.image gallery preview)\n├── scripts\u002F\n│   └── bump-version.mjs          # bumps all 6 manifests + lockfiles + README;\n│                                  # commits + tags. Run `scripts\u002Fbump-version.mjs --help`.\n├── plugin\u002F                       # Actual plugin contents — both marketplaces point here\n│                                  # AND this is what gets published to npm as `pi-slop-review`\n│   ├── .claude-plugin\u002F\n│   │   └── plugin.json           # Claude Code plugin manifest\n│   ├── .codex-plugin\u002F\n│   │   └── plugin.json           # Codex CLI plugin manifest\n│   ├── bin\u002F\n│   │   ├── slop-review.js        # CLI entry point (Claude + Codex)\n│   │   └── plugin-run.sh         # Plugin dispatcher (Claude + Codex)\n│   ├── src\u002F                      # SHARED across all three host adapters\n│   │   ├── args.js               # arg parser (CLI + pi)\n│   │   ├── git.js                # createGitOps({ exec }) — host injects exec\n│   │   ├── prompt.js             # composes the feedback prompt\n│   │   └── ui.js                 # inlines web\u002F into a single HTML doc\n│   ├── web\u002F                      # Monaco UI bundle (mostly unchanged from upstream)\n│   │   ├── index.html\n│   │   └── app.js\n│   ├── commands\u002F\n│   │   └── slop-review.md        # Claude Code slash command\n│   ├── skills\u002F\n│   │   └── slop-review\u002F\n│   │       └── SKILL.md          # Codex skill (auto-loaded; @-invokable)\n│   ├── extensions\u002F\n│   │   └── pi\u002F\n│   │       ├── index.ts          # pi extension entry (registers \u002Fslop-review)\n│   │       └── types.ts          # wire-format types for the Glimpse ↔ host channel\n│   ├── scripts\u002F\n│   │   └── install-command.js\n│   └── package.json              # name: pi-slop-review; bin: slop-review;\n│                                  # pi.extensions: extensions\u002Fpi\u002Findex.ts\n├── LICENSE\n├── NOTICE\n└── README.md\n```\n\nTwo `package.json` files is the floor: Claude Code and Codex only see the\ncontents of `.\u002Fplugin\u002F` after install (their marketplace path points\nthere), so the npm-publishable plugin manifest must live inside `.\u002Fplugin\u002F`.\npi's `git:` install reads `package.json` at the cloned repo root, so a thin\nroot manifest is needed there too. The two files describe the same plugin\nfor different consumers; only `plugin\u002Fpackage.json` is published to npm.\n\nCodex's marketplace path validator rejects `.\u002F` outright\n(`local plugin source path must not be empty`), which is why the actual\nplugin lives in `.\u002Fplugin\u002F` instead of at the repo root.\n\n\n## Differences from the upstream pi extension\n\n| Concern | pi-diff-review | slop-review |\n|---|---|---|\n| Hosts | pi only | pi + Claude Code + Codex CLI |\n| pi command name | `\u002Fdiff-review` | `\u002Fslop-review` |\n| Default scope | All three tabs visible, no default scope | PR-style: changes since merge-base with auto-detected base branch |\n| Args | (none) | `[base\\|last-commit\\|uncommitted\\|all] [--base \u003Cref>]` |\n| pi result delivery | `ctx.ui.setEditorText(prompt)` | Same |\n| pi waiting UI | pi-tui custom panel + Escape-to-cancel | Same (verbatim port) |\n| Claude\u002FCodex result delivery | n\u002Fa | Temp file path on stdout → agent `Read`s the file (visible in chat UI) |\n| Git execution (pi) | `pi.exec` | Same (host-injected via `createGitOps({ exec: pi.exec })`) |\n| Git execution (Claude\u002FCodex) | n\u002Fa | `node:child_process` |\n| Language | TypeScript | TypeScript for the pi extension; plain ESM JavaScript everywhere else |\n\n## License\n\nMIT. See [LICENSE](LICENSE) and [NOTICE](NOTICE).\n\nThe Monaco Editor and Tailwind assets are loaded from public CDNs; their respective licenses apply.\n","slop-review 是一个专为终端编码助手设计的原生差异审查窗口工具，支持Claude Code、Codex CLI和pi等平台。其核心功能包括基于Monaco编辑器的内联评论、自动检测分支差异并提供PR风格的代码审查、以及通过模糊搜索和Git状态标记增强的文件导航。用户可以在修改前或提交后使用该工具进行代码审查，并将反馈直接发送给AI代理处理。适用于需要高效且直观地完成代码审查工作的开发者场景中，尤其是在集成有上述编码助手的工作流里。",2,"2026-06-11 04:03:24","CREATED_QUERY"]