Install
Install with PiG
pig install npm:@izhimu/pi-cavemanInstall with Pi
pi install npm:@izhimu/pi-cavemanPackages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.
Pi manifest JSON
The pi field of package.json.
{
"skills": [
"./skills"
],
"extensions": [
"./extensions"
]
}README
Written by the package's publisher, shown as published in version 0.6.1 (README.md). PiG does not review it.
pi-caveman
Caveman mode for pi and oh-my-pi. Ultra-compressed communication — cuts 65% output tokens (measured) while maintaining full technical accuracy.
Upstream: JuliusBrussee/caveman
Features
- Auto-activates on every pi / oh-my-pi session (default:
cavemanmode) - 3 dedicated skills —
caveman(smart concise voice),ultracave(payload only, fragments), andmegacave(文言文 Classical Chinese) - 9 core upstream 3.2.0 rules — answer first, kill ceremony, STE clarity, preserved comments, bounded tool runs
- Per-turn reinforcement keeps the model concise without prompt bloat or cache misses
- Natural language triggers — "talk like caveman", "be brief", "stop caveman", "normal mode" (with negation guard and gap whitelist)
- Direct persistence & aliases —
/caveman <mode>instantly applies and persists; legacy aliases (full,lite,ultra,wenyan) seamlessly mapped - Token savings stats — tracks session output tokens and estimated savings via
/caveman statusor/caveman-status
Install
npm (recommended)
For pi:
pi install @izhimu/pi-caveman
For oh-my-pi (omp):
omp plugin install @izhimu/pi-caveman
From git
# Global (pi)
pi install git:github.com/izhimu/pi-caveman
# Project-local (pi)
pi install git:github.com/izhimu/pi-caveman -l
Quick test (no install)
pi -e ./extensions/caveman.ts
# or
omp -e ./extensions/caveman.ts
Commands
| Command | Effect |
|---|---|
/caveman | Activate default caveman mode (persists) |
/caveman <mode> | Switch mode: caveman, ultracave, megacave, off, status (persists) |
/caveman status | Show current mode, session token usage, and config paths |
/caveman-status | Alias for /caveman status |
/caveman off | Deactivate caveman mode (persists) |
All /caveman mode switches automatically persist to user config (~/.config/caveman/config.json or %APPDATA%\caveman\config.json). Legacy aliases (full, lite, ultra, wenyan*) are transparently mapped.
Natural-language triggers also work: "talk like caveman", "be brief", "less tokens", "stop caveman", "normal mode".
Skills & Modes
| Skill / Mode | Description | Savings |
|---|---|---|
caveman | Smart caveman voice. Terse, active voice, 9 upstream 3.2.0 rules (default) | ~65% tokens |
ultracave | Maximum compression. Grammar stripped, payload only, fragments | ~75% tokens |
megacave | Classical Chinese (文言文). Drastically fewer characters on screen | ~80% tokens |
Examples
Q: "Why does my React component re-render?"
- caveman: "New object ref each render. Inline object prop = new ref = re-render. Wrap in
useMemo." - ultracave: "Inline obj prop, new ref, re-render.
useMemo." - megacave: "每繪新生對象參照,故重繪;以
useMemo包之則免。"
Configuration
Switch and persist directly with /caveman <mode> (e.g. /caveman ultra).
Default mode resolution order:
CAVEMAN_DEFAULT_MODEenvironment variable- Repo-local: nearest
.caveman/config.jsonor.caveman.jsonnamingdefaultMode(walks up to root) - User config:
~/.config/caveman/config.json(or%APPDATA%\caveman\config.json, then~/.config/caveman/config.json, on Windows) caveman(fallback default)
Manual config file format:
{
"defaultMode": "ultracave",
"reinforce": true
}
Config files accept UTF-8 BOM, UTF-16LE BOM, comments, and trailing commas. Set reinforce to false or CAVEMAN_REINFORCE=0 to disable repeated per-turn reminders; activation and mode changes still inject the full skill ruleset. The switch resolves through CAVEMAN_REINFORCE, repo config, then user config.
How It Works
pi and oh-my-pi load extensions and skills declared in package.json (pi / omp). This extension hooks into four lifecycle events:
session_start— writes mode flag, notifies user via toast, preserves mid-session modes across compactions/reloadsbefore_agent_start— injects full skill ruleset on activation/mode-switch, and lightweight reminders on subsequent turnsinput— intercepts/cavemancommands and natural-language triggers (with negation and clause-boundary guards)turn_end— accumulates token usage and savings stats
Project Structure
pi-caveman/
├── extensions/
│ └── caveman.ts # pi & omp ExtensionAPI integration & mode manager
├── skills/
│ ├── caveman/ # Standard caveman voice (SKILL.md)
│ ├── ultracave/ # Grammar-stripped fragments (SKILL.md)
│ └── megacave/ # Classical Chinese 文言文 (SKILL.md)
├── CHANGELOG.md
├── package.json # pi & omp package manifest
├── tsconfig.json
├── LICENSE
└── README.md
Changelog
See CHANGELOG.md for release history.