Agent skill

Hk Merge Resolve

by deepklarity in deepklarity/harness-kit

Resolve merge conflicts in the current branch. An agent skill from deepklarity/harness-kit.

MITAuto-check: notesDevelopment

Install Hk Merge Resolve

skills CLI
$ npx skills add deepklarity/harness-kit --skill hk-merge-resolve -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install deepklarity/harness-kit hk-merge-resolve --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/deepklarity/harness-kit.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/hk-merge-resolve .claude/skills/hk-merge-resolve && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
hk-merge-resolve
GitHub stars
100
Token cost
~2.2k tokens
SKILL.md length
1,101 words
Files
1
Skills in repo
18
Repo updated
First seen
Licence
MIT

At a glance

Resolve merge conflicts in the current branch. An agent skill from deepklarity/harness-kit.

  • Works in 4 steps: Diagnose the Situation → Build Context → Resolve Each Conflict → …
  • Explicitly runs /hk-merge-resolve
  • SKILL.md covers Step 0: Diagnose the Situation, Step 1: Build Context, Step 2: Resolve Each Conflict and Step 3: Verify — Close the Loop, plus 1 more section
  • Calls git, python and npm

What it does

Hk Merge Resolve is an agent skill from deepklarity/harness-kit. Resolve merge conflicts in the current branch. Only invoke when the user explicitly runs /hk-merge-resolve. Do NOT auto-trigger on mentions of merge conflicts, conflict markers, or similar keywords.

Its SKILL.md is about 2.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Git workflow. It works with Git. The repository describes itself as: A kit for building with AI agents and also the engineering patterns around it. The licence is MIT.

When your agent uses it

  • Explicitly runs /hk-merge-resolve
  • Mentions of merge conflicts
  • Conflict markers
  • Similar keywords

Example prompts

  • “/hk-merge-resolve”

Requirements

  • Python 3
  • Pre-approved tools (allowed-tools): Bash, Read, Edit, Grep, Glob, AskUserQuestion

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Diagnose the Situation
  2. Build Context
  3. Resolve Each Conflict
  4. Verify — Close the Loop

What it can do on your machine

Read from SKILL.md and the folder at commit 87305cd. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Bash
    • Read
    • Edit
    • Grep
    • Glob
    • AskUserQuestion

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git
    • python
    • npm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git and npm, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Hk Merge Resolve loads about 2.2k tokens when it runs. Until then it costs about 54 tokens; SKILL.md has 1,101 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~54
When it runs · the whole SKILL.md, loaded when a task matches
~2.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Bash, Read, Edit, Grep, Glob, AskUserQuestion

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from deepklarity/harness-kit at commit 87305cd, republished under its MIT licence (© deepklarity). 1,101 words, ~2,222 tokens.

Download SKILL.mdSave it as .claude/skills/hk-merge-resolve/SKILL.md (or your agent's skills folder).
name
hk-merge-resolve
description
Resolve merge conflicts in the current branch. Only invoke when the user explicitly runs /hk-merge-resolve. Do NOT auto-trigger on mentions of merge conflicts, conflict markers, or similar keywords.
allowed-tools
Bash, Read, Edit, Grep, Glob, AskUserQuestion

Resolve Merge Conflicts

Your job is to resolve all merge conflicts in the current branch of the current repo.

Conflicts can come from many sources — git merge, git rebase, git stash pop, git cherry-pick, or any operation that combines divergent changes. This skill handles all of them.

Step 0: Diagnose the Situation

Before changing anything, understand what state git is in and what caused the conflicts.

  1. Snapshot the state — Run these to understand what's happening:

    bash
    git status
    git rev-parse HEAD

    Print the HEAD sha to the user: "Safety checkpoint: HEAD is at <sha>."

  2. Identify the conflict source — Check which operation is in progress:

    • git rev-parse MERGE_HEAD 2>/dev/null → merge in progress
    • test -d .git/rebase-merge || test -d .git/rebase-apply → rebase in progress
    • git stash list + check git status for "Unmerged paths" without MERGE_HEAD → stash pop conflict

    This matters because the abort/recovery command differs:

    SourceAbort command
    mergegit merge --abort
    rebasegit rebase --abort
    cherry-pickgit cherry-pick --abort
    stash popgit checkout -- . (stash stays in list, nothing lost)

    Print the appropriate abort command to the user so they have an escape hatch.

  3. Protect unstashed work — If there are uncommitted changes beyond the conflicted files (tracked modified files that aren't part of the conflict), warn the user. These are at risk during resolution. Suggest committing or stashing them separately before proceeding, and wait for confirmation.

    Do NOT blindly git stash when conflicts are already present — git won't allow it, and if the conflicts came from a stash pop, the user's changes are already in the working tree as the conflicted content. Stashing again would lose them.

Step 1: Build Context

Understand what both sides of the conflict were trying to do:

  1. Identify the two sides — Based on the conflict source:

    • Merge: "ours" = current branch, "theirs" = the branch being merged in
    • Stash pop: "ours" = current working tree (post-pull), "theirs" = the stashed changes (the user's local work)
    • Rebase: "ours" = the branch being rebased onto, "theirs" = the commits being replayed

    Understanding which side is which is critical — especially for stash pop conflicts where "theirs" is the user's own work and should generally be preserved.

  2. Find all conflicts — Use Grep to search for <<<<<<< across the repo. This gives you the full list of files and locations.

  3. Triage — Group conflicts before diving in:

    • Trivial: Lock files, auto-generated files, whitespace-only — resolve mechanically.
    • Straightforward: Both sides changed different things in the same region — combine them.
    • Requires judgment: Both sides changed the same logic — need to understand intent.

Step 2: Resolve Each Conflict

For each conflicted file, read the file (or at minimum the conflicted region with surrounding context), then decide:

  1. Keep ours — when the incoming changes are superseded
  2. Keep theirs — when the incoming side has the better version
  3. Combine both — the most common case; merge both sides' intent into correct code

For stash pop conflicts: The user's stashed changes are their in-progress work. Default to preserving the user's intent — their local changes are the "important" side. The pulled/merged content is the "environment" that the user's work needs to be adapted to.

Correctness matters more than cleverness. When combining:

  • Understand what each side was trying to do
  • Write the result that achieves both goals
  • Make sure imports, variable names, and types are consistent across the merged result

For each conflict:

  1. Read the file to see the full conflict region with context
  2. Edit the file to the desired final state — remove ALL conflict markers (<<<<<<<, =======, >>>>>>>)
  3. Stage the resolved file with git add <file>

After resolving all conflicts in a file, do a quick sanity check: does the file still make sense? Are imports consistent? Are there dangling references?

Step 3: Verify — Close the Loop

After all conflicts are resolved, verification is mandatory, not optional. A merge that compiles is not a merge that works.

3a. Confirm clean state
bash
git diff --check          # No conflict markers remain
grep -rn '<<<<<<<' .      # Belt-and-suspenders: grep for stray markers

If either finds markers, go back and fix them before proceeding.

Show full SKILL.md (459 more words)Show less
3b. Determine affected projects

Check which parts of the monorepo were touched by the merge. Run:

bash
# For merge: diff between merge base and current state
git diff --name-only $(git merge-base HEAD MERGE_HEAD) HEAD 2>/dev/null || \
  git diff --name-only HEAD~1 HEAD  # fallback for rebase/cherry-pick

Map changed files to projects:

Path prefixProjectCheck commands
taskit/taskit-frontend/Frontendnpm run build (TypeScript + Vite), npm run lint
taskit/taskit-backend/Backend`cd taskit/taskit-backend && python manage.py check --deploy 2>/dev/null
odin/Odincd odin && python -m pytest tests/unit/ -v
harness_usage_status/Harness Usagecd harness_usage_status && python -m pytest tests/ -v 2>/dev/null
3c. Run check commands for affected projects

Run only the checks for projects that had conflicted files or files changed by the merge. Do not run checks for unaffected projects — that wastes time and may surface pre-existing issues unrelated to the merge.

Execution order:

  1. Type checks / build first — catches structural problems (missing imports, type errors, broken references). These are the most likely merge casualties.
  2. Lint second — catches style issues introduced by conflict resolution.
  3. Fast tests last — unit tests for the affected project. Skip integration/e2e tests (too slow for merge verification; those belong in CI).

For each check:

  • Run the command
  • If it passes: note it and move on
  • If it fails: analyze the failure. If it's clearly caused by the merge resolution (missing import, type mismatch, duplicated declaration), fix it immediately and re-run. If it's a pre-existing failure unrelated to the merge, note it for the user but don't block on it.

Frontend-specific (most common merge casualty in this repo):

bash
cd taskit/taskit-frontend && npm run build

This runs TypeScript type-checking AND Vite bundling — it catches duplicate imports, missing exports, type mismatches, and broken references. This single command is the highest-value check for frontend merges.

Backend-specific:

bash
cd taskit/taskit-backend && python manage.py check

Catches model inconsistencies, migration conflicts, and configuration problems.

Odin-specific:

bash
cd odin && python -m pytest tests/unit/ -v --tb=short

Fast unit tests only. Mock and integration tests are too slow for merge verification.

3d. Report results

After all checks complete, print a summary:

Merge verification:
  ✓ No conflict markers remaining
  ✓ Frontend build passed (TypeScript + Vite)
  ✓ Frontend lint passed
  ✗ Backend check failed — missing migration (see output above)
  — Odin tests skipped (no odin/ files in merge)

If any check failed due to the merge, fix it before completing the merge operation (git merge --continue, git rebase --continue, etc.). Do NOT finalize a merge with known check failures — that defeats the purpose of conflict resolution.

3e. Complete the merge operation

Only after all checks pass (or pre-existing failures are identified and noted):

  • Merge: git commit (git usually has the merge commit staged already)
  • Rebase: git rebase --continue
  • Cherry-pick: git cherry-pick --continue
  • Stash pop: No git command needed — files are already in working tree

Ask the user before running the finalization command.

When You're Not Sure

If a conflict involves complex logic where both sides made substantial changes to the same code, and you're not confident about the correct resolution — stop and ask.

Show the user:

  1. The conflicting chunks (both sides)
  2. Your understanding of what each side intended
  3. Your proposed resolution (or the options you see)

Then wait for confirmation before editing. A wrong merge is worse than a slow merge.

© deepklarity, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/hk-merge-resolve of deepklarity/harness-kit.

Open the folder on GitHubat commit 87305cd

Compare with similar skills

Hk Merge Resolve next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Hk Merge Resolve compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Hk Merge Resolve this skilldeepklarity/harness-kit100—~2.2kAutomated safety check: NotesMIT
Finishing a Development Branchobra/superpowers297k5 repos~1.9kAutomated safety check: PassMIT
Contributor-First PR MergeHKUDS/OpenHarness16k1 repos~847Automated safety check: PassMIT
Migrate Internal Package into GhostTryGhost/Ghost56k—~3.8kAutomated safety check: PassMIT
Create Pull Requestcline/cline70k1 repos~1.6kAutomated safety check: PassApache-2.0
Git Merge Conflict Resolvertailcallhq/forgecode7.6k1 repos~4.5kAutomated safety check: PassApache-2.0

Similar skills

  • Walks the last step of a branch: confirm tests pass, detect the git environment, ask how to integrate, carry out your choice and clean up the worktree.

    297k GitHub starsUsed in 5 repos~1.9k tokens
    DevelopmentAuto-check passed
  • Merges external GitHub pull requests while keeping the original author credited, and fixes conflicts after the merge instead of rewriting the contribution.

    16k GitHub starsUsed in 1 repo~847 tokens
    DevelopmentAuto-check passed
  • Moves a package from another TryGhost repository into Ghost as an internal workspace package while keeping its Git history, with checkpoints for the steps that need an administrator.

    56k GitHub stars~3.8k tokensUpdated today
    DevelopmentAuto-check passed
  • Opens a GitHub pull request from your current branch with the gh CLI, after reviewing the commits and diff and gathering the details the PR needs.

    70k GitHub starsUsed in 1 repo~1.6k tokens
    DevelopmentAuto-check passed
  • Git Merge Conflict Resolver

    tailcallhq/forgecode

    Resolves Git merge conflicts with a plan-first workflow that keeps both sides' intent, regenerates lock files and backs up deleted-but-modified files.

    7.6k GitHub starsUsed in 1 repo~4.5k tokens
    DevelopmentAuto-check passed
  • Git Branch Naming

    makeplane/plane

    Names a new Git branch with a type prefix, the lowercased work item ID and a short kebab-case description, so the ID can be extracted later from the branch name.

    61k GitHub stars~594 tokensUpdated 2 days ago
    DevelopmentAuto-check passed

More from deepklarity/harness-kit

All 18 skills in this repo
  • Hk Skill Creator

    deepklarity/harness-kit

    Create new skills, modify and improve existing skills, and measure skill performance.

    100 GitHub stars~3.2k tokensUpdated 2 mo ago
    Auto-check: notes
  • Hk Arch Audit

    deepklarity/harness-kit

    Run comprehensive agent-native architecture review with scored principles.

    100 GitHub stars~1.1k tokensUpdated 2 mo ago
    Auto-check: notes
  • Hk Mock First

    deepklarity/harness-kit

    Mock-first, layer-by-layer feature development. An agent skill from deepklarity/harness-kit.

    100 GitHub stars~3.9k tokensUpdated 2 mo ago
    Auto-check: notes
  • Hk Autonomy Audit

    deepklarity/harness-kit

    Audit whether an AI agent can autonomously close the loop on problems in a given area — from discovering a symptom to verifying a fix — without human intervention.

    100 GitHub stars~2.5k tokensUpdated 2 mo ago
    Auto-check: notes
  • Hk Breadcrumb Creator

    deepklarity/harness-kit

    Traces a workflow end-to-end through the harness-kit monorepo and creates a breadcrumb analysis doc in docs/breadcrumbanalysis/.

    100 GitHub stars~3k tokensUpdated 2 mo ago
    Auto-check: notes
  • Hk Changelog

    deepklarity/harness-kit

    Generate changelog entries from git diffs, prepend to CHANGELOG.md, and optionally commit + PR.

    100 GitHub stars~1.6k tokensUpdated 2 mo ago
    Auto-check: notes

Works with

Categories

Questions about Hk Merge Resolve

What does Hk Merge Resolve do?

Resolve merge conflicts in the current branch. An agent skill from deepklarity/harness-kit. Hk Merge Resolve is an agent skill from deepklarity/harness-kit. Resolve merge conflicts in the current branch.

When should I use Hk Merge Resolve?

Hk Merge Resolve fits situations like: explicitly runs /hk-merge-resolve; mentions of merge conflicts; conflict markers; similar keywords.

How do I install Hk Merge Resolve in Claude Code?

Run `npx skills add deepklarity/harness-kit --skill hk-merge-resolve -a claude-code`. Or copy the skill folder (.claude/skills/hk-merge-resolve in deepklarity/harness-kit) into .claude/skills/hk-merge-resolve in your project. Claude Code loads it when a task matches its description.

How do I install Hk Merge Resolve in Codex?

Run `npx skills add deepklarity/harness-kit --skill hk-merge-resolve -a codex`. Or copy the skill folder (.claude/skills/hk-merge-resolve in deepklarity/harness-kit) into .agents/skills/hk-merge-resolve in your project. Codex loads it when a task matches its description.

Can I use Hk Merge Resolve in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add deepklarity/harness-kit --skill hk-merge-resolve -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/hk-merge-resolve, .gemini/skills/hk-merge-resolve, .github/skills/hk-merge-resolve and .opencode/skills/hk-merge-resolve in your project.

What does Hk Merge Resolve need to run?

Going by SKILL.md and its folder, Hk Merge Resolve needs the command-line tools its instructions call (git, python and npm). Our summary lists: Python 3. Its frontmatter pre-approves these tools: Bash, Read, Edit, Grep, Glob, AskUserQuestion.

Does Hk Merge Resolve access the network?

SKILL.md contains no URLs. Its commands use git and npm, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Hk Merge Resolve safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Hk Merge Resolve use?

Hk Merge Resolve is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Hk Merge Resolve use?

About 2.2k tokens (SKILL.md is roughly 8.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Hk Merge Resolve?

Skills that share tags, products or a category with Hk Merge Resolve: Finishing a Development Branch (obra/superpowers, 297k stars), Contributor-First PR Merge (HKUDS/OpenHarness, 16k stars), Migrate Internal Package into Ghost (TryGhost/Ghost, 56k stars) and Create Pull Request (cline/cline, 70k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Hk Merge Resolve?

deepklarity (a GitHub organization) maintains it in deepklarity/harness-kit, which has 100 GitHub stars. The repository holds 18 skills in this directory. The repository was last updated on July 15, 2026.

Source: deepklarity/harness-kit on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.