Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"name": "compaction-advisor",
"source": "./",
"description": "Automatic context monitoring that prevents mid-task compaction. Shows real-time free space in status line and injects context state so Claude knows when to recommend /compact.",
"version": "2.0.0",
"version": "2.0.1",
"license": "MIT"
}
]
Expand Down
3 changes: 1 addition & 2 deletions .claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"name": "compaction-advisor",
"version": "2.0.0",
"version": "2.0.1",
"description": "Automatic context monitoring that prevents mid-task compaction. Shows real-time free space in status line and injects context state so Claude knows when to recommend /compact.",
"skills": "./",
"hooks": "./hooks/hooks.json",
"commands": "./commands"
}
68 changes: 35 additions & 33 deletions hooks/hooks.json
Original file line number Diff line number Diff line change
@@ -1,35 +1,37 @@
{
"UserPromptSubmit": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/scripts/inject_context.sh"
}
]
}
],
"PostToolUse": [
{
"matcher": "*",
"hooks": [
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/scripts/checkpoint_advisor.sh"
}
]
}
],
"PreCompact": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/scripts/precompact_advisor.sh"
}
]
}
]
"hooks": {
"UserPromptSubmit": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/scripts/inject_context.sh"
}
]
}
],
"PostToolUse": [
{
"matcher": "*",
"hooks": [
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/scripts/checkpoint_advisor.sh"
}
]
}
],
"PreCompact": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/scripts/precompact_advisor.sh"
}
]
}
]
}
}
2 changes: 1 addition & 1 deletion scripts/inject_context.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Reads session-specific context state and outputs warning if concerning.
# Only outputs when context is concerning (caution/warning/critical).

set -euo pipefail
# No set -euo pipefail — causes hook errors on Linux

# Read hook input to get session ID
input=$(cat)
Expand Down