From akira
Compresses completed pentest phase outputs (recon, secrets, exploit) into engagement_summary.md to manage long context. Auto-triggers after phases, at 30+ signals, user requests like 'compact', or before forks; uses session.json as source of truth.
npx claudepluginhub kalpmodi/akiraThis skill uses the workspace's default tool permissions.
Long engagements burn context fast. This skill compresses completed phase outputs
Guides manual context compaction at phase boundaries in CTF and pentest sessions to preserve exploit state, payloads, and findings from auto-compaction.
Compresses conversation history in long-running agent sessions using anchored summarization, opaque compression, or regenerative summaries to optimize tokens-per-task and prevent information loss.
Compresses conversation history in long-running agent sessions exceeding context limits, using anchored iterative summarization, opaque compression, and regenerative summaries to optimize tokens-per-task.
Share bugs, ideas, or general feedback.
Long engagements burn context fast. This skill compresses completed phase outputs
into a single engagement_summary.md without losing any certified intelligence.
Rule: session.json is always the authoritative source of truth.
After compaction, the AI re-reads session.json instead of relying on conversation history.
Auto-trigger at these moments:
session.json signals[] exceeds 30 entriesGet target:
TARGET=$1
SESSION=~/pentest-toolkit/results/$TARGET/session.json
RESULTS=~/pentest-toolkit/results/$TARGET
Identify completed phases:
ls $RESULTS/interesting_*.md 2>/dev/null
For each completed phase - compress to 5 bullet signals:
Read each interesting_<phase>.md and distill to essential intelligence only:
RECON SIGNALS (from interesting_recon.md):
- Live hosts: <N> discovered, key: <most interesting>
- Tech stack: <comma-separated confirmed tech>
- WAF: <vendor or null>
- Key endpoints: <top 3>
- Hypothesis calibration: H1 <N>%, H2 <N>%
SECRETS SIGNALS (from interesting_secrets.md):
- Credentials found: <Y/N>, type: <aws_key|jwt|password>
- Key files: <source locations>
- Cloud provider confirmed: <Y/N>
EXPLOIT SIGNALS (from interesting_exploit.md):
- Confirmed findings: <N>, classes: <list>
- SSRF vectors: <Y/N>, endpoints: <list>
- Potential findings: <N>
Write engagement_summary.md:
cat > $RESULTS/engagement_summary.md << EOF
# Engagement Summary: $TARGET
Compacted: $(date +%Y-%m-%d\ %H:%M)
Source of truth: session.json
## Phase Intelligence (Compressed)
<5-bullet summaries per completed phase>
## Active Hypotheses
<from session.json hypotheses[] - all active ones with current probability>
## Confirmed Findings
<from session.json report_draft.findings[] - title + severity + status per finding>
## Open Discovery Queue
<from session.json discovery_queue[] - surface + priority per item>
## Signal Summary
Total signals: <N>
Critical signals: <list VULN_CONFIRMED + CRED_FOUND entries>
## Next Recommended Action
<based on engagement_state and top hypothesis probability>
EOF
Purge completed phase files from active context (they are now in engagement_summary.md):
Rehydrate from session.json:
# Re-read key session fields after compaction
STATE=$(jq -r '.engagement_state' $SESSION)
TOP_HYPO=$(jq -r '.hypotheses | sort_by(-.probability) | .[0] | "\(.id)[\((.probability*100)|round)%] \(.label)"' $SESSION)
DRAFT_COUNT=$(jq '.report_draft.findings | length' $SESSION)
SCALPEL_SCORE=$(jq -r '.scalpel.snr.scalpel_score // "pending"' $SESSION)
echo "State: $STATE | Top: $TOP_HYPO | Draft findings: $DRAFT_COUNT | Scalpel: $SCALPEL_SCORE"
Filter for certified findings only:
If compaction is triggered after /triage has run:
SCALPEL_CERTIFIED findings persist in active contextNOISE findings are dropped entirelyPOTENTIAL findings are compressed to one line eachTell the user:
Context compacted. <N> phase files compressed to engagement_summary.md.
Session.json remains authoritative — <N> signals, <N> draft findings.
Scalpel Score so far: <N>/100
Continuing from: <engagement_state> state, top hypothesis: <label> at <N>%