Coding & Developmentâ¨geminiđ¤claudeâ¨ī¸cursorđuniversal
leantoken
Make every AI token leaner with one CLI, MCP. Search code, inspect structure, read ranges, and explore Git history.
Quick Start
Install this Skill
npx skills add morluto/leantoken<div align="center"> <h1>LeanToken</h1> **Make every AI coding token go further** Local-first code intelligence for coding agents. Search code, inspect structure, read exact ranges, and explore Git history through a CLI and MCP server. **Language:** English ¡ [įŽäŊ䏿](docs/i18n/zh-CN/README.md) ¡ [æĨæŦčĒ](docs/i18n/ja-JP/README.md) ¡ [íęĩė´](docs/i18n/ko-KR/README.md) <img src="assets/leantoken-hero-v3.jpg" alt="LeanToken narrowing a large codebase to the files and code an AI agent needs" width="100%"> [](https://www.npmjs.com/package/leantoken) [](https://www.npmjs.com/package/leantoken) [](https://www.rust-lang.org/) [](#license) [Install](#quick-start) ¡ [Why LeanToken](#why-leantoken) ¡ [Tools](#available-tools) ¡ [CLI](#cli-usage) ¡ [How it works](#how-it-works) ¡ [Docs](#documentation) </div> --- > **Measured token savings:** In a controlled 60-run study, LeanToken used > 20.1% fewer model input tokens than the agent's built-in tools with limited > repository exploration, and 37.6% fewer than those tools with broad > exploration. See exactly > how it was measured in the [measurement methodology](docs/measurement.md). ## Quick start Add LeanToken to Claude Code, Cursor, OpenCode, Codex, Gemini CLI, or Antigravity: ```bash npx leantoken setup ``` <details> <summary><strong>Setup behavior and safety</strong></summary> Current releases stop setup before writing when `npx` resolves a stale project-local or ancestor install, and point to `npx leantoken@latest setup`. Older releases that predate this check can be bootstrapped directly with that versioned command. The setup wizard labels supported clients it detects, but leaves every client unselected so you choose exactly which coding agents receive LeanToken. Before writing anything, it shows the exact configuration paths and MCP launcher and asks for confirmation. An npx-based setup pins the exact LeanToken version that ran setup, so restarting a client cannot silently move to a newer release. Global setup never stores the repository where setup happened. OpenCode gets a workspace-relative working directory; other supported clients launch LeanToken from the workspace cwd selected by the host. If a host instead starts it from the home directory or a filesystem root, LeanToken refuses to index that broad root by default. </details> Restart or reload the configured clients, then verify the connection and first retrieval from a repository: ```bash npx leantoken doctor ``` Try a broad task such as: *Find the code related to request cancellation before editing.* LeanToken helps the agent start with `leantoken.context`, while its normal tools remain available for edits, builds, and tests. Inspect LeanToken's observed repository-local token accounting: ```bash npx leantoken savings ``` <table> <tr> <td width="33%" valign="top"> <strong>Local by default</strong><br><br> Source is indexed on your machine in a local database. LeanToken is a read-only discovery and retrieval layer. </td> <td width="33%" valign="top"> <strong>Explicit token budgets</strong><br><br> Every response has an explicit token limit, so large files cannot take over the request. </td> <td width="33%" valign="top"> <strong>Built for agent workflows</strong><br><br> Find files, search code, inspect structure, read exact ranges, trace history, query JSON, and track token usage through focused tools. </td> </tr> </table> <details> <summary><strong>Advanced setup and version management</strong></summary> To skip the wizard, select clients explicitly or configure all supported clients: ```bash npx leantoken setup --claude --codex --yes npx leantoken setup --all --yes ``` Use `--private-runtime` to copy the exact package-native executable into LeanToken's versioned application-data directory and configure clients to launch it directly, without persistent npm/Node wrappers. Preview its path and digest with `--dry-run`. Automation never treats detection as consent: `--yes` requires explicit client flags, `--all`, or `--refresh` for entries already managed by LeanToken. Preview the same resolved plan without changing files: ```bash npx leantoken setup --codex --cursor --dry-run ``` Setup adds the `leantoken` MCP entry plus a small owned discovery skill in the host-standard user skill directories. The skill advertises routing metadata; it does not duplicate tool schemas, add rules, or install shell hooks. Remove the owned integration with: ```bash npx leantoken remove ``` Refresh only existing LeanToken MCP entries after explicitly choosing a new version, or use an older version to roll back: ```bash npx --yes leantoken@latest setup --refresh --yes npx --yes leantoken@0. ... (truncated)
Repository
11stars
2forks
Details
Related Skills
More coding & development skills you might like
Reticle
Coding & DevelopmentAI agents can generate code, but still struggle to understand what they build. Reticle brings Jev-style machine-native runtime perception to web & desktop applications.
đ¤claudeđuniversal
1.2k
190
View
agentscope-java
Coding & DevelopmentExpert Java developer skill for AgentScope Java framework - a reactive, message-driven multi-agent system built on Project Reactor. Use when working with reactive programming, LLM integration, agent orchestration, multi-agent systems, or when the user mentions AgentScope, ReActAgent, Mono/Flux, Project Reactor, or Java agent development. Specializes in non-blocking code, tool integration, hooks, pipelines, and production-ready agent applications.
đuniversal
6.0k
1.5k
View
ospec
Coding & DevelopmentDocument-driven OSpec workflow for initialization, change/goal routing, validation, archiving, and durable project knowledge.
â¨geminiđ¤claudeđŦgptđuniversal
524
34
View
misakanet-failure-memory
Coding & Developmentđ A zero-dependency, git-backed micro-lesson library for AI Agents to asynchronously share and search verified debugging experience. Python stdlib only. | https://misakanet.org
đ¤claudeâ¨ī¸cursorđuniversal
424
158
View