pre-compact-resume-card

Generates an operational resume card before Claude context compaction — so the next session knows exactly where it left off, what mode it was in, and what to do next. Install the PreCompact and SessionStart hooks to activate.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "pre-compact-resume-card" with this command: npx skills add nadalpiantini/pre-compact-resume-card

Pre-Compact Resume Card

Claude forgets when context compacts. This skill installs a PreCompact hook that captures real operational state before compaction fires — branch, commit, last user intent, last assistant action, detected mode, and next step. The next session loads it automatically via SessionStart.

What It Does

Before every context compaction, the hook:

  1. Backs up the transcript to thinking/session-logs/ (keeps last 30)
  2. Parses the JSONL transcript to extract the last user intent and assistant action
  3. Detects the current work mode (coding / debugging / deploy / ideation / git workflow)
  4. Writes .claude/session-resume-card.md with all of this

At session start, the card is injected into context automatically — no manual copy-paste needed.

Install

npx clawhub@latest install @openclaw/pre-compact-resume-card

Or manually: copy scripts/pre-compact.sh and scripts/session-start.sh into your project's .claude/scripts/, then register the hooks in .claude/settings.json using references/settings-example.json as template.

Hook Registration

{
  "hooks": {
    "PreCompact": [{ "matcher": "", "hooks": [{ "type": "command", "command": "bash .claude/scripts/pre-compact.sh" }] }],
    "SessionStart": [{ "matcher": "", "hooks": [{ "type": "command", "command": "bash .claude/scripts/session-start.sh" }] }]
  }
}

The Insight

Written rules get forgotten. Mechanical hooks don't. This skill is the difference between Claude starting fresh (useless) and Claude starting exactly where you left off (valuable). The resume card costs ~200 tokens per session start — cheap insurance against rebuilding context from scratch.

Files

  • scripts/pre-compact.sh — fires before compaction: backup + parse transcript + write resume card
  • scripts/session-start.sh — inject the resume card at session start
  • references/settings-example.json — hook registration template

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

通义晓蜜 - 智能外呼

触发阿里云晓蜜外呼机器人任务,自动批量拨打电话。适用于批量外呼、客户回访、满意度调查、简历筛查约面试等场景。可从前置工具或节点获取外呼名单。

Registry SourceRecently Updated
General

Letterboxd Watchlist

Scrape a public Letterboxd user's watchlist into a CSV/JSONL list of titles and film URLs without logging in. Use when a user asks to export, scrape, or mirror a Letterboxd watchlist, or to build watch-next queues.

Registry SourceRecently Updated
General

Seedance Video Generation

Generate AI videos using ByteDance Seedance. Use when the user wants to: (1) generate videos from text prompts, (2) generate videos from images (first frame, first+last frame, reference images), or (3) query/manage video generation tasks. Supports Seedance 1.5 Pro (with audio), 1.0 Pro, 1.0 Pro Fast, and 1.0 Lite models.

Registry SourceRecently Updated
4.2K17jackycser
General

Universal Skills Manager

The master coordinator for AI skills. Discovers skills from multiple sources (SkillsMP.com, SkillHub, and ClawHub), manages installation, and synchronization...

Registry SourceRecently Updated