lessloc plugin
lessloc uses hooks to keep an agent to the least code: it refuses placeholders and junk and sends unfinished work back
- 68 ★ on the repository
- Last commit
- Apache-2.0
Extended access
Why this level
- Writes hooks into agent settings and can refuse file writes
- Contacts the network once a day to check for a new version
- Installs itself from an instruction on the site that the agent carries out
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add plugins/lesslocDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- Writes hooks into agent settings and can refuse file writes
- Contacts the network once a day to check for a new version
- Installs itself from an instruction on the site that the agent carries out
This is third-party code. Review the repository files before installing.
What it does
lessloc is a plugin and set of hooks for Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode and other agents. The repository holds plugin manifests for Claude Code, Codex and Cursor, hooks for Copilot and Amp and a plugin for Cline, and the scripts are written in Node.js with no dependencies. lessloc makes no model calls and needs no API key. The hooks sit inside the agent's own loop. At session start lessloc adds a short working standard, on each prompt it points to project code that can already be reused, before a file write it refuses placeholders, commented-out code and stray backup files, and after a write it flags secrets and swallowed errors. At the end of a turn lessloc sends unfinished work back to the agent once if the agent's own tests still fail. It uses git for snapshots and builds a code index for 16 languages. The author cites figures from their own measurements on 117 changes in three open source projects: up to 27% less code and 23% lower cost with the same results. The agent performs the installation itself from an instruction on the site.
Who it is for. Developers who review bulky agent edits and want less duplication, placeholders and commented-out code in the diff.
Good fit when
- The agent writes a new helper where a similar one already exists in the project and review eats time
- Commits contain `TODO` stubs, commented-out code and `.bak` files
- An agent turn ends with failing tests and you want the agent to finish the job
- Tokens go to bloated solutions and you want a simple saving measure without changing models
- Your team uses several agents at once and wants one set of rules
Not a fit when
- You need a long rough draft with stubs, since the hooks will refuse the write
- You do not want the plugin to check for a new version once a day
- The project uses a rare language outside the 16-language index, so existing-code hints will be weaker
- You expect an automatic review of the whole codebase, while lessloc works on changes during a session
Example request
Install lessloc in this project and show which hooks fired on the next editLimitations
- The savings figures come from the author's measurements on 117 changes in three projects; on your code the result will differ.
- The tool's only own network contact is a daily check for a new release. All other traffic comes from the agent itself.
- The hooks can refuse a write. If you need stubs during the work, you have to allow them temporarily or disable the plugin.
- Installation follows an instruction on lessloc.org: the agent reads it and sets up the hooks itself, so review the changes it makes.
How to disable. Ask the agent: `Remove lessloc by following https://lessloc.org/remove.md`. In Claude Code the plugin can also be removed from the `/plugin` menu.
FAQ
How do I install lessloc in Claude Code?
Type `/plugin marketplace add https://get.lessloc.org/claude/lessloc.git` and then `/plugin install lessloc@lessloc`. For other agents tell the agent: `Install lessloc for this project by following https://lessloc.org/install.md`.
Does it need an API key or a paid model?
No. lessloc is written in Node.js with no dependencies, makes no model calls and needs no key.
What does lessloc do at each step of an agent turn?
At session start it adds a working standard, on a prompt it points to existing code, before a write it refuses stubs and junk, after a write it flags secrets, and at the end of the turn it sends unfinished work back once.
Which agents does lessloc work with?
Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Amp and Cline, over 20 tools in all. The full list is on the getting started page of the site.
How do I remove lessloc?
Tell the agent: `Remove lessloc by following https://lessloc.org/remove.md`. It removes the hooks it added during installation.
Discussion
No questions or reviews yet.
Related
PluginsShared Claude Code settings for a team: hooks against dangerous commands, a check before finishing and skills from spec to review
Plugins for git, Python and accessibility in one place: 400+ skills, subagents and hooks against dangerous agent commands.
A linter for the agent harness checks a repository's AGENTS.md, CLAUDE.md, CI and hooks and scores six dimensions.
A Claude Code plugin for development with separated roles: spec, review, TDD, QA and verification by different agents
Session monitor for Claude Code, Cursor, Codex and six more agents in a terminal, window or HTTP API, with chat cleanup and search
Over twenty skills for coding agents: MCP and hooks, plan mode, a bug-fix protocol, prompting and a bash safety hook
README in short
The README opens with the promise of less code with the same results and a one-sentence install instruction for the agent. Then come measurement results, a diagram of how the hooks work, four effects and a note on cost and privacy.