Skip to content
Back to search

latch-tools

MarketplaceWorks with Claude CodeGitHub

Run project checks after coding-agent edits and turns.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/barakchamo--latch/badge.svg)](/listings/barakchamo--latch)

HTML

<a href="/listings/barakchamo--latch"><img src="/api/listings/barakchamo--latch/badge.svg" alt="findsafeskills safety rating" /></a>

Install

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Install Latch in your agent on macOS or glibc Linux (ARM64 and x64). On first use, the plugin downloads and verifies the matching Latch binary. Open a new session in your Git project after installing.

Codex

codex plugin marketplace add BarakChamo/latch
codex plugin add latch@latch-tools

If Codex says `latch-tools` is already added from a different source, run `codex plugin marketplace remove latch-tools`, then rerun the two commands above.

In a new Codex session, choose **Review hooks** when prompted or open `/hooks`. Approve the Latch hooks there.

Claude Code

curl -fsSLO https://github.com/BarakChamo/latch/releases/latest/download/install-latch-plugin.sh &&
  sh install-latch-plugin.sh --install-plugin claude

The installer downloads Latch before registering the plugin through Claude Code’s marketplace, so its tools are ready for the first session.

GitHub Copilot CLI

copilot plugin marketplace add BarakChamo/latch
copilot plugin install latch@latch-tools

Pi

pi install git:github.com/BarakChamo/latch

Use Pi 1.5.2 or later.

OpenCode

Check `opencode --version`. For v2.3.2 or later:

opencode plugin add 'github:BarakChamo/latch'

For v1 with Node.js and npm installed:

curl -fsSLO https://github.com/BarakChamo/latch/releases/latest/download/install-latch-plugin.sh &&
  sh install-latch-plugin.sh --install-plugin opencode

[OpenCode project-local setup](https://barakchamo.github.io/latch/docs/plugins/#opencode)

Grok Build

grok plugin install BarakChamo/latch --trust

Verified with Grok Build 1.0.92.

Kimi Code

In Kimi Code, run:

/plugins install https://github.com/BarakChamo/latch/tree/main

Choose **Trust and install**, then run `/reload` or start a new session.

OpenHands

In Agent Canvas, go to **Customize → Plugins → Add plugin**. Enter `github:BarakChamo/latch` as the source, then click **Install**. The enabled plugin loads in new local conversations. [OpenHands SDK and Canvas setup](https://barakchamo.github.io/latch/docs/plugins/#openhands)

For OpenHands CLI, run this from the Git project you want to check.

curl -fsSLO https://github.com/BarakChamo/latch/releases/latest/download/install-latch-plugin.sh &&
  sh install-latch-plugin.sh install openhands

Already have `latch` on your path? Run `latch install openhands` in the project. [Plugin settings, updates, and removal](https://barakchamo.github.io/latch/docs/plugins/)

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

.claude-plugin/marketplace.json · Manifest · 8 lines
  1. {
  2. "name": "latch-tools",
  3. "owner": { "name": "Barak Chamo" },
  4. "metadata": { "description": "Run project checks after edits and at turn end." },
  5. "plugins": [
  6. { "name": "latch", "source": "./plugins/claude-code" }
  7. ]
  8. }
README.md · README · 259 lines
  1. <h1 align="center">
  2. <img src="apps/docs/app/latch-logo.png" width="360" alt="Latch">
  3. </h1>
  4. <p align="center"><strong>Give your coding agent a feedback loop.</strong></p>
  5. <p align="center">Latch runs your project’s linters, tests, and other checks as your agent works, and brings failures back into the session.</p>
  6. <p align="center">
  7. <a href="#install-a-plugin">Install a plugin</a> ·
  8. <a href="#run-your-first-check">First check</a> ·
  9. <a href="#how-it-works">How it works</a> ·
  10. <a href="#compatibility">Compatibility</a> ·
  11. <a href="#install-the-standalone-cli">Standalone CLI</a> ·
  12. <a href="https://barakchamo.github.io/latch/">Docs</a>
  13. </p>
  14. When we write code, our IDE gives us feedback as we work. Syntax highlighting
  15. helps us read the change, linting and formatting on save catch problems early,
  16. and type checks show when an edit breaks code elsewhere. Latch gives coding
  17. agents that same feedback loop.
  18. - **Make checks automatic.** The harness’s hooks run your checks after a
  19. supported edit or changed turn. The agent doesn’t have to remember which
  20. checks to run or when.
  21. - **Keep agent context focused.** Passing checks stay quiet by default.
  22. Latch surfaces failures with the diagnostics the agent needs to act.
  23. ## How it works
  24. Use Latch to catch a lint error right after an edit or see a failing test at the end of a turn. Reuse commands you already run locally or in CI, and keep them in the project so teammates can use the same checks with different agents.
  25. Plugins map their agents’ native hooks to two shared Latch events. Available events vary by agent, but your check commands stay in the project and work with any integration.
  26. | Event | When checks run |
  27. | --- | --- |
  28. | `after_edit` | After a supported file-edit tool changes the worktree. Use it for fast checks such as linting. |
  29. | `turn_end` | When the agent finishes a turn that changed the worktree. This catches shell edits and works well for tests. |
  30. - **Skip unchanged work.** Latch compares Git-visible files before and after the edit or turn. No-op edits and read-only turns skip checks by default, even in a dirty worktree.
  31. - **Keep passing checks quiet.** Success is silent by default, so failures are easier to spot in the agent session.
  32. - **Run checks that match the change.** Filter by path or file extension so a Markdown-only edit can run Markdown lint and skip TypeScript checks.
  33. - **Keep failure reports short.** Compact output surfaces useful lines such as errors and assertions. The agent can retrieve more detail from a saved log without rerunning the check.
  34. ## Install a plugin
  35. Install Latch in your agent on macOS or glibc Linux (ARM64 and x64). On first use, the plugin downloads and verifies the matching Latch binary. Open a new session in your Git project after installing.
  36. ### Codex
  37. ```sh
  38. codex plugin marketplace add BarakChamo/latch
  39. codex plugin add latch@latch-tools
  40. ```
  41. If Codex says `latch-tools` is already added from a different source, run
  42. `codex plugin marketplace remove latch-tools`, then rerun the two commands above.
  43. In a new Codex session, choose **Review hooks** when prompted or open
  44. `/hooks`. Approve the Latch hooks there.
  45. ### Claude Code
  46. ```sh
  47. curl -fsSLO https://github.com/BarakChamo/latch/releases/latest/download/install-latch-plugin.sh &&
  48. sh install-latch-plugin.sh --install-plugin claude
  49. ```
  50. The installer downloads Latch before registering the plugin through Claude
  51. Code’s marketplace, so its tools are ready for the first session.
  52. ### GitHub Copilot CLI
  53. ```sh
  54. copilot plugin marketplace add BarakChamo/latch
  55. copilot plugin install latch@latch-tools
  56. ```
  57. ### Pi
  58. ```sh
  59. pi install git:github.com/BarakChamo/latch
  60. ```
  61. Use Pi 1.5.2 or later.
  62. ### OpenCode
  63. Check `opencode --version`. For v2.3.2 or later:
  64. ```sh
  65. opencode plugin add 'github:BarakChamo/latch'
  66. ```
  67. For v1 with Node.js and npm installed:
  68. ```sh
  69. curl -fsSLO https://github.com/BarakChamo/latch/releases/latest/download/install-latch-plugin.sh &&
  70. sh install-latch-plugin.sh --install-plugin opencode
  71. ```
  72. [OpenCode project-local setup](https://barakchamo.github.io/latch/docs/plugins/#opencode)
  73. ### Grok Build
  74. ```sh
  75. grok plugin install BarakChamo/latch --trust
  76. ```
  77. Verified with Grok Build 1.0.92.
  78. ### Kimi Code
  79. In Kimi Code, run:
  80. ```text
  81. /plugins install https://github.com/BarakChamo/latch/tree/main
  82. ```
  83. Choose **Trust and install**, then run `/reload` or start a new session.
  84. ### OpenHands
  85. In Agent Canvas, go to **Customize → Plugins → Add plugin**. Enter
  86. `github:BarakChamo/latch` as the source, then click **Install**. The enabled
  87. plugin loads in new local conversations.
  88. [OpenHands SDK and Canvas setup](https://barakchamo.github.io/latch/docs/plugins/#openhands)
  89. For OpenHands CLI, run this from the Git project you want to check.
  90. ```sh
  91. curl -fsSLO https://github.com/BarakChamo/latch/releases/latest/download/install-latch-plugin.sh &&
  92. sh install-latch-plugin.sh install openhands
  93. ```
  94. Already have `latch` on your path? Run `latch install openhands` in the project.
  95. [Plugin settings, updates, and removal](https://barakchamo.github.io/latch/docs/plugins/)
  96. ## Run your first check
  97. **Latch runs project commands in any language.** You can skip `latch.json`
  98. if you define `hook:turnend` in `package.json` or `hook-turnend` as a
  99. console script in a packaged uv project. For any other command, add it to
  100. `latch.json`. [Package script names and discovery](docs/usage.md#package-script-discovery)
  101. ### Configure checks
  102. For example, if `make lint` already works in your project, put this in
  103. `latch.json` in the directory where you run it.
  104. ```json
  105. {
  106. "hooks": {
  107. "turn_end": {
  108. "commands": "make lint"
  109. }
  110. }
  111. }
  112. ```
  113. Use a string for one command or nested argument arrays for several commands. [Command syntax](docs/usage.md#command-syntax)
  114. Create the file by hand or use `latch config init` with the
  115. [standalone CLI](#install-the-standalone-cli). Explicit commands and discovered
  116. scripts can be used together.
  117. Start the agent in your project and ask it to make an edit that fails your
  118. check. Let the turn finish, then send a follow-up in the same session if
  119. your harness delivers the report on the next prompt. Ask the agent to call
  120. `latch_status` to check whether Latch ran or skipped. Undo the test edit.
  121. Passing checks are quiet. [Quickstart](https://barakchamo.github.io/latch/docs/quickstart/#run-your-first-check) · [TypeScript and Python examples](examples/)
  122. ### Filters and failure output
  123. This example runs your existing `npm test` script at turn end when a `.ts`
  124. or `.tsx` file under `src/` changes. The same file must match both filters.
  125. ```json
  126. {
  127. "hooks": {
  128. "turn_end": {
  129. "paths": ["src/**"],
  130. "extensions": ["ts", "tsx"],
  131. "commands": [["npm", "test"]],
  132. "failure_output": "compact"
  133. }
  134. }
  135. }
  136. ```
  137. Here’s an excerpt from the compact report for a failing Vitest run.
  138. ```text
  139. Latch checks failed.
  140. latch: command 1 ("npm") failed: exit status: 1
  141. stdout:
  142. Tests 1 failed | 36 passed (37)
  143. [output compacted from 3175 bytes]
  144. stderr:
  145. FAIL tests/message.test.ts > greets the caller by name
  146. AssertionError: expected 'Hi, Latch!' to be 'Hello, Latch!'
  147. Saved log: …/r-kgMl3D6EnjseUc7Nal1Wgf8Z.log
  148. ```
  149. Open the saved log to read the full output without rerunning the tests. Use
  150. `tail` to show the last lines of each stream, or leave `failure_output` unset
  151. for the default excerpt.
  152. [Filter examples](docs/usage.md#configuration) · [Failure output modes](docs/usage.md#commands-and-saved-logs)
  153. ### Give the agent a chance to act on a failure
  154. With Latch v0.1.3 or later, set `"turn_end_feedback": "continue_once"` at the
  155. top level of `latch.json`. On supported agents, this delivers the failed
  156. turn-end report automatically and gives the agent one chance to respond
  157. without another message from you or an automatic recheck. Grok Build
  158. requires Latch v0.1.4 or later for this option.
  159. [Supported agents and how they receive failures](docs/usage.md#act-on-a-turn-end-failure)
  160. ## Install the standalone CLI
  161. For terminal or CI use, run this from your downloads directory.
  162. ```sh
  163. curl -fsSLO https://github.com/BarakChamo/latch/releases/latest/download/install-latch-plugin.sh &&
  164. sh install-latch-plugin.sh --install-cli
  165. ```
  166. The installer puts `latch` in `~/.local/bin`. Add that directory to your
  167. `PATH` if needed. From your project directory, run `latch status` to see
  168. your resolved checks or `latch run turn_end` to run them immediately.
  169. [Direct downloads and CLI walkthrough](https://barakchamo.github.io/latch/docs/cli/#install-the-cli)
  170. ## Compatibility
  171. The local columns show when the agent gets failures by default, except where marked opt-in.
  172. | Harness | After edit | Turn end | Managed cloud |
  173. | --- | --- | --- | --- |
  174. | Codex | Same turn | Next prompt | Latch CLI or CI |
  175. | Claude Code | Same turn | Next prompt | Single-repo setup |
  176. | GitHub Copilot CLI | Same turn | Next prompt | Actions runner setup |
  177. | OpenCode v1 and v2 | Same turn | Next prompt | Unverified |
  178. | Pi | Same turn | Next model request | Unverified |
  179. | OpenHands CLI and SDK | Next prompt | Next prompt | Workspace setup |
  180. | OpenHands Agent Canvas | — | Opt-in verified | Unverified |
  181. | Kimi Code CLI | — | Next prompt | Unverified |
  182. | Grok Build 1.0.92 | Same turn | No model feedback | Unverified |
  183. “Next prompt” means your next message in the same session and project. Kimi 2.7.2 supports
  184. `continue_once` in interactive and ACP sessions. Use `report` with `kimi -p`.
  185. Hosted agent feedback is unverified.
  186. [Hook and feedback details](docs/usage.md#hooks-and-feedback) · [Cloud setup](docs/usage.md#hosted-sessions)
  187. ## Docs
  188. - [Hook lifecycle and where failures appear](docs/usage.md#hooks-and-feedback)
  189. - [Package script discovery](docs/usage.md#package-script-discovery) and [TypeScript and Python examples](examples/)
  190. - [Configuration, filters, and JSON schema](docs/usage.md#configuration)
  191. - [CLI commands, plugin tools, and saved logs](docs/usage.md#commands-and-saved-logs)
  192. - [Agent integration guides](plugins/), [cloud setup](docs/usage.md#hosted-sessions), and [troubleshooting](docs/usage.md#troubleshooting)

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.