Token导航 LogoToken导航TokenDH.com
开发只读github未标认证来源可访问许可证需确认审计通过

resolve-conflicts解决冲突

Agent Skill

resolve-conflicts 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

261

周安装

11

GitHub Stars

公开资料未说明

下载量

92
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:resolve-conflicts(解决冲突)
来源仓库:https://github.com/nielsmadan/agentic-coding
仓库路径:skills/resolve-conflicts
安装命令:
npx skills add https://github.com/nielsmadan/agentic-coding --skill resolve-conflicts
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/nielsmadan/agentic-coding --skill resolve-conflicts

简介

resolve-conflicts 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中围绕仓库状态或协作事项进行整理。
  • 通过 npx 命令从指定仓库安装,需结合原始 README 确认具体用法。
  • 使用前应核实权限范围、维护状态及是否涉及联网或文件操作。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Resolve Conflicts

Resolve git conflicts from any operation with proper continuation workflow.

Usage

/resolve-conflicts              # Resolve all conflicts
/resolve-conflicts path/to/file # Focus on specific file

Gotchas

  • During rebase, ours/theirs semantics are INVERTED. "Ours" is the branch being rebased onto (the target), not your working branch. This causes wrong-direction resolutions if you forget.
  • Lock file conflicts (package-lock.json, yarn.lock, Podfile.lock) must NEVER be manually resolved. Delete the lock file and regenerate it — manual merging produces corrupt files.

Workflow

Step 1: Detect Operation Type

Use Glob to check for these sentinel files in the .git/ directory:

  • .git/MERGE_HEADMerge
  • .git/rebase-merge or .git/rebase-applyRebase
  • .git/CHERRY_PICK_HEADCherry-pick
  • .git/REVERT_HEADRevert
  • None of the above → Stash (or manual conflict)
OperationDetectionContinueAbort
MergeMERGE_HEAD existsgit commitgit merge --abort
Rebaserebase-merge/ or rebase-apply/git rebase --continuegit rebase --abort
Cherry-pickCHERRY_PICK_HEAD existsgit cherry-pick --continuegit cherry-pick --abort
RevertREVERT_HEAD existsgit revert --continuegit revert --abort
StashNone of abovegit stash dropgit checkout --theirs. or git reset --hard

Step 2: List Conflicted Files

git diff --name-only --diff-filter=U

Then run git status to see the full conflict status for each file.

Conflict markers in git status:

  • UU - Both modified (most common)
  • AA - Both added
  • DD - Both deleted
  • AU/UA - Added by us/them, modified by other
  • DU/UD - Deleted by us/them, modified by other

Step 3: Analyze Each Conflict

Read the conflicted file and identify:

<<<<<<< HEAD (or ours)
Current branch changes
=======
Incoming changes
>>>>>>> branch-name (or theirs)

For rebase conflicts: "Ours" is the branch being rebased onto, "theirs" is the commit being replayed. This is inverted from merge!

Step 4: Apply Resolution

Edit the file to:

  1. Remove conflict markers (<<<<<<<, =======, >>>>>>>)
  2. Keep the correct code
  3. Ensure the result is syntactically valid

Step 5: Print Next Steps

Do NOT run git commands yourself. Print the commands the user needs to run:

Run these commands to complete the resolution:

git add <resolved-files>
<continue_command based on operation type>

Output Format

## Conflict Resolution: {MERGE|REBASE|CHERRY-PICK|REVERT}

### Situation
- Operation: {type}
- Current branch: {branch}
- Incoming: {branch/commit}

### Conflicted Files ({count})
| File | Type | Complexity |
|------|------|------------|
| {path} | UU | {simple/moderate/complex} |

### Next Steps

Run these commands to complete the resolution:
1. `git add {files}`
2. `{continue_command}`

Or to abort:
- `{abort_command}`

Examples

Merge conflict on auth logic -- merge both sides:

/resolve-conflicts src/auth/session.ts

Detects a merge operation, reads the conflict markers in the session file, and determines that both sides added complementary validation checks. Recommends merging both changes together and produces a clean resolution that includes both validations.

Rebase conflict with inverted ours/theirs:

/resolve-conflicts

Detects a rebase operation and reminds that ours/theirs semantics are inverted during rebase. Walks through each conflicted file, explains what the rebased commit intended versus the target branch state, resolves the conflicts in the files, and prints the commands to run (git add + git rebase --continue).

Guidelines

  • Understand both sides before resolving - don't blindly pick one
  • Check for semantic conflicts - code may compile but logic is broken
  • Review the full file - changes outside markers may be affected
  • Test after resolving - run tests if available
  • For rebase: remember ours/theirs are inverted from merge

Common Patterns

Lock File Conflicts (package-lock.json, yarn.lock)

Regenerate rather than manually resolve. Tell the user to run:

git checkout --theirs package-lock.json  # or --ours
npm install  # regenerates lock file
git add package-lock.json

Auto-generated Files

Accept one version and regenerate. Tell the user to run:

git checkout --theirs <file>
# Run generation command
git add <file>

Both Added Same File Differently

Usually keep one and incorporate changes from other manually.

Deleted vs Modified

Decide: should file exist or not? If yes, keep modified. If no, remove. Tell the user to run the appropriate command:

# Keep the file (accept modification)
git add <file>

# Delete the file
git rm <file>

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

38.05%
按下载量换算35

Claude

30.2%
按下载量换算28

Cursor

17.81%
按下载量换算16

Gemini CLI

9.27%
按下载量换算9

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills