ワンクリックで
emergency-compact
Emergency context compaction - truncate older messages and force compaction when hitting context limits.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Emergency context compaction - truncate older messages and force compaction when hitting context limits.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Validate DS9 code on a branch or PR against a realistic local stack and browser. Use when Sunil or a triage flow asks whether a DS9 fix actually works, or before claiming a branch/PR is tested. Bootstraps a PR checkout from a known-good DS9 checkout, copies working env/config, selects affected services, starts the minimum stack, verifies health, exercises the real route in a browser, inspects downloads/artifacts, and reports concrete evidence.
Triage DS9 bugs and PR requests coming from Sunil in Slack. Use when Sunil asks Linus to inspect a DS9 issue, prepare a fix, create a PR, or verify a fix. Route any real local validation through the ds9-pr-testing skill instead of improvising.
Create, read, update, and manage Jira issues in the ENG project at tribble-ai.atlassian.net, including attachments, comments, transitions, and epic/child issue setup. Use when you need to create tickets from feature descriptions, search recent ENG requests, update fields or status, or generate an epic with supporting tickets.
Triage Engage desktop / Tribble Desktop bugs and PR requests coming from Sunil in Slack. Use when Sunil asks Linus to inspect the Electron desktop app, prepare a fix, create a PR, or verify a fix.
Analyze screenshots, MP4/video/audio attachments, raw PDFs, screen recordings, and voice notes from Slack, Telegram, and other inbound channels with preprocessing, transcript extraction, keyframes, thread context, and Gemini-first multimodal reasoning. Use when Sunil asks Linus what is happening in a recording, screenshot, PDF, voice note, or other media evidence.
Inspect DS9 production safely from raoDesktop using Azure, App Insights, Key Vault, and the readonly Postgres lane. Use when Sunil asks Linus to investigate a production Tribble / DS9 issue without making product changes.
| name | emergency-compact |
| description | Emergency context compaction - truncate older messages and force compaction when hitting context limits. |
| metadata | {"aethervault":{"emoji":"🗜️","requires":{"bins":["jq"]}}} |
Force context compaction by truncating older messages when the normal compaction fails or context overflow persists.
Use this skill when:
# Find current session ID
AETHERVAULT_HOME="${AETHERVAULT_HOME:-$HOME/.aethervault}"
if [ ! -d "$AETHERVAULT_HOME" ] && [ -d "$HOME/.aethervault" ]; then
AETHERVAULT_HOME="$HOME/.aethervault"
fi
AGENT_DIR="$AETHERVAULT_HOME/agents/main"
SESSION_ID=$(jq -r '."agent:main:main".sessionId' "$AGENT_DIR/sessions/sessions.json")
SESSION_FILE="$AGENT_DIR/sessions/${SESSION_ID}.jsonl"
# Count messages and estimate size
echo "Session: $SESSION_ID"
wc -l "$SESSION_FILE"
du -h "$SESSION_FILE"
# Backup current session
cp "$SESSION_FILE" "${SESSION_FILE}.backup.$(date +%s)"
# Keep only last N messages (adjust N as needed - start with 50)
KEEP_LINES=50
TOTAL=$(wc -l < "$SESSION_FILE")
SKIP=$((TOTAL - KEEP_LINES))
if [ $SKIP -gt 0 ]; then
# Create truncated version: keep header (first line) + last N lines
head -1 "$SESSION_FILE" > "${SESSION_FILE}.tmp"
tail -n $KEEP_LINES "$SESSION_FILE" >> "${SESSION_FILE}.tmp"
mv "${SESSION_FILE}.tmp" "$SESSION_FILE"
echo "Truncated from $TOTAL to $((KEEP_LINES + 1)) lines"
else
echo "Session already small enough ($TOTAL lines)"
fi
# Add a notice that context was truncated
TIMESTAMP=$(date -u +"%Y-%m-%dT%H:%M:%S.000Z")
NOTICE='{"type":"message","timestamp":"'"$TIMESTAMP"'","message":{"role":"user","content":[{"type":"text","text":"[SYSTEM: Context was emergency-truncated due to overflow. Older messages were removed to allow conversation to continue. Use /memory or session-logs skill to access older context if needed.]"}]}}'
echo "$NOTICE" >> "$SESSION_FILE"
If the above doesn't work, keep only the essential:
# Keep only session header and last 10 messages
KEEP_LINES=10
head -1 "$SESSION_FILE" > "${SESSION_FILE}.tmp"
tail -n $KEEP_LINES "$SESSION_FILE" >> "${SESSION_FILE}.tmp"
mv "${SESSION_FILE}.tmp" "$SESSION_FILE"
# Add notice
TIMESTAMP=$(date -u +"%Y-%m-%dT%H:%M:%S.000Z")
echo '{"type":"message","timestamp":"'"$TIMESTAMP"'","message":{"role":"user","content":[{"type":"text","text":"[SYSTEM: Emergency truncation performed - context reduced to last 10 messages. Use /memory for context recovery.]"}]}}' >> "$SESSION_FILE"
contextWindow lower than actual limit (e.g., 150K for 200K limit)/memory to checkpoint important context before it's compacted/new to start freshIf truncation doesn't help:
ls -la ${SESSION_FILE}.lockrm ${SESSION_FILE}.locksystemctl restart aethervaultAETHERVAULT_HOME="${AETHERVAULT_HOME:-$HOME/.aethervault}" && [ -d "$HOME/.aethervault" ] && [ ! -d "$AETHERVAULT_HOME" ] && AETHERVAULT_HOME="$HOME/.aethervault" && AGENT_DIR="$AETHERVAULT_HOME/agents/main" && SESSION_ID=$(jq -r '."agent:main:main".sessionId' "$AGENT_DIR/sessions/sessions.json") && SF="$AGENT_DIR/sessions/${SESSION_ID}.jsonl" && cp "$SF" "$SF.bak" && (head -1 "$SF"; tail -50 "$SF") > "$SF.tmp" && mv "$SF.tmp" "$SF" && echo "Truncated to 50 messages"