local-link/skills/recognize-codebase-branch-flow/SKILL.md
识别并记忆项目 git 分支模型
npx skillsauth add lionad-morotar/local-tools recognize-codebase-branch-flowInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
将项目信息持久化到本地 SQLite 数据库,用于后续快速查询和分析。
./db/branches.sqlite3./db/inited.lock检查 ./db/inited.lock 是否存在。不存在时:
CREATE TABLE projects (
path TEXT PRIMARY KEY,
name TEXT NOT NULL,
branch_model TEXT NOT NULL,
total_commits INTEGER NOT NULL DEFAULT 0,
last_commit_date TEXT,
last_commit_user TEXT,
users TEXT DEFAULT '[]',
analyzed_at TEXT NOT NULL,
hash TEXT NOT NULL
);
./db/inited.lock对每个待分析项目(realpath 作为主键):
analyzed_at 字段收集以下 git 信息:
total_commits: git rev-list --count --alllast_commit_date: 最近提交日期last_commit_user: 最近提交者users: 全部提交者去重后的数组hash: 当前 HEAD 短哈希(7 位)获取所有本地和远程分支(去重):
git branch -a | sed 's/^[* ]*//' | sed 's|remotes/[^/]*/||' | sort -u
根据收集到的分支上下文,结合你对分支模型的理解,做出判断。
可选判定结果:gitflow、github flow、gitlab flow、无显著分支模型、自建模式
使用 INSERT OR REPLACE 更新项目记录,字段:
path, name, branch_model, total_commits, last_commit_date, last_commit_user, users, analyzed_at, hash
当你需要详细了解分支模型差异,或用户要求提供权威资料时,参考以下资源:
tools
open understand dashboard for user
tools
这是一个技能文件的模板,展示了技能的基本结构和内容组织方式。
development
Be direct and informative. No filler, no fluff, but give enough to be useful.
development
使用 Evaluator-optimizer 模式进行系统性多轮网络搜索,采用结构化 Ask 流程在搜索前澄清研究目标。基于 YC Office Hours 的提问方法论,确保搜索方向清晰、结果可验证。当用户需要深入调查复杂主题、验证假设或全面收集信息时使用。