| Normal agent · 63 tokens | Caveman agent · 20 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.
|
New object ref each render, so React re-renders. Wrap the prop in useMemo.
|
Same fix. 63 token become 20. Brain still big.
Pick your club:
| Skill | Same answer | Tokens |
|---|
/caveman | New object ref each render, so React re-renders. Wrap the prop in useMemo. | 20 |
/ultracave | Inline object prop, new ref, re-render. useMemo. | 14 |
/megacave | 新參照致重繪。useMemo。 | 13 |
Token counts: tiktoken o200k.
Install
npx @caveman-ai/cli@latest
One command. Mac, Linux, Windows. Caveman find your agents and your logins, show what it change. Press Enter. Done. Needs Node.js 22.13+.
After that, plain claude stays caveman'd. So do Codex, Gemini CLI, OpenCode, and 30+ more. It runs on your machine, with your keys and your Claude Pro/Max login. One rock. That it.
Had caveman before 4.0? Say @latest, or the old copy on your machine wins. Already set up? caveman setup opens the screen again. Only want shorter answers? Get just the skill.
Six rocks, one install
New in 4.0: caveman is six parts. All on after install. Each has its own switch.