Token导航 LogoToken导航TokenDH.com
开发敏感数据github未标认证来源可访问许可证需确认审计通过

session-resume会议恢复

Agent Skill

session-resume 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

297

周安装

12

GitHub Stars

1

下载量

93
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:session-resume(会议恢复)
来源仓库:https://github.com/manastalukdar/claude-devstudio
仓库路径:skills/session-resume
安装命令:
npx skills add https://github.com/manastalukdar/claude-devstudio --skill session-resume
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/manastalukdar/claude-devstudio --skill session-resume

简介

用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,支持项目状态跟踪。

  • 适用于围绕仓库状态、代码变更或协作事项进行整理和分析的场景。
  • 通过 npx skills add 命令从指定 GitHub 仓库安装,需确认权限范围和是否触发联网操作。
  • 建议结合原始 README 核验具体用法,注意检查维护状态和潜在的文件读写行为。
  • 安装前应评估是否需要执行外部命令或访问敏感数据,避免误改生产环境。

SKILL.md

Claude Session Resume

  1. Check for an active session by reading the .claude/sessions/.current-session file.
  2. If the file is empty or doesn't exist, inform the user that there is no active session to resume and stop the process.
  3. If the file exists, read contents and provide summary to user. Also provide points on possible next steps to potentially resume that session.

Token Optimization

Optimization status: ✅ Fully Optimized (Phase 2 Batch 4A, 2026-01-27)

Current Implementation Efficiency

Baseline: 3,000-5,000 tokens → Optimized: 1,000-2,000 tokens Target Reduction: 60-75% (60-80% achieved)

This skill is HIGHLY optimized through aggressive session state caching. Session resumption is the strongest use case for caching strategies, achieving 70-80% token savings by loading cached state instead of re-analyzing the entire session history.

Cache-First Architecture

# Session cache structure (.claude/sessions/SESSION_NAME/)
session_state.json        # Complete session state (goals, progress, files, commits)
session_context.json      # Relevant code context and architectural decisions
last_checkpoint.json      # Most recent state snapshot with timestamp
session_summary.md        # Human-readable summary for quick reference

Cache Validity: Permanent until session modified (never expires) Cache Priority: Always load from cache first, validate timestamp, only re-scan if stale

Core Optimization Patterns

1. Session State Caching (Primary Pattern, 70-80% savings)

Before (3,000-5,000 tokens):

# Re-read entire session history
Read .claude/sessions/SESSION_NAME/session.md
Read .claude/sessions/SESSION_NAME/updates/*.md (all updates)
git log --since="session start time"
git diff --stat HEAD~10..HEAD
Read all modified files mentioned in session

After (1,000-2,000 tokens):

# Load cached state first
Read .claude/sessions/SESSION_NAME/session_state.json
# Validate cache freshness (timestamp check)
# Only re-scan if cache is stale (git HEAD changed)

Savings: 70-80% - Complete session state loaded from single cached JSON file

2. Progressive Context Loading (15-25% additional savings)

Pattern: Load session summary first, defer full details until needed

# Step 1: Load summary (200-500 tokens)
Read .claude/sessions/SESSION_NAME/session_state.json
# Extract: session name, goals, current status, last update time

# Step 2: Show user concise summary
# Only proceed to full context if user requests details

# Step 3: Load full context only if needed (on demand)
Read .claude/sessions/SESSION_NAME/session_context.json  # Only if user asks for details
Read specific files from session                         # Only if user requests code review

Savings: 15-25% - Avoid loading full context until explicitly needed

3. Cached Context Restoration (10-20% additional savings)

Before:

# Re-analyze all session files
Read each modified file
Analyze architectural decisions from scratch
Re-compute file relationships and dependencies

After:

# Load pre-computed context
Read .claude/sessions/SESSION_NAME/session_context.json
# Contains: architectural decisions, file relationships, key code snippets
# All analysis already done during session-start/session-update

Savings: 10-20% - Reuse cached analysis instead of re-analyzing

4. Smart Git State Tracking (5-10% additional savings)

Pattern: Cache git state, only re-scan if HEAD changed

# Check if git state changed since last checkpoint
cat .claude/sessions/SESSION_NAME/last_checkpoint.json
# Extract: last_commit_sha, last_update_time

git rev-parse HEAD  # Only if cached SHA doesn't match current HEAD
# Only re-scan git history if commits were added after session checkpoint

Savings: 5-10% - Skip git operations if repository unchanged

Implementation Guidelines

Cache Management

# Session state structure (session_state.json)
{
  "session_name": "feature-authentication",
  "started_at": "2026-01-27T10:00:00Z",
  "last_updated": "2026-01-27T15:30:00Z",
  "status": "in_progress",
  "goals": ["Implement OAuth2", "Add session management", "Update API docs"],
  "progress": [
    {"timestamp": "2026-01-27T11:00:00Z", "note": "OAuth scaffolding complete"},
    {"timestamp": "2026-01-27T15:30:00Z", "note": "Session store implemented"}
  ],
  "files_modified": ["src/auth/oauth.ts", "src/auth/session.ts"],
  "commits": [
    {"sha": "abc123", "message": "feat: Add OAuth2 provider integration"},
    {"sha": "def456", "message": "feat: Implement session store"}
  ],
  "git_state": {
    "branch": "feature/auth",
    "last_commit": "def456",
    "uncommitted_changes": false
  }
}
# Session context structure (session_context.json)
{
  "architectural_decisions": [
    "Using JWT for session tokens",
    "Redis for session storage",
    "OAuth2 authorization code flow"
  ],
  "file_relationships": {
    "src/auth/oauth.ts": ["src/auth/session.ts", "src/api/middleware.ts"],
    "src/auth/session.ts": ["src/store/redis.ts"]
  },
  "key_code_snippets": [
    {
      "file": "src/auth/oauth.ts",
      "function": "exchangeCodeForToken",
      "purpose": "OAuth token exchange endpoint"
    }
  ],
  "dependencies_added": ["passport", "passport-oauth2", "redis"]
}

Cache Validation Logic

# Efficient cache freshness check
CACHE_FILE=".claude/sessions/$SESSION_NAME/session_state.json"
LAST_COMMIT=$(jq -r '.git_state.last_commit' "$CACHE_FILE")
CURRENT_COMMIT=$(git rev-parse HEAD)

if [ "$LAST_COMMIT" = "$CURRENT_COMMIT" ]; then
  # Cache is fresh - use cached state (70-80% savings)
  echo "Loading cached session state..."
else
  # Cache is stale - re-scan only changed files
  echo "Updating session state (new commits detected)..."
  git diff --name-only "$LAST_COMMIT..HEAD"  # Only scan changed files
fi

Progressive Disclosure Flow

# Initial Resume (200-500 tokens)
**Session:** feature-authentication (started 2026-01-27)
**Status:** In Progress
**Goals:** OAuth2 implementation, session management, API documentation
**Last Update:** 15:30 - Session store implemented
**Files:** 2 modified | **Commits:** 2 | **Branch:** feature/auth

**Next Steps:**
1. Add OAuth error handling
2. Update API documentation
3. Write integration tests

Would you like to:
- Continue working on this session
- Review detailed progress history
- See code changes and architectural decisions

Only Load Full Details On Request

# User: "Show me the architectural decisions"
# NOW load full context
Read .claude/sessions/SESSION_NAME/session_context.json

# User: "Review the code changes"
# NOW load modified files
for file in $(jq -r '.files_modified[]' session_state.json); do
  Read "$file"  # Only read files mentioned in session
done

Common Anti-Patterns to Avoid

❌ Anti-Pattern 1: Re-reading Entire Session History

# DON'T re-read all session files
Read .claude/sessions/SESSION_NAME/session.md
Read .claude/sessions/SESSION_NAME/updates/update-001.md
Read .claude/sessions/SESSION_NAME/updates/update-002.md
# ... potentially dozens of update files

Instead: Load cached session_state.json (single file)

❌ Anti-Pattern 2: Re-analyzing All Modified Files

# DON'T re-analyze code from scratch
for file in modified_files; do
  Read "$file"
  # Analyze architecture, dependencies, patterns
done

Instead: Load cached session_context.json (pre-computed analysis)

❌ Anti-Pattern 3: Full Git History Scan

# DON'T scan entire git history
git log --all --oneline
git diff --stat HEAD~50..HEAD

Instead: Use cached git state, only check current HEAD

❌ Anti-Pattern 4: Loading Full Context Upfront

# DON'T load everything immediately
Read session_state.json
Read session_context.json
Read all modified files
Read all commits
# ... send all data to user at once

Instead: Progressive disclosure - summary first, details on demand

Success Metrics

Track optimization effectiveness:

**Before Optimization:**
- Tokens per resume: 3,000-5,000
- Files read: 10-20 (entire session history + modified files)
- Git operations: 5-10 (full history scan)
- Context loading: Eager (everything upfront)

**After Optimization:**
- Tokens per resume: 1,000-2,000 (60-80% reduction)
- Files read: 1-3 (cached state + conditional context)
- Git operations: 1-2 (HEAD check only)
- Context loading: Progressive (summary first, details on demand)

**Key Success Indicators:**
- Cache hit rate: >90% (most resumes use cached state)
- Time to first response: <2 seconds (summary only)
- User satisfaction: High (fast resume, relevant context)

Integration with Other Skills

Session Start/Update: Generate cache files

# During /session-start and /session-update
# Always write session_state.json, session_context.json, last_checkpoint.json
jq -n '{session_name: $name, started_at: $time, ...}' > session_state.json

Session End: Update final cache

# During /session-end
# Write final state with "completed" status
jq '.status = "completed"' session_state.json > session_state.json.tmp
mv session_state.json.tmp session_state.json

Other Skills: Leverage cached context

# Skills like /commit, /review, /test can read session context
# Avoid re-analyzing if session is active
if [ -f ".claude/sessions/.current-session" ]; then
  SESSION_NAME=$(cat .claude/sessions/.current-session)
  if [ -f ".claude/sessions/$SESSION_NAME/session_context.json" ]; then
    # Reuse cached context instead of re-analyzing
    echo "Using cached session context..."
  fi
fi

Real-World Impact

Scenario: Resume 5-day feature development session

  • Before: 5,000 tokens (read 20 session files, scan 50 commits, analyze 15 modified files)
  • After: 1,000 tokens (load 1 cached state file, show summary)
  • Savings: 80% token reduction
  • Time: 10 seconds → 2 seconds
  • User Experience: Instant context restoration

Cost Analysis:

  • 10 session resumes per week
  • Before: 50,000 tokens/week
  • After: 10,000 tokens/week
  • Annual Savings: 2 million tokens → ~$20-40 in API costs

Best Practices Summary

  1. Cache Everything: session_state.json, session_context.json, last_checkpoint.json
  2. Cache First: Always load from cache, validate timestamp, only re-scan if stale
  3. Progressive Loading: Summary first, full context only on demand
  4. Smart Validation: Check git HEAD, only re-scan if commits added
  5. Permanent Cache: Never expire session cache (valid until session modified)
  6. Context Reuse: Share cached context with other skills (/commit, /review, /test)
  7. Fast Resume: Target <2 second time-to-first-response with summary
  8. User Control: Let user request full details only if needed

This skill demonstrates optimal caching architecture and serves as a reference for other session management skills. The 70-80% token savings prove that session state tracking is one of the most efficient optimization patterns in the entire skill library.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

39.34%
按下载量换算37

Claude

30.23%
按下载量换算28

Cursor

16.97%
按下载量换算16

Gemini CLI

10.02%
按下载量换算9

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills