recover-context

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

recover-context

recover-context

Use this skill to extract context from a parent session when a session lineage is present (shown in the first user message of this conversation).
当存在会话谱系(显示在本次对话的第一条用户消息中)时,使用此技能从父会话中提取上下文。

Instructions

操作说明

  1. Identify the most recent parent session from the lineage chain (the last file in the chronological list).
  2. Use sub-agents to explore (to avoid bloating your own context):
    • If you have the Task tool with subagent support, use the
      session-searcher
      subagent (subagent_type:
      session-searcher
      ) to analyze the most recent session
    • If sub-agents are NOT available, use the
      aichat:session-search
      skill instead
  3. Extract the following from the most recent session:
    • What was the last task being worked on?
    • What was the current state of that task (completed, in-progress, blocked)?
    • Any pending items or next steps mentioned?
    • Key decisions made or approaches chosen
  4. Also check for associated documents:
    • Issue specs or task descriptions referenced in the session
    • Any markdown files created during that session (check WORKLOG/, issues/, etc.)
    • Code files that were being modified
  5. Report back concisely:
    • State your understanding of the task context
    • List any files you found that are relevant
    • Ask the user how they'd like to proceed
  1. 从谱系链中识别最新的父会话(按时间顺序排列的列表中的最后一个文件)。
  2. 使用子Agent进行探索(避免自身上下文过载):
    • 如果你拥有支持子Agent的Task工具,请使用
      session-searcher
      子Agent(subagent_type:
      session-searcher
      )分析最新会话
    • 如果子Agent不可用,请改用
      aichat:session-search
      技能
  3. 从最新会话中提取以下信息
    • 正在处理的最后一项任务是什么?
    • 该任务的当前状态(已完成、进行中、受阻)?
    • 是否提到任何待办事项或后续步骤?
    • 已做出的关键决策或选定的方案
  4. 同时检查相关文档
    • 会话中引用的问题规范或任务描述
    • 该会话期间创建的任何markdown文件(检查WORKLOG/、issues/等目录)
    • 正在修改的代码文件
  5. 简洁地反馈结果
    • 说明你对任务上下文的理解
    • 列出你找到的所有相关文件
    • 询问用户希望如何继续

Example Sub-agent Prompt

子Agent提示示例

If using the Task tool with
session-searcher
subagent:
Analyze the session file at [path from lineage] and extract:
1. The last task being worked on (look at the final 20-30 messages)
2. Current state of that task
3. Any referenced markdown files (issue specs, work logs, etc.)
4. Pending next steps or blockers

Return a concise summary.
如果使用带有
session-searcher
子Agent的Task工具:
Analyze the session file at [path from lineage] and extract:
1. The last task being worked on (look at the final 20-30 messages)
2. Current state of that task
3. Any referenced markdown files (issue specs, work logs, etc.)
4. Pending next steps or blockers

Return a concise summary.

Constraints

约束条件

  • Do NOT read large session files directly into your own context
  • ALWAYS delegate to sub-agents or the session-search skill
  • Keep your summary concise - the user knows what they were working on
  • Focus on the LAST task, not the entire session history
  • 请勿直接将大型会话文件读取到自身上下文中
  • 务必委托给子Agent或会话搜索技能
  • 保持总结简洁——用户清楚他们之前在做什么
  • 重点关注最后一项任务,而非整个会话历史