reconcile-merge-conflicts by cameroncooke/cameroncooke-skills
npx skills add https://github.com/cameroncooke/cameroncooke-skills --skill reconcile-merge-conflicts通过保留双方意图并防止回归来解决合并和变基冲突。
安全规则:
fetch、日志、PR 元数据读取)。git push。git reset 变体。运行:
git status --porcelain=v1 -b
git status
分类状态:
如果 git 不可用或目录不是 git 仓库,则停止并报告失败。
如果没有活动操作且工作树是脏的,则停止并询问用户:
不要在脏的工作树上启动合并/变基操作。
如果已有操作正在进行,可选择创建一个进行中的安全书签(需用户确认):
git branch backup/conflict-reconcile/inprogress/$(git rev-parse --short HEAD)
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
询问用户是否要:
rebase main)merge main)首先确认当前分支和预期方向:
git branch --show-current
如果当前分支不是预期的源分支,则停止并请用户切换。
开始之前,创建回滚分支:
git branch backup/conflict-reconcile/$(date +%Y%m%d-%H%M%S)-$(git rev-parse --short HEAD)
告诉用户备份分支名称和恢复命令:
git switch <backup-branch-name>
如果备份分支名称已存在,则附加唯一后缀并重试。
列出所有技能创建的备份:
git branch --list 'backup/conflict-reconcile/*'
确定远程首选(如果存在 origin 则优先使用,否则使用用户指定的远程):
git remote
如果用户说变基到目标分支,优先使用最新的远程跟踪引用并首先捕获证据:
git fetch <remote> <target-branch>
git rev-parse --short HEAD
git rev-parse --short <remote>/<target-branch>
git rebase <remote>/<target-branch>
运行前确认目标分支在远程存在。如果 git rev-parse --short <remote>/<target-branch> 失败,则停止并请用户确认正确的目标分支名称/远程。
变基会重写历史。如果分支已被推送/共享,请在变基前请求明确确认。
如果用户要求合并目标分支,优先使用最新的远程跟踪引用并首先捕获证据:
git fetch <remote> <target-branch>
git rev-parse --short HEAD
git rev-parse --short <remote>/<target-branch>
git merge <remote>/<target-branch>
运行前确认目标分支在远程存在。如果用户明确想要本地引用,则遵循用户指示。
运行:
git diff --name-only --diff-filter=U
git log --oneline --decorate --max-count=30
对于每个冲突文件,检查双方、合并基础版本、最近的提交以及可用的相关 PR 讨论。
有用的命令:
# stage 1 (base), stage 2 (ours), stage 3 (theirs)
git show :1:<path>
git show :2:<path>
git show :3:<path>
将时间信号用作证据,而非证明。
阅读 <skill-dir>/references/decision-rubric.md 以处理模糊选择。
默认策略:
main)视为当前行为的规范。如果更清晰或更安全,优先选择干净的重写而非标记修补。
如果源端逻辑已过时,则移除它并说明证据。
每个文件解决后:
git add <file>
继续操作:
git rebase --continuegit commit --no-edit(或在支持时使用 git merge --continue)重复直到没有冲突为止。
在每次继续/提交之前,验证没有遗留的冲突标记:
git diff --check
git grep -n '<<<<<<<\|>>>>>>>\|=======' -- .
在每个产生提交的继续步骤(尤其是 git rebase --continue)之前,运行快速高信号检查。如果检查失败,则停止并修复。
所有冲突解决后,运行完整的质量门集合。
阅读 <skill-dir>/references/quality-gates.md 以了解命令发现和优先级。
除非实际运行,否则不要声称检查已通过。
默认为操作结束时的审查:
仅在存在高风险区域或低置信度时才请求操作中的审查。
如果存在任何低置信度决策,则在最终确定前需要明确的人工批准。
回滚选项:
git rebase --abortgit merge --abort(当可用时)不要自动运行破坏性回滚命令。
包括:
目标提交哈希必须来自明确的远程跟踪引用解析(例如 git rev-parse <remote>/<target-branch>),而不是来自 FETCH_HEAD。
归属规则:
## 协调审计
### 摘要
- 操作:变基到 `main`
- 冲突文件:3
- 状态:变基完成
### 按置信度排序的决策
- 高 — `src/core/parser.ts`:保留了来自 main 的新验证流程,并重新应用了源遥测钩子。
- 中 — `src/ui/filters.tsx`:重写了过滤器组合以保留两种行为。
- 低 — `src/legacy/adapter.ts`:移除了源回退路径;需要所有者确认。
### 审计证据
- 命令:`git rebase origin/main`
- 时间戳 (UTC):`2026-03-02T11:15:34Z`
- 目标哈希:`13eeb846`
- 置信度:高
- 归属说明:reflog 确认操作序列,而非操作者身份
### 开放性问题(合并后)
1. 匿名用户的遗留空状态行为是否应该保留?
2. 外部消费者 `X` 是否仍然依赖已移除的回退行为?
仅当以下所有条件都为真时才完成:
git reset。git push 或 git reset 命令。每周安装数
1
仓库
GitHub 星标数
42
首次出现
1 天前
安全审计
安装于
amp1
cline1
opencode1
cursor1
kimi-cli1
codex1
Resolve merge and rebase conflicts by preserving intent from both sides while preventing regressions.
Safety rules:
fetch, logs, PR metadata reads).git push.git reset variant.Run:
git status --porcelain=v1 -b
git status
Classify state:
If git is unavailable or the directory is not a git repo, stop and report the failure.
If no operation is active and the working tree is dirty, stop and ask user to:
Do not start merge/rebase on a dirty tree.
If an operation is already active, optionally create an in-progress safety bookmark (with user confirmation):
git branch backup/conflict-reconcile/inprogress/$(git rev-parse --short HEAD)
Ask user whether to:
rebase main)merge main)Confirm current branch and intended direction first:
git branch --show-current
If current branch is not the intended source branch, stop and ask user to switch.
Before starting, create rollback branch:
git branch backup/conflict-reconcile/$(date +%Y%m%d-%H%M%S)-$(git rev-parse --short HEAD)
Tell user the backup branch name and recovery command:
git switch <backup-branch-name>
If backup branch name already exists, append a unique suffix and retry.
List all skill-created backups with:
git branch --list 'backup/conflict-reconcile/*'
Determine remote first (prefer origin if present, otherwise use the remote user specifies):
git remote
If user says rebase onto target branch, prefer up-to-date remote-tracking ref and capture evidence first:
git fetch <remote> <target-branch>
git rev-parse --short HEAD
git rev-parse --short <remote>/<target-branch>
git rebase <remote>/<target-branch>
Confirm target branch exists remotely before running. If git rev-parse --short <remote>/<target-branch> fails, stop and ask user to confirm the correct target branch name/remote.
Rebasing rewrites history. If branch is pushed/shared, ask for explicit confirmation before rebasing.
If user asks to merge target branch, prefer up-to-date remote-tracking ref and capture evidence first:
git fetch <remote> <target-branch>
git rev-parse --short HEAD
git rev-parse --short <remote>/<target-branch>
git merge <remote>/<target-branch>
Confirm target branch exists remotely before running. If user explicitly wants a local ref, follow user instruction.
Run:
git diff --name-only --diff-filter=U
git log --oneline --decorate --max-count=30
For each conflicted file, inspect both sides, merge-base version, recent commits, and related PR discussion when available.
Useful commands:
# stage 1 (base), stage 2 (ours), stage 3 (theirs)
git show :1:<path>
git show :2:<path>
git show :3:<path>
Use temporal signals as evidence, not proof.
Read <skill-dir>/references/decision-rubric.md for ambiguous choices.
Default strategy:
main) as canonical for current behavior.Prefer clean rewrites over marker patching when clearer or safer.
If source-side logic is obsolete, remove it and state evidence.
After each file resolution:
git add <file>
Continue operation:
git rebase --continuegit commit --no-edit (or git merge --continue when supported)Repeat until no conflicts remain.
Before each continue/commit, verify no leftover conflict markers:
git diff --check
git grep -n '<<<<<<<\|>>>>>>>\|=======' -- .
Before each commit-producing continuation step (especially git rebase --continue), run fast high-signal checks. If checks fail, stop and fix.
After all conflicts are resolved, run the full quality gate set.
Read <skill-dir>/references/quality-gates.md for command discovery and precedence.
Never claim checks passed unless actually run.
Default to end-of-operation review:
Request mid-operation review only for high-risk areas or low confidence.
If any Low-confidence decision remains, require explicit human approval before finalizing.
Rollback options:
git rebase --abortgit merge --abort (when available)Do not run destructive rollback commands automatically.
Include:
The target commit hash must come from explicit remote-tracking ref resolution (for example git rev-parse <remote>/<target-branch>), not from FETCH_HEAD.
Attribution rule:
## Reconciliation Audit
### Summary
- Operation: rebase onto `main`
- Conflicted files: 3
- Status: rebase completed
### Confidence-ranked decisions
- High — `src/core/parser.ts`: Kept new validation flow from main and reapplied source telemetry hook.
- Medium — `src/ui/filters.tsx`: Rewrote filter composition to preserve both behaviors.
- Low — `src/legacy/adapter.ts`: Removed source fallback path; needs owner confirmation.
### Audit evidence
- Command: `git rebase origin/main`
- Timestamp (UTC): `2026-03-02T11:15:34Z`
- Target hash: `13eeb846`
- Confidence: High
- Attribution caveat: reflog confirms operation sequence, not actor identity
### Open questions (consolidated)
1. Should legacy empty-state behavior remain for anonymous users?
2. Is external consumer `X` still relying on removed fallback behavior?
Complete only when all are true:
git reset.git push or git reset command was run.Weekly Installs
1
Repository
GitHub Stars
42
First Seen
1 day ago
Security Audits
Gen Agent Trust HubPassSocketPassSnykWarn
Installed on
amp1
cline1
opencode1
cursor1
kimi-cli1
codex1
agent-browser 浏览器自动化工具 - Vercel Labs 命令行网页操作与测试
150,000 周安装
Vue Router 最佳实践指南:导航守卫、路由生命周期与常见陷阱解决方案
9,200 周安装
后台代理状态通知 - 避免轮询浪费,高效处理AI代理进度更新
205 周安装
网站设计审查工具 - 自动检测并修复HTML/CSS/JS、React、Vue等框架的视觉与布局问题
8,900 周安装
.NET/C# 最佳实践指南:代码规范、设计模式、依赖注入与AI集成
8,900 周安装
Playwright MCP 测试生成工具 - 自动生成 TypeScript 端到端测试代码
9,000 周安装
GitHub Copilot create-readme:AI自动生成专业README文档工具
9,000 周安装