Skip to content

ManjotS/neandercode

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

159 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

neandercode

why use many token when few do trick

Stars Last Commit License

Before/After β€’ Install β€’ Levels β€’ Skills β€’ Benchmarks β€’ Evals


A Cursor rule/skills/commands set that makes the agent talk like a caveman β€” cutting ~75% of output tokens while keeping full technical accuracy. Now with 文言文 mode, terse commits, one-line code reviews, and a compression tool that cuts ~46% of input tokens every session.

Based on the viral observation that caveman speak dramatically reduces LLM token usage without losing technical substance. So we made it a one-line install.

Before / After

πŸ—£οΈ Normal Agent (69 tokens)

"The reason your React component is re-rendering is likely because you're creating a new object reference on each render cycle. When you pass an inline object as a prop, React's shallow comparison sees it as a different object every time, which triggers a re-render. I'd recommend using useMemo to memoize the object."

πŸͺ¨ Neandercode Agent (19 tokens)

"New object ref each render. Inline object prop = new ref = re-render. Wrap in useMemo."

πŸ—£οΈ Normal Agent

"Sure! I'd be happy to help you with that. The issue you're experiencing is most likely caused by your authentication middleware not properly validating the token expiry. Let me take a look and suggest a fix."

πŸͺ¨ Neandercode Agent

"Bug in auth middleware. Token expiry check use < not <=. Fix:"

Same fix. 75% less word. Brain still big.

Pick your level of grunt:

πŸͺΆ Lite

"Your component re-renders because you create a new object reference each render. Inline object props fail shallow comparison every time. Wrap it in useMemo."

πŸͺ¨ Full

"New object ref each render. Inline object prop = new ref = re-render. Wrap in useMemo."

πŸ”₯ Ultra

"Inline obj prop β†’ new ref β†’ re-render. useMemo."

πŸ“œ 文言文

"η‰©ε‡Ίζ–°εƒη…§οΌŒθ‡΄ι‡ηΉͺ。useMemo Wrap之。"

Same answer. You pick how many word.

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  TOKENS SAVED          β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ 75% β”‚
β”‚  TECHNICAL ACCURACY    β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ 100%β”‚
β”‚  SPEED INCREASE        β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ ~3x β”‚
β”‚  VIBES                 β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ OOG β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
  • Faster response β€” less token to generate = speed go brrr
  • Easier to read β€” no wall of text, just the answer
  • Same accuracy β€” all technical info kept, only fluff removed (science say so)
  • Save money β€” ~71% less output token = less cost
  • Fun β€” every code review become comedy

Install

Neandercode is built natively for Cursor. It uses Cursor's .cursor/rules, .cursor/skills, and .cursor/commands to integrate seamlessly into your workflow.

To install in your project: Copy the .cursor directory from this repository into the root of your own project.

cp -r path/to/neandercode/.cursor /path/to/your/project/

Alternatively, you can install the base skill via npx:

npx skills add ManjotS/neandercode

(Note: npx skills only installs the skill file. For the full experience including slash commands and auto-activation rules, copying the .cursor folder or using npx neandercode is recommended.)

Or, you can install the full .cursor directory directly into your project using:

npx neandercode

Repo scripts that call the model (neandercode-compress, evals/llm_run.py, benchmarks/run.py) use the cursor agent CLI (not Anthropic/OpenAI keys from this repo). They need Cursor authentication on your machine:

  1. Interactive (usual): in a terminal, run once: cursor agent login
  2. Scripts / CI / headless: set CURSOR_API_KEY in the environment (Cursor documents how to obtain it)

Chat in the IDE uses your logged-in Cursor session; cursor agent -p is a separate headless CLI β€” it uses credentials from cursor agent login or CURSOR_API_KEY, not the chat pane.

Cursor’s integrated terminal exports CURSOR_CLI (and sometimes CURSOR_AGENT). Those make the cursor shim delegate into the editor and can break headless cursor agent -p (including spurious auth errors). Repo scripts (neandercode-compress, evals/llm_run.py, benchmarks/run.py) unset those variables in the subprocess, pass --workspace to the repo root, and invoke the real CLI β€” same shape as running from iTerm or Terminal.

If the agent errors with a missing @anysphere/... native module, run cursor agent update (see below).

Troubleshooting: cursor agent / missing native module

If compress or evals fail with Cannot find module '@anysphere/file-service-darwin-…', the package name’s suffix should match your Mac’s CPU: arm64 / darwin-arm64 on Apple Silicon, x64 on Intel. The headless agent did not load the right optional native binding β€” not something this repo can fix inside Python.

  1. Use the Cursor build that matches your machine β€” On Apple Silicon, install Cursor’s Apple Silicon (ARM) app so ARM native modules are used; you do not need (and should not rely on) the Intel/x64 Cursor build on an ARM Mac. On Intel Macs, use the Intel/x64 build. Avoid Rosetta-mismatched installs (e.g. x64 Cursor on ARM) if agent native modules fail to load.
  2. Refresh the agent: cursor agent update (also run after npx neandercode / copying .cursor if headless agent misbehaves)
  3. Reinstall Cursor from cursor.com (fixes corrupted/partial installs)

Troubleshooting: Authentication required (CLI)

If you still see Authentication required after the subprocess clears CURSOR_CLI / CURSOR_AGENT, the CLI agent was never authenticated on this machine: run cursor agent login once, or set CURSOR_API_KEY for non-interactive runs.

Usage

Trigger neandercode mode in Cursor Chat using the built-in slash commands:

  • /neandercode β€” switch to default neandercode mode
  • /neandercode-lite β€” drop filler, keep grammar
  • /neandercode-ultra β€” maximum compression
  • /neandercode-off β€” disable neandercode mode

Or just say "talk like neandercode" or "less tokens please".

Intensity Levels

Level Trigger What it do
Lite /neandercode lite Drop filler, keep grammar. Professional but no fluff
Full /neandercode full Default neandercode. Drop articles, fragments, full grunt
Ultra /neandercode ultra Maximum compression. Telegraphic. Abbreviate everything

文言文 (Wenyan) Mode

Classical Chinese literary compression β€” same technical accuracy, but in the most token-efficient written language humans ever invented.

Level Trigger What it do
Wenyan-Lite /neandercode wenyan-lite Semi-classical. Grammar intact, filler gone
Wenyan-Full /neandercode wenyan Full 文言文. Maximum classical terseness
Wenyan-Ultra /neandercode wenyan-ultra Extreme. Ancient scholar on a budget

Level stick until you change it or session end.

Neandercode Skills

neandercode-commit

/neandercode-commit β€” terse commit messages. Conventional Commits. ≀50 char subject. Why over what.

neandercode-review

/neandercode-review β€” one-line PR comments: L42: πŸ”΄ bug: user null. Add guard. No throat-clearing.

neandercode-help

/neandercode-help β€” quick-reference card. All modes, skills, commands, one command away.

neandercode-compress

/neandercode-compress <filepath> β€” neandercode make Cursor speak with fewer tokens. Compress make Cursor read fewer tokens.

Your CURSOR.md (or .cursorrules) loads on every session start. Neandercode Compress rewrites memory files into neandercode-speak so Cursor reads less β€” without you losing the human-readable original.

/neandercode-compress CURSOR.md
CURSOR.md          ← compressed (Cursor reads this every session β€” fewer tokens)
CURSOR.original.md ← human-readable backup (you read and edit this)
File Original Compressed Saved
cursor-md-preferences.md 706 285 59.6%
project-notes.md 1145 535 53.3%
cursor-md-project.md 1122 636 43.3%
todo-list.md 627 388 38.1%
mixed-with-code.md 888 560 36.9%
Average 898 481 46%

Code blocks, URLs, file paths, commands, headings, dates, version numbers β€” anything technical passes through untouched. Only prose gets compressed. See the full neandercode-compress README for details. Security note: Snyk flags this as High Risk due to subprocess/file patterns β€” it's a false positive.

Benchmarks

Benchmark numbers come from cursor agent output scored with tiktoken (approximate; reproduce):

Task Normal (tokens) Neandercode (tokens) Saved
Explain React re-render bug 1180 159 87%
Fix auth middleware token expiry 704 121 83%
Set up PostgreSQL connection pool 2347 380 84%
Explain git rebase vs merge 702 292 58%
Refactor callback to async/await 387 301 22%
Architecture: microservices vs monolith 446 310 30%
Review PR for security issues 678 398 41%
Docker multi-stage build 1042 290 72%
Debug PostgreSQL race condition 1200 232 81%
Implement React error boundary 3454 456 87%
Average 1214 294 65%

Range: 22%–87% savings across prompts.

Important

Neandercode only affects output tokens β€” thinking/reasoning tokens are untouched. Neandercode no make brain smaller. Neandercode make mouth smaller. Biggest win is readability and speed, cost savings are a bonus.

A March 2026 paper "Brevity Constraints Reverse Performance Hierarchies in Language Models" found that constraining large models to brief responses improved accuracy by 26 percentage points on certain benchmarks and completely reversed performance hierarchies. Verbose not always better. Sometimes less word = more correct.

Evals

Neandercode not just claim 75%. Neandercode prove it.

The evals/ directory has a three-arm eval harness that measures real token compression against a proper control β€” not just "verbose vs skill" but "terse vs skill". Because comparing neandercode to verbose agent conflate the skill with generic terseness. That cheating. Neandercode not cheat.

# Run the eval (needs cursor CLI)
uv run python evals/llm_run.py

# Read results (no API key, runs offline)
uv run --with tiktoken python evals/measure.py

License

MIT β€” free like mass mammoth on open plain.

Acknowledgements

This project is a fork of caveman by Julius Brussee. Thank you for the original implementation!

About

πŸͺ¨ why use many token when few token do trick β€” Claude Code skill that cuts 65% of tokens by talking like caveman

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 98.5%
  • JavaScript 1.5%