Catalog
fairoosansar-coder/resolve-refcache-conflicts

fairoosansar-coder

resolve-refcache-conflicts

Skill for resolving static/refcache.json merge or rebase conflicts in the current branch or a specified PR.

v1.0LATEST
NewUpdated Oct 29, 2026

static/refcache.json is an auto-generated file. Resolving conflicts requires first taking the integration branch's side, finishing the merge/rebase, then running npm run fix:refcache to restore any URLs unique to the active branch.

Prerequisites

If the current branch has a merge or rebase in progress, then skip the rest of this section and jump to Preparation.

The current branch must be clean (git status --short). If not clean, offer to run git stash or git commit to clean it up, or stop.

If $ARGUMENTS is a PR number, then check out the PR branch with: gh pr checkout $ARGUMENTS.

Preparation

At this point, we are ready to resolve the conflicts in the active branch:

  1. Determine the integration reference ($BASE_BRANCH) and fetch it:

    • If an upstream remote exists: git fetch upstream, use upstream/main.
    • Otherwise: git fetch origin, use origin/main.
  2. If merge or rebase is in progress (git status), skip this step. Otherwise, ask the user whether to run git merge $BASE_BRANCH or git rebase $BASE_BRANCH, then run it.

  3. If there are no conflicts: stop, we are done.

  4. Conflicts other than static/refcache.json: resolve them with the user.

  5. If no static/refcache.json conflict remains: stop, we are done. Otherwise, proceed to Resolve.

Resolve

  1. Check out the $BASE_BRANCH version of static/refcache.json. Assumes the active branch is being rebased/merged from $BASE_BRANCH, not the other way around:

    Operation Command
    Rebase of active branch onto $BASE_BRANCH git checkout --ours static/refcache.json
    Merge of $BASE_BRANCH into active branch git checkout --theirs static/refcache.json
  2. Stage the resolved files, then continue:

    • Rebase: git add static/refcache.json && git rebase --continue
    • Merge: git add static/refcache.json && git commit --no-edit
    • If other files were resolved in Preparation step 4, git add those too before continuing.
  3. Rebase only: for each subsequent rebase stop that conflicts on static/refcache.json, repeat Resolve steps 1–2. If other paths are also conflicted on that stop, run Preparation step 4 first.

  4. Run npm run fix:refcache once, after the entire rebase/merge completes. Note: this runs a full Hugo build and link check — requires network, installed npm dependencies, and populated submodules; can take several minutes.

  5. Commit the changes, if any:

    git add static/refcache.json
    git diff --cached --quiet static/refcache.json || \
       git commit -m "Refresh refcache after resolving conflicts"
    
  6. Push:

    • Merge: git push
    • Rebase: git push --force-with-lease

Overall Score

84/100

Grade

B

Good

Grades are signals, not a certification. Always review a skill yourself before use.

Safety

86

Quality

85

Clarity

84

Completeness

80

Summary

This skill guides an agent through resolving merge or rebase conflicts in a static/refcache.json file, which is auto-generated by a build process. The skill handles PR checkout, conflict detection, branch synchronization, and post-resolution build/commit workflows. It combines git operations with npm build execution and push commands.

Detected Capabilities

git operation (fetch, checkout, merge, rebase, add, commit, push)npm command execution (npm run fix:refcache)file read (git status, conflict detection)interactive user input (merge vs rebase choice, conflict resolution guidance)conditional branching based on merge/rebase state

Trigger Keywords

Phrases that agents use to match this skill to user intent.

resolve refcache conflictsfix merge refcacherebase refcache.jsonpr refcache conflictmerge conflict resolution

Risk Signals

INFO

git push --force-with-lease after rebase

Resolve step 6
INFO

Runs npm run fix:refcache which performs full Hugo build and network requests

Resolve step 4
INFO

Checks out PR branch via gh pr checkout $ARGUMENTS

Prerequisites, PR number section
INFO

Fetches and rebases/merges from upstream or origin main

Preparation step 1-2

Use Cases

  • Resolve refcache conflicts during merge/rebase on active branch
  • Resolve refcache conflicts in a pull request by PR number
  • Refresh refcache after resolving conflicts in local or PR branch
  • Handle mixed conflicts (refcache + other files) during rebase/merge
  • Automatically reconcile refcache URLs with integration branch after conflict resolution

Quality Notes

  • Clear scoped purpose: resolving conflicts in a single auto-generated file
  • Well-structured flow with three main phases (Prerequisites, Preparation, Resolve)
  • Explicit conditional logic for different scenarios (merge vs rebase, PR vs local branch)
  • Includes precise git commands in table format for conflict resolution context
  • Documents long-running operation (npm run fix:refcache requires network, dependencies, submodules)
  • Error handling: instructs agent to stop if conflicts cannot be resolved or prerequisites unmet
  • Distinguishes between rebase and merge contexts with different checkout strategies
  • Addresses edge case of multiple conflicts during rebase by looping through stops
  • Precondition checking (clean working tree, integration branch fetch) prevents corruption
  • Final commit logic uses git diff to avoid empty commits
Model: claude-haiku-4-5-20251001Analyzed: Oct 29, 2026

Reviews

Add this skill to your library to leave a review.

No reviews yet

Be the first to share your experience.

Use fairoosansar-coder/resolve-refcache-conflicts in your dev environment

Command Palette

Search for a command to run...