# lessloc (starswallow/lessloc)

> Lessloc keeps AI coding agents like Claude Code, Codex, GitHub Copilot, Gemini CLI and Cursor focused on the least code needed to get the job done, cutting bloat while keeping the same results.

- GitHub: https://github.com/starswallow/lessloc
- GitHub.Locker page: https://github.locker/starswallow/lessloc
- Stars: 109
- Language: JavaScript
- License: Apache-2.0
- Last push: 2026-10-26

## Questions and answers

Written by GitHub.Locker from the README and the repository; check the README below for details.

**Is this a standalone app or does it plug into my existing coding agent?**

It is not a separate app; it hooks into the coding agent you already use, and the agent itself sets up the hooks during install.

**Which coding agents does it support?**

It works with Claude Code, Codex, OpenCode, GitHub Copilot, Gemini CLI and Cursor, among others.

**What happens if the agent's own tests fail when it thinks it's done?**

Lessloc sends the agent back to fix the code if its own tests still fail when it marks the task as finished.

**Does it need an API key or account, and what does it send over the network?**

No account or API key is required and it has no dependencies; the only network call it makes on its own is a daily check for a new release.

**What kind of code does it actually block?**

It refuses placeholders, commented-out code and stray backup files, reusing what the project already has instead of adding new scaffolding.

**How is the claimed savings measured?**

The README states it was measured on real work, producing up to 36% less code and 26% lower cost for the same results, though it does not detail the benchmark methodology.

**How do I remove it if I change my mind?**

You can remove lessloc by following the removal instructions linked in the README's documentation set.


---

## README (checked against GitHub 2026-11-03)

Source: https://github.com/starswallow/lessloc/blob/main/README.md

<!-- Plain-text docs for AI agents: https://lessloc.org/llms.txt (index), https://lessloc.org/llms-full.txt (all docs in one file), https://lessloc.org/agents (what an agent runs when its user asks about lessloc). Installing for a user: https://lessloc.org/install.md. Removing: https://lessloc.org/remove.md. Current download count (installs and daily update checks): the <title> of https://lessloc-counter.rextail.ai/slime-light.svg. -->

<p align="center">
  <picture>
    <source media="(prefers-color-scheme: dark)" srcset="https://lessloc.org/lessloc-pixel-transition.webp">
    <img alt="lessloc: less lines of code" src="https://lessloc.org/lessloc-pixel-transition-light-page.webp" width="640">
  </picture>
</p>

<h1 align="center">Your AI coding agent, without the bloat</h1>

<p align="center"><b>Up to 36% less code and 26% lower cost, with the same results.</b></p>

<p align="center">For Claude Code, Codex, OpenCode, GitHub Copilot, Gemini CLI, Cursor and <a href="https://lessloc.org/guide/getting-started#supported-agent-tools">many more</a>.</p>

<p align="center">
  <a href="https://www.npmjs.com/package/lessloc"><img alt="npm version" src="https://img.shields.io/npm/v/lessloc"></a>
  <a href="https://github.com/rextail-ai/lessloc/actions/workflows/test.yml"><img alt="tests" src="https://github.com/rextail-ai/lessloc/actions/workflows/test.yml/badge.svg"></a>
  <a href="https://github.com/rextail-ai/lessloc/blob/main/LICENSE"><img alt="license: Apache-2.0" src="https://img.shields.io/badge/license-Apache--2.0-blue"></a>
</p>

<p align="center"><a href="https://lessloc.org/start"><picture><source media="(prefers-color-scheme: dark)" srcset="https://lessloc-counter.rextail.ai/slime-dark.svg"><img alt="lessloc downloads, counted live" src="https://lessloc-counter.rextail.ai/slime-light.svg" width="360" height="240"></picture></a></p>

## Install in one sentence

Tell your coding agent:

```
Install lessloc for this project by following https://lessloc.org/install.md
```

Claude Code? Or type these in its prompt box:

```
/plugin marketplace add https://get.lessloc.org/claude/lessloc.git
/plugin install lessloc@lessloc
```

To remove it: `Remove lessloc by following https://lessloc.org/remove.md`

**On npm?** Install it with the sentence above; your agent sets up the hooks.

## Measured on real work

<p align="center"><a href="https://lessloc.org/benchmarks"><picture><source media="(prefers-color-scheme: dark)" srcset="https://lessloc.org/results-dark.svg"><img alt="117 real changes in 3 open-source projects, judged by hidden tests: 27% less code, 23% lower cost, the same results" src="https://lessloc.org/results-light.svg" width="880"></picture></a></p>

## How it works

<p align="center"><a href="https://lessloc.org/guide/how-it-works"><picture><source media="(prefers-color-scheme: dark)" srcset="https://lessloc.org/mechanism-dark.svg"><img alt="How lessloc works inside your agent's own loop, through the hooks your agent tool already has: at session start it adds a short working standard, at each prompt it points to code you already have, before a write it refuses placeholders and junk, after a write it flags secrets and swallowed errors, and at the end of the turn it sends unfinished work back once. Principles: the least code that stays correct, reuse before new code, act in the loop with no reports, the agent's test runs as proof, review only the change. Built on Node.js with no dependencies, no API key and no model calls, git for snapshots, one table for 20+ agent tools, and a code index for 16 languages." src="https://lessloc.org/mechanism-light.svg" width="880"></picture></a></p>

## What changes

- **Less code to review.** It reuses what your project already has.
- **A smaller bill.** Fewer tokens per task.
- **No junk.** Placeholders, commented-out code and stray backup files are refused.
- **It finishes the job.** If its own tests still fail at "done", it goes back to fix them.

## Free and private

Open source (Apache-2.0). No account, no API key, no dependencies. It keeps itself up to date: its only network contact of its own is a daily check for a newly published release.

## Learn more

[Getting started](https://lessloc.org/guide/getting-started) · [How it works](https://lessloc.org/guide/how-it-works) · [Settings](https://lessloc.org/guide/configuration) · [Commits and CI](https://lessloc.org/guide/ci) · [FAQ](https://lessloc.org/guide/faq)

[Contributing](https://github.com/rextail-ai/lessloc/blob/main/CONTRIBUTING.md) · [Security](https://github.com/rextail-ai/lessloc/blob/main/SECURITY.md) · [Changelog](https://github.com/rextail-ai/lessloc/blob/main/CHANGELOG.md) · [License](https://github.com/rextail-ai/lessloc/blob/main/LICENSE)

