session-launcher

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Session Launcher

会话启动器

Purpose

用途

Zero context loss between conversations. When a new session starts, this skill:
  1. Searches for project context files
  2. Loads memory indexes and past decisions
  3. Reads session state
  4. Creates visual dashboard with actionable links
  5. Makes you immediately productive
For SDAM users: Compensates for lack of episodic memory by externalizing all session context. For ADHD users: Eliminates "where was I?" friction - instant continuation. For dyschronometria: Shows explicit timestamps on all context.
对话间无上下文丢失。当新会话启动时,本技能会:
  1. 搜索项目上下文文件
  2. 加载内存索引和过往决策
  3. 读取会话状态
  4. 创建带有可操作链接的可视化仪表板
  5. 让您立即进入高效工作状态
针对SDAM用户:通过外化所有会话上下文,弥补情景记忆缺失的问题。 针对ADHD用户:消除“我刚才在做什么?”的困扰,实现即时续接工作。 针对dyschronometria用户:为所有上下文显示明确时间戳。

Activation Triggers

激活触发条件

  • User says: "hi-ai"
  • User says: "continue", "restore context", "what was I working on"
  • Start of new conversation (proactively offer)
  • 用户说:“hi-ai”
  • 用户说:“continue”、“restore context”、“what was I working on”
  • 新对话启动时(主动提供)

Core Workflow

核心工作流程

1. Search for Context Files

1. 搜索上下文文件

Check these locations in order:
bash
undefined
按以下顺序检查这些位置:
bash
undefined

Current project context

Current project context

./.context/current.json ./.context/session.json ./DECISIONS.md ./README.md
./.context/current.json ./.context/session.json ./DECISIONS.md ./README.md

User's memory storage

User's memory storage

~/.claude-memories/ (Linux/macOS) or %USERPROFILE%.claude-memories\ (Windows)index.json ~/.claude-sessions/ (Linux/macOS) or %USERPROFILE%.claude-sessions\ (Windows)current.json ~/.claude-sessions/ (Linux/macOS) or %USERPROFILE%.claude-sessions\ (Windows)projects/
undefined
~/.claude-memories/ (Linux/macOS) or %USERPROFILE%.claude-memories\ (Windows)index.json ~/.claude-sessions/ (Linux/macOS) or %USERPROFILE%.claude-sessions\ (Windows)current.json ~/.claude-sessions/ (Linux/macOS) or %USERPROFILE%.claude-sessions\ (Windows)projects/
undefined

2. Load Memory Index

2. 加载内存索引

Read
~/.claude-memories/ (Linux/macOS) or %USERPROFILE%\.claude-memories\ (Windows)index.json
:
json
{
  "total_memories": N,
  "memories": [
    {
      "id": "unique-id",
      "type": "DECISION|BLOCKER|CONTEXT|PREFERENCE|PROCEDURE",
      "content": "the memory",
      "timestamp": "ISO8601",
      "tags": ["tag1", "tag2"],
      "project": "project-name"
    }
  ]
}
Extract:
  • Recent decisions (last 7 days)
  • Active blockers (status != "resolved")
  • Project context (matching current directory)
  • User preferences
读取
~/.claude-memories/ (Linux/macOS) or %USERPROFILE%\.claude-memories\ (Windows)index.json
json
{
  "total_memories": N,
  "memories": [
    {
      "id": "unique-id",
      "type": "DECISION|BLOCKER|CONTEXT|PREFERENCE|PROCEDURE",
      "content": "the memory",
      "timestamp": "ISO8601",
      "tags": ["tag1", "tag2"],
      "project": "project-name"
    }
  ]
}
提取:
  • 近期决策(过去7天)
  • 待解决障碍(状态 != "resolved")
  • 项目上下文(匹配当前目录)
  • 用户偏好

3. Identify Current Project

3. 识别当前项目

Determine project from:
  1. Current working directory name
  2. .context/project.txt
    if exists
  3. Git repository name:
    basename $(git rev-parse --show-toplevel 2>/dev/null)
  4. Ask user if unclear
通过以下方式确定项目:
  1. 当前工作目录名称
  2. 若存在
    .context/project.txt
    ,则读取该文件
  3. Git仓库名称:
    basename $(git rev-parse --show-toplevel 2>/dev/null)
  4. 若不明确则询问用户

4. Create Session Dashboard

4. 创建会话仪表板

Generate HTML file at
~/.claude-artifacts/ (Linux/macOS) or %USERPROFILE%\.claude-artifacts\ (Windows)session-dashboard-{timestamp}.html
:
html
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Session Restored</title>
    <style>
        body {
            font-family: monospace;
            max-width: 1200px;
            margin: 40px auto;
            padding: 20px;
            background: #1e1e1e;
            color: #d4d4d4;
        }
        .section {
            background: #252526;
            border: 1px solid #3e3e42;
            border-radius: 6px;
            padding: 20px;
            margin: 20px 0;
        }
        .section h2 {
            margin-top: 0;
            color: #4ec9b0;
            border-bottom: 1px solid #3e3e42;
            padding-bottom: 10px;
        }
        .timestamp {
            color: #858585;
            font-size: 0.9em;
        }
        .decision {
            background: #2d2d30;
            padding: 10px;
            margin: 10px 0;
            border-left: 3px solid #4ec9b0;
        }
        .blocker {
            background: #2d2d30;
            padding: 10px;
            margin: 10px 0;
            border-left: 3px solid #f48771;
        }
        .action {
            display: inline-block;
            background: #0e639c;
            color: white;
            padding: 8px 16px;
            margin: 5px;
            border-radius: 4px;
            text-decoration: none;
        }
        .metric {
            font-size: 2em;
            color: #4ec9b0;
            font-weight: bold;
        }
    </style>
</head>
<body>
    <h1>🚀 Session Restored</h1>
    <p class="timestamp">Restored at: {current_timestamp}</p>

    <div class="section">
        <h2>📁 Current Project</h2>
        <div class="metric">{project_name}</div>
        <p>Location: <code>{project_path}</code></p>
        <p>Last worked: <span class="timestamp">{last_session_time}</span></p>
    </div>

    <div class="section">
        <h2>🎯 Recent Decisions (Last 7 Days)</h2>
        {for each recent decision:}
        <div class="decision">
            <strong>{decision.content}</strong>
            <div class="timestamp">{decision.timestamp} - {relative_time}</div>
            {if decision.tags:}<p>Tags: {tags_joined}</p>{endif}
        </div>
        {endfor}
    </div>

    <div class="section">
        <h2>🚧 Active Blockers</h2>
        {for each active blocker:}
        <div class="blocker">
            <strong>{blocker.content}</strong>
            <div class="timestamp">{blocker.timestamp} - {relative_time}</div>
        </div>
        {endfor}
        {if no blockers:}<p>✅ No active blockers</p>{endif}
    </div>

    <div class="section">
        <h2>📊 Memory Stats</h2>
        <p>Total memories: <span class="metric">{total_memories}</span></p>
        <p>Decisions: {decision_count} | Blockers: {blocker_count} | Procedures: {procedure_count}</p>
    </div>

    <div class="section">
        <h2>⚡ Quick Actions</h2>
        <a href="file://~/.claude-memories/ (Linux/macOS) or %USERPROFILE%\.claude-memories\ (Windows)index.json" class="action">View All Memories</a>
        <a href="file://{project_path}" class="action">Open Project</a>
        <a href="file://~/.claude-artifacts/ (Linux/macOS) or %USERPROFILE%\.claude-artifacts\ (Windows)" class="action">View Artifacts</a>
    </div>
</body>
</html>
~/.claude-artifacts/ (Linux/macOS) or %USERPROFILE%\.claude-artifacts\ (Windows)session-dashboard-{timestamp}.html
生成HTML文件:
html
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Session Restored</title>
    <style>
        body {
            font-family: monospace;
            max-width: 1200px;
            margin: 40px auto;
            padding: 20px;
            background: #1e1e1e;
            color: #d4d4d4;
        }
        .section {
            background: #252526;
            border: 1px solid #3e3e42;
            border-radius: 6px;
            padding: 20px;
            margin: 20px 0;
        }
        .section h2 {
            margin-top: 0;
            color: #4ec9b0;
            border-bottom: 1px solid #3e3e42;
            padding-bottom: 10px;
        }
        .timestamp {
            color: #858585;
            font-size: 0.9em;
        }
        .decision {
            background: #2d2d30;
            padding: 10px;
            margin: 10px 0;
            border-left: 3px solid #4ec9b0;
        }
        .blocker {
            background: #2d2d30;
            padding: 10px;
            margin: 10px 0;
            border-left: 3px solid #f48771;
        }
        .action {
            display: inline-block;
            background: #0e639c;
            color: white;
            padding: 8px 16px;
            margin: 5px;
            border-radius: 4px;
            text-decoration: none;
        }
        .metric {
            font-size: 2em;
            color: #4ec9b0;
            font-weight: bold;
        }
    </style>
</head>
<body>
    <h1>🚀 Session Restored</h1>
    <p class="timestamp">Restored at: {current_timestamp}</p>

    <div class="section">
        <h2>📁 Current Project</h2>
        <div class="metric">{project_name}</div>
        <p>Location: <code>{project_path}</code></p>
        <p>Last worked: <span class="timestamp">{last_session_time}</span></p>
    </div>

    <div class="section">
        <h2>🎯 Recent Decisions (Last 7 Days)</h2>
        {for each recent decision:}
        <div class="decision">
            <strong>{decision.content}</strong>
            <div class="timestamp">{decision.timestamp} - {relative_time}</div>
            {if decision.tags:}<p>Tags: {tags_joined}</p>{endif}
        </div>
        {endfor}
    </div>

    <div class="section">
        <h2>🚧 Active Blockers</h2>
        {for each active blocker:}
        <div class="blocker">
            <strong>{blocker.content}</strong>
            <div class="timestamp">{blocker.timestamp} - {relative_time}</div>
        </div>
        {endfor}
        {if no blockers:}<p>✅ No active blockers</p>{endif}
    </div>

    <div class="section">
        <h2>📊 Memory Stats</h2>
        <p>Total memories: <span class="metric">{total_memories}</span></p>
        <p>Decisions: {decision_count} | Blockers: {blocker_count} | Procedures: {procedure_count}</p>
    </div>

    <div class="section">
        <h2>⚡ Quick Actions</h2>
        <a href="file://~/.claude-memories/ (Linux/macOS) or %USERPROFILE%\.claude-memories\ (Windows)index.json" class="action">View All Memories</a>
        <a href="file://{project_path}" class="action">Open Project</a>
        <a href="file://~/.claude-artifacts/ (Linux/macOS) or %USERPROFILE%\.claude-artifacts\ (Windows)" class="action">View Artifacts</a>
    </div>
</body>
</html>

5. Output Summary

5. 输出摘要

After creating dashboard, output to user:
🚀 Session Restored

📁 Project: {project_name}
📍 Location: {project_path}
🕐 Last worked: {relative_time}

📝 Recent Decisions ({count}):
{for each decision (max 5):}
  • {decision.content} ({relative_time})
{endfor}

🚧 Active Blockers ({count}):
{for each blocker:}
  • {blocker.content} ({relative_time})
{endfor}

💾 Memory: {total_memories} total memories loaded

📊 Dashboard: {dashboard_path}

✅ Full context restored. Ready to continue!

What would you like to work on?
创建仪表板后,向用户输出:
🚀 Session Restored

📁 Project: {project_name}
📍 Location: {project_path}
🕐 Last worked: {relative_time}

📝 Recent Decisions ({count}):
{for each decision (max 5):}
  • {decision.content} ({relative_time})
{endfor}

🚧 Active Blockers ({count}):
{for each blocker:}
  • {blocker.content} ({relative_time})
{endfor}

💾 Memory: {total_memories} total memories loaded

📊 Dashboard: {dashboard_path}

✅ Full context restored. Ready to continue!

What would you like to work on?

Memory Integration

内存集成

Reading Memories

读取内存

Always check memory index for:
  • Project-specific context
  • User preferences (tech stack, coding style)
  • Past decisions affecting current work
  • Similar past problems/solutions
始终检查内存索引以获取:
  • 项目特定上下文
  • 用户偏好(技术栈、编码风格)
  • 影响当前工作的过往决策
  • 类似的过往问题/解决方案

Time Anchoring (for Dyschronometria)

时间锚定(针对Dyschronometria用户)

Convert all timestamps to relative format:
  • "2 hours ago"
  • "3 days ago"
  • "Last Tuesday"
  • Include ISO timestamp for precision
将所有时间戳转换为相对格式:
  • "2 hours ago"
  • "3 days ago"
  • "Last Tuesday"
  • 同时保留ISO时间戳以保证精度

Context Filtering

上下文过滤

Filter memories by:
  1. Project match:
    memory.project === current_project
  2. Recency: Last 30 days weighted higher
  3. Type priority: BLOCKER > DECISION > CONTEXT > PROCEDURE
  4. Relevance: Tag matching if available
按以下条件过滤内存:
  1. 项目匹配
    memory.project === current_project
  2. 时效性:过去30天的内容权重更高
  3. 类型优先级:BLOCKER > DECISION > CONTEXT > PROCEDURE
  4. 相关性:若有标签则匹配标签

Session State Management

会话状态管理

Saving Session State

保存会话状态

Before ending conversation (if user says "goodbye", "see you", "done for now"):
  1. Create/update
    ~/.claude-sessions/ (Linux/macOS) or %USERPROFILE%\.claude-sessions\ (Windows)current.json
    :
json
{
  "project": "project-name",
  "project_path": "/full/path",
  "last_active": "ISO8601_timestamp",
  "last_files": [
    "/path/to/file1.js",
    "/path/to/file2.py"
  ],
  "last_topic": "Brief description of what we were working on",
  "next_actions": [
    "Suggested next step 1",
    "Suggested next step 2"
  ]
}
  1. Update memory index with session summary:
json
{
  "type": "NOTE",
  "content": "Session ended: {brief_summary_of_work}",
  "timestamp": "ISO8601",
  "tags": ["session", "project-name"],
  "project": "project-name"
}
对话结束前(若用户说“goodbye”、“see you”、“done for now”):
  1. 创建/更新
    ~/.claude-sessions/ (Linux/macOS) or %USERPROFILE%\.claude-sessions\ (Windows)current.json
json
{
  "project": "project-name",
  "project_path": "/full/path",
  "last_active": "ISO8601_timestamp",
  "last_files": [
    "/path/to/file1.js",
    "/path/to/file2.py"
  ],
  "last_topic": "Brief description of what we were working on",
  "next_actions": [
    "Suggested next step 1",
    "Suggested next step 2"
  ]
}
  1. 使用会话摘要更新内存索引:
json
{
  "type": "NOTE",
  "content": "Session ended: {brief_summary_of_work}",
  "timestamp": "ISO8601",
  "tags": ["session", "project-name"],
  "project": "project-name"
}

Project-Specific Sessions

项目特定会话

For multi-project users, maintain:
~/.claude-sessions/ (Linux/macOS) or %USERPROFILE%\.claude-sessions\ (Windows)projects/
├── boostbox.json
├── toolhub.json
├── 88dimensions.json
└── mcp-stack.json
Each contains project-specific state.
针对多项目用户,维护以下目录结构:
~/.claude-sessions/ (Linux/macOS) or %USERPROFILE%\.claude-sessions\ (Windows)projects/
├── boostbox.json
├── toolhub.json
├── 88dimensions.json
└── mcp-stack.json
每个文件包含对应项目的特定状态。

Visual Dashboard Features

可视化仪表板特性

For Aphantasia Users

针对Aphantasia用户

Always provide:
  • Concrete metrics (numbers, counts)
  • Visual structure (HTML dashboard)
  • Explicit links (clickable file paths)
  • Status indicators (✅ ❌ 🚧 emojis)
始终提供:
  • 具体指标(数字、数量)
  • 可视化结构(HTML仪表板)
  • 明确链接(可点击的文件路径)
  • 状态指示器(✅ ❌ 🚧 表情符号)

For ADHD Users

针对ADHD用户

Dashboard must:
  • Load instantly (<2 seconds)
  • Show quick actions (immediate next steps)
  • Highlight blockers (red/urgent visual treatment)
  • Provide direct links (one-click access to files)
仪表板必须:
  • 即时加载(<2秒)
  • 显示快速操作(即时下一步)
  • 突出显示障碍(红色/紧急视觉样式)
  • 提供直接链接(一键访问文件)

For SDAM Users

针对SDAM用户

Dashboard must:
  • Externalize all context (no assumption of memory)
  • Show time anchors (when things happened)
  • Display decision history (what was decided)
  • Link to artifacts (proof of past work)
仪表板必须:
  • 外化所有上下文(不假设用户有记忆)
  • 显示时间锚点(事件发生时间)
  • 展示决策历史(过往决策内容)
  • 链接到工件(过往工作的证明)

Error Handling

错误处理

If No Context Found

未找到上下文时

👋 Hi! This looks like a fresh start.

I couldn't find existing session context, so let's establish some:

1. What project are you working on?
2. Should I create a memory index for you?
3. Would you like to start tracking decisions?

(I'll create the necessary directories and get you set up)
👋 Hi! This looks like a fresh start.

I couldn't find existing session context, so let's establish some:

1. What project are you working on?
2. Should I create a memory index for you?
3. Would you like to start tracking decisions?

(I'll create the necessary directories and get you set up)

If Memory Index Corrupted

内存索引损坏时

⚠️ Memory index appears corrupted.

Creating backup at: ~/.claude-memories/ (Linux/macOS) or %USERPROFILE%\.claude-memories\ (Windows)backups/index-{timestamp}.json
Initializing fresh index...

✅ Fresh index created. Previous memories backed up.
⚠️ Memory index appears corrupted.

Creating backup at: ~/.claude-memories/ (Linux/macOS) or %USERPROFILE%\.claude-memories\ (Windows)backups/index-{timestamp}.json
Initializing fresh index...

✅ Fresh index created. Previous memories backed up.

If Multiple Projects Detected

检测到多个项目时

🤔 I found context for multiple projects:

1. BOOSTBOX (last active: 2 days ago)
2. Tool Hub (last active: 5 days ago)
3. MCP Stack (last active: 1 week ago)

Which project would you like to work on?
🤔 I found context for multiple projects:

1. BOOSTBOX (last active: 2 days ago)
2. Tool Hub (last active: 5 days ago)
3. MCP Stack (last active: 1 week ago)

Which project would you like to work on?

Integration with Other Skills

与其他技能集成

Memory Manager

Memory Manager

  • Queries memory-manager for structured memory search
  • Defers complex memory operations to memory-manager
  • Uses memory-manager's categorization system
  • 向memory-manager查询结构化内存搜索
  • 将复杂内存操作交由memory-manager处理
  • 使用memory-manager的分类系统

Context Manager

Context Manager

  • Works with context-manager to maintain
    .context/
    directory
  • Reads context-manager's structured data
  • Updates session state via context-manager
  • 与context-manager协作维护
    .context/
    目录
  • 读取context-manager的结构化数据
  • 通过context-manager更新会话状态

Error Debugger

Error Debugger

  • Surfaces recent blockers for error-debugger to consider
  • Checks if current error matches past error memories
  • 为error-debugger呈现近期障碍
  • 检查当前错误是否与过往错误记忆匹配

Quick Reference

快速参考

File Locations

文件位置

  • Memory index:
    ~/.claude-memories/ (Linux/macOS) or %USERPROFILE%\.claude-memories\ (Windows)index.json
  • Current session:
    ~/.claude-sessions/ (Linux/macOS) or %USERPROFILE%\.claude-sessions\ (Windows)current.json
  • Project sessions:
    ~/.claude-sessions/ (Linux/macOS) or %USERPROFILE%\.claude-sessions\ (Windows)projects/{name}.json
  • Dashboards:
    ~/.claude-artifacts/ (Linux/macOS) or %USERPROFILE%\.claude-artifacts\ (Windows)session-dashboard-*.html
  • Memory index:
    ~/.claude-memories/ (Linux/macOS) or %USERPROFILE%\.claude-memories\ (Windows)index.json
  • Current session:
    ~/.claude-sessions/ (Linux/macOS) or %USERPROFILE%\.claude-sessions\ (Windows)current.json
  • Project sessions:
    ~/.claude-sessions/ (Linux/macOS) or %USERPROFILE%\.claude-sessions\ (Windows)projects/{name}.json
  • Dashboards:
    ~/.claude-artifacts/ (Linux/macOS) or %USERPROFILE%\.claude-artifacts\ (Windows)session-dashboard-*.html

Trigger Phrases

触发短语

  • "hi-ai" (primary)
  • "continue"
  • "restore context"
  • "what was I working on"
  • "where did we leave off"
  • "hi-ai" (primary)
  • "continue"
  • "restore context"
  • "what was I working on"
  • "where did we leave off"

Success Criteria

成功标准

✅ User says "hi-ai" and is immediately productive ✅ No need to explain "what we were working on" ✅ All past decisions visible ✅ Active blockers surfaced ✅ Context restored in <2 seconds
✅ User says "hi-ai" and is immediately productive ✅ No need to explain "what we were working on" ✅ All past decisions visible ✅ Active blockers surfaced ✅ Context restored in <2 seconds