Skip to main content

branch-recall

> Use when this capability is needed.

跳到安装

来源信息

仓库
tomevault-io/skills-registry
最近来源活动
2026年4月28日 22:53
检测到的 SKILL.md 语言
英语
星标
1
分支
0

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

文件资源管理器
2 个文件

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
branch-recall
description
> Use when this capability is needed.
# Branch Recall Recover context of the current git branch — understand what was done before and continue working with full awareness. ## Workflow ### Step 1: Identify the branch and base ```bash # Current branch name git branch --show-current # Find the merge base with main (or master) git merge-base HEAD main 2>/dev/null || git merge-base HEAD master 2>/dev/null ``` If on `main`/`master`, inform the user that there's no feature branch to recall and stop. ### Step 2: Commit history Show all commits on this branch since it diverged from the base branch: ```bash git log --oneline --reverse main..HEAD 2>/dev/null || git log --oneline --reverse master..HEAD 2>/dev/null ``` ### Step 3: Changed files overview ```bash # File stats — what was added, modified, deleted git diff --stat main...HEAD 2>/dev/null || git diff --stat master...HEAD 2>/dev/null # List of changed files with status (A/M/D/R) git diff --name-status main...HEAD 2>/dev/null || git diff --name-status master...HEAD 2>/dev/null ``` ### Step 4: Key diffs Show the actual diff to understand what changed: ```bash git diff main...HEAD 2>/dev/null || git diff master...HEAD 2>/dev/null ``` If the diff is very large (>500 lines), summarize by file instead of showing the full diff. Use `--stat` and then read only the most important changed files. ### Step 5 (--deep mode only): Read key files If the user invoked with `--deep` argument: 1. Identify the top 5-7 most significant changed files (by diff size or importance) 2. Read each file in full using the Read tool 3. Build a deeper understanding of the current state of the code Skip this step in default mode to preserve context window. ### Step 6: Synthesize context Present a structured summary: ``` ## Branch: <branch-name> ## Base: <base-branch> (diverged <N> commits ago) ### What was done - <High-level summary of changes based on commits and diffs> ### Changed files (<N> files) - **Added:** <list> - **Modified:** <list> - **Deleted:** <list> ### Current state - <What appears to be in progress or incomplete> - <Any TODO/FIXME markers found in the diff> ### Suggested next steps - <Based on the changes, what likely needs to be done next> ``` ## Important - Always use three-dot diff (`main...HEAD`) to see changes relative to the merge base, not two-dot - If there are uncommitted changes, mention them separately using `git status` and `git diff` (unstaged) - Look for TODO, FIXME, HACK, XXX markers in the diff to identify incomplete work - Check for failing tests if test files were modified - Preserve the summary as working context for the rest of the conversation --- > Converted and distributed by [TomeVault](https://tomevault.io/claim/alexey1312) — claim your Tome and manage your conversions. <!-- tomevault:4.0:skill_md:2026-04-14 -->
在 GitHub 查看