xiaohongshu
xiaohongshu
git-sync-checker-enhanced
Git 仓库同步状态检查工具。检查本地与远程仓库的同步状态、预测潜在冲突、检测敏感文件和大文件。当用户提到"检查同步状态"、"检查冲突"、"批量检查仓库"、"检查 gitignore"或类似的 Git 状态分析需求时使用此技能。
Full skill instructions
提供 Git 仓库状态检查和冲突预测功能。
核心功能:
项目包含三个 Shell 脚本:
conflict-predictor.sh - 冲突预测
batch-checker.sh - 批量检查
gitignore-checker.sh - 配置检查
用户可能说:
执行步骤:
bash conflict-predictor.sh
解释输出结果:
如果有冲突文件,列出具体的文件名
提供建议的操作步骤(脚本会自动输出)
注意事项:
用户可能说:
执行步骤:
# 检查工作区状态
git status
# 获取远程更新(不拉取)
git fetch --all
# 检查本地领先/落后的提交数
git rev-list --left-right --count HEAD...@{u}
解释输出:
如果用户关心冲突,运行 conflict-predictor.sh
用户可能说:
执行步骤:
bash batch-checker.sh ~/projects
解释输出:
如果有问题,建议用户优先处理标记为🔴的仓库
可选参数:
# 指定搜索深度(默认3)
bash batch-checker.sh ~/projects 2
# JSON 输出(供脚本使用)
bash batch-checker.sh ~/projects 3 json
用户可能说:
执行步骤:
bash gitignore-checker.sh
解释输出:
如果发现问题,提供清理步骤:
git rm --cached <文件>提醒用户:文件仍在 Git 历史中,如需彻底清除需要使用 git filter-branch 或 BFG Repo-Cleaner
如果脚本执行失败:
git rev-parse --git-dirchmod +x *.shgit --version🔍 Git 冲突检查
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
分支: feature/new-ui
远程: origin
📊 状态概览
本地修改文件: 5 个
远程修改文件: 3 个
共同修改文件: 2 个
⚠️ 中等风险
本地和远程修改了相同的文件,可能需要手动解决冲突。
⚠️ 可能冲突的文件:
• src/components/Header.tsx
• package.json
建议操作:
# 1. 备份当前分支
git branch backup-20251125-1430
# 2. 拉取并合并
git pull origin feature/new-ui
# 3. 如遇冲突,手动解决后:
git add <已解决的文件>
git commit
🔍 Git 仓库批量检查
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
搜索目录: /Users/you/projects
最大深度: 3
找到 5 个仓库
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅ project-a (main)
⚠️ project-b (dev) ↑2
🔴 project-c (feature/auth) +3
✅ project-d (main)
⚠️ project-e (main) ↓1
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 检查完成
总计: 5 个仓库
✅ 已同步: 2
⚠️ 需要同步: 2
🔴 需要立即处理: 1
检查脚本路径和权限:
# 查找脚本位置
find ~/.claude/skills -name "*.sh"
# 添加执行权限
chmod +x ~/.claude/skills/git-sync-checker-enhanced/*.sh
# 测试执行
bash ~/.claude/skills/git-sync-checker-enhanced/conflict-predictor.sh
检查远程配置:
git remote -v
如果没有远程仓库,脚本会提示用户添加。
对于大量仓库,可以:
git merge-base HEAD REMOTE/BRANCHgit diff --name-only BASE HEADgit diff --name-only BASE REMOTEcomm -12 <(local_files) <(remote_files)局限性:
find 搜索 .git 目录git status --porcelain 检查工作区git fetch 获取远程更新git rev-list --count 计算提交差异使用正则表达式匹配常见模式:
\.env$、\.env\.local$.*\.key$、.*\.pem$id_rsa、id_dsadatabase\.yml、secrets\.ymlxiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience