densepack
DensePack packs file Reads, shell output, long subagent briefs and subagent reports into dense images that an AI model reads for fewer input tokens. It sends the text when the image costs more. It also adds writing rules and a project map to each session, and it sets up to 3 Claude Code settings in ~/.claude/settings.json. All work runs on your computer.
Plugin densepack from marketplace densepack-marketplace in Fabian-Galvez/DensePack. Commands read from the repo's manifest — 2 days ago.
This plugin runs code on your machine — its hooks fire automatically on events like tool use. The exact commands are listed below; read them before installing.
What it installs
Slash commands (12)
/densepack:bak-offRestore the original text of the instruction files that /bakpack packed, or that DensePack 2.0.1 or older packed on its own. Delete their images.
/densepack:bakpackExperimental: the benches did not run it, so it has not been thoroughly tested. Packs the instruction files of this project, or of a folder you name, into images behind a pointer. DensePack packs a file only when its images and pointer cost less than its text.
/densepack:dense-offStop all DensePack hooks for this session. New sessions start with DensePack on.
/densepack:dense-removeRestore the original text of each packed instruction file. Remove the settings that DensePack added to ~/.claude/settings.json: CLAUDE_CODE_THRIFTY_SONIC, and on Windows EMBEDDED_SEARCH_TOOLS and CLAUDE_CODE_USE_POWERSHELL_TOOL. Delete the DensePack files that remain after /plugin uninstall. Run it
/densepack:densedoctorCheck that DensePack works, and show why recent Reads or outputs stayed text.
/densepack:densepackStart DensePack and set all settings to their defaults.
/densepack:densetextKeep more output and short files as text. It costs more tokens than the default.
/densepack:helppackPrint the permanent behaviors and the commands. Show what each command sets and whether that value is the default.
/densepack:max-offSend Sonnet plain text. Sonnet gets images by default.
/densepack:maxpackSend Sonnet images. This is the default. Haiku still gets text.
/densepack:style-offTurn off the DensePack writing rules. Packing, the project map and the rules for finding and reading files stay on.
/densepack:stylepackTurn on the DensePack writing rules and print them, so the agent reads them again. This is the default.
Hooks (21)
- SessionStart
exec sh "${CLAUDE_PLUGIN_ROOT}/scripts/ensure_python.sh" ; powershell -NoProfile -ExecutionPolicy Bypass -File "${CLAUDE_PLUGIN_ROOT}/scripts/ensure_python.ps1" ; exit $LASTEXITCODE
- SessionStart
exec sh "${CLAUDE_PLUGIN_ROOT}/scripts/run_hook.sh" "${CLAUDE_PLUGIN_ROOT}/scripts/run_once.py" "${CLAUDE_PLUGIN_ROOT}/scripts/bootstrap.py" ; powershell -NoProfile -ExecutionPolicy Bypass -File "${CL
- SessionEnd
exec sh "${CLAUDE_PLUGIN_ROOT}/scripts/run_hook.sh" "${CLAUDE_PLUGIN_ROOT}/scripts/run_once.py" "${CLAUDE_PLUGIN_ROOT}/scripts/session_end.py" ; powershell -NoProfile -ExecutionPolicy Bypass -File "${
- SubagentStart
exec sh "${CLAUDE_PLUGIN_ROOT}/scripts/run_hook.sh" "${CLAUDE_PLUGIN_ROOT}/scripts/run_once.py" "${CLAUDE_PLUGIN_ROOT}/scripts/subagent_start.py" ; powershell -NoProfile -ExecutionPolicy Bypass -File
- SubagentStop
exec sh "${CLAUDE_PLUGIN_ROOT}/scripts/run_hook.sh" "${CLAUDE_PLUGIN_ROOT}/scripts/run_once.py" "${CLAUDE_PLUGIN_ROOT}/scripts/subagent_stop.py" ; powershell -NoProfile -ExecutionPolicy Bypass -File "
- PostToolUse
exec sh "${CLAUDE_PLUGIN_ROOT}/scripts/run_hook.sh" "${CLAUDE_PLUGIN_ROOT}/scripts/run_once.py" "${CLAUDE_PLUGIN_ROOT}/scripts/read_image.py" ; powershell -NoProfile -ExecutionPolicy Bypass -File "${C
- PostToolUse
exec sh "${CLAUDE_PLUGIN_ROOT}/scripts/run_hook.sh" "${CLAUDE_PLUGIN_ROOT}/scripts/run_once.py" "${CLAUDE_PLUGIN_ROOT}/scripts/bash_image.py" ; powershell -NoProfile -ExecutionPolicy Bypass -File "${C
- PostToolUse
exec sh "${CLAUDE_PLUGIN_ROOT}/scripts/run_hook.sh" "${CLAUDE_PLUGIN_ROOT}/scripts/run_once.py" "${CLAUDE_PLUGIN_ROOT}/scripts/report_swap.py" ; powershell -NoProfile -ExecutionPolicy Bypass -File "${
- PostToolUse
exec sh "${CLAUDE_PLUGIN_ROOT}/scripts/run_hook.sh" "${CLAUDE_PLUGIN_ROOT}/scripts/run_once.py" "${CLAUDE_PLUGIN_ROOT}/scripts/report_swap.py" ; powershell -NoProfile -ExecutionPolicy Bypass -File "${
- PostToolUse
exec sh "${CLAUDE_PLUGIN_ROOT}/scripts/run_hook.sh" "${CLAUDE_PLUGIN_ROOT}/scripts/run_once.py" "${CLAUDE_PLUGIN_ROOT}/scripts/pointer.py" ; powershell -NoProfile -ExecutionPolicy Bypass -File "${CLAU
- PostToolBatch
exec sh "${CLAUDE_PLUGIN_ROOT}/scripts/run_hook.sh" "${CLAUDE_PLUGIN_ROOT}/scripts/run_once.py" "${CLAUDE_PLUGIN_ROOT}/scripts/style_reminder.py" ; powershell -NoProfile -ExecutionPolicy Bypass -File
- UserPromptSubmit
exec sh "${CLAUDE_PLUGIN_ROOT}/scripts/run_hook.sh" "${CLAUDE_PLUGIN_ROOT}/scripts/run_once.py" "${CLAUDE_PLUGIN_ROOT}/scripts/prompt_card.py" ; powershell -NoProfile -ExecutionPolicy Bypass -File "${
- UserPromptSubmit
exec sh "${CLAUDE_PLUGIN_ROOT}/scripts/run_hook.sh" "${CLAUDE_PLUGIN_ROOT}/scripts/run_once.py" "${CLAUDE_PLUGIN_ROOT}/scripts/style_reminder.py" ; powershell -NoProfile -ExecutionPolicy Bypass -File
- PreToolUse
exec sh "${CLAUDE_PLUGIN_ROOT}/scripts/run_hook.sh" "${CLAUDE_PLUGIN_ROOT}/scripts/run_once.py" "${CLAUDE_PLUGIN_ROOT}/scripts/brief_pack.py" ; powershell -NoProfile -ExecutionPolicy Bypass -File "${C
- PreToolUse
exec sh "${CLAUDE_PLUGIN_ROOT}/scripts/run_hook.sh" "${CLAUDE_PLUGIN_ROOT}/scripts/run_once.py" "${CLAUDE_PLUGIN_ROOT}/scripts/brief_pack.py" ; powershell -NoProfile -ExecutionPolicy Bypass -File "${C
- PreToolUse
exec sh "${CLAUDE_PLUGIN_ROOT}/scripts/run_hook.sh" "${CLAUDE_PLUGIN_ROOT}/scripts/run_once.py" "${CLAUDE_PLUGIN_ROOT}/scripts/source_gate.py" ; powershell -NoProfile -ExecutionPolicy Bypass -File "${
- PreToolUse
exec sh "${CLAUDE_PLUGIN_ROOT}/scripts/run_hook.sh" "${CLAUDE_PLUGIN_ROOT}/scripts/run_once.py" "${CLAUDE_PLUGIN_ROOT}/scripts/drop_read_gate.py" ; powershell -NoProfile -ExecutionPolicy Bypass -File
- PreToolUse
exec sh "${CLAUDE_PLUGIN_ROOT}/scripts/run_hook.sh" "${CLAUDE_PLUGIN_ROOT}/scripts/run_once.py" "${CLAUDE_PLUGIN_ROOT}/scripts/read_gate.py" ; powershell -NoProfile -ExecutionPolicy Bypass -File "${CL
- PreToolUse
exec sh "${CLAUDE_PLUGIN_ROOT}/scripts/run_hook.sh" "${CLAUDE_PLUGIN_ROOT}/scripts/run_once.py" "${CLAUDE_PLUGIN_ROOT}/scripts/grep_gate.py" ; powershell -NoProfile -ExecutionPolicy Bypass -File "${CL
- PreToolUse
exec sh "${CLAUDE_PLUGIN_ROOT}/scripts/run_hook.sh" "${CLAUDE_PLUGIN_ROOT}/scripts/run_once.py" "${CLAUDE_PLUGIN_ROOT}/scripts/edit_gate.py" ; powershell -NoProfile -ExecutionPolicy Bypass -File "${CL
- PostToolUseFailure
exec sh "${CLAUDE_PLUGIN_ROOT}/scripts/run_hook.sh" "${CLAUDE_PLUGIN_ROOT}/scripts/run_once.py" "${CLAUDE_PLUGIN_ROOT}/scripts/read_image.py" ; powershell -NoProfile -ExecutionPolicy Bypass -File "${C
Maintain densepack?
This page updates itself from your repo. Add the badge to your README, or get it Featured to pin it above the organic results with a followed link to your site.