agentleFS
samwelmungasamwelmunga/jenga-npm/.agents/skills/j-reconcile-origin/SKILL.md

j.reconcile-origin

Skill0 starsChanged 23 days agoApache-2.0View on GitHub

Sync the current (or specified) branch with origin by rebasing local commits on top of the latest upstream state.

The file

Show its rules and text

We split this skill into the rules it gives an agent

14 rules. About 0 are common, 5 are distinctive, and 9 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 9

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use this skill to rebase local work on top of the latest origin/<branch> state without re-implementing git logic inline.

    line 23
  2. Distinctive:

    If the user passed an argument, use that branch name.

    line 28
  3. Distinctive:

    Do not run any inline git commands in this skill — all git work is handled by the script.

    line 32
  4. Very specific:

    If remote_exists is true, present options in this format:

    line 40
  5. Very specific:

    Create a local tracking branch for <branch> and continue /reconcile-origin

    line 43
  6. Very specific:

    If the user chooses option 1, invoke .agents/skills/j-reconcile-origin/scripts/reconcile-origin.sh <branch> --create-tracking.

    line 47
  7. Very specific:

    If remote_exists is false, explain that neither a local branch nor origin/<branch> was found and stop.

    line 48
  8. Distinctive:

    Keep the local intent, then re-apply the essential upstream change manually

    line 60
  9. Very specific:

    If the user chooses “Handle it later”, invoke .agents/skills/j-reconcile-origin/scripts/reconcile-origin.sh <branch> --handle-later <file> …

    line 64
  10. Very specific:

    If code indicates branch_not_found_on_origin, explain that the remote branch could not be fetched.

    line 70
  11. Very specific:

    If code indicates uncommitted_changes, remind the user to stash or commit first.

    line 71
  12. Distinctive:

    When presenting a conflict rapport, make the incompatibility explicit.

    line 73
  13. Very specific:

    All git work must go through .agents/skills/j-reconcile-origin/scripts/reconcile-origin.sh.

    line 80
  14. Distinctive:

    Do not inline fetch, checkout, pull, merge, rebase, or status commands in this skill body.

    line 81

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Reconcile Origin

skills/j-reconcile-origin/ is the canonical, hand-edited directory for this skill, per CLAUDE.md's "The Canonical Naming Contract" (the E50 reopening of 2026-09-09, which promoted skills/j-reconcile-origin/ from generated twin to sole canonical form). The j- prefix is there for collision safety — a real directory under a distinct name, so a host tool shipping its own same-named built-in command cannot shadow it (Claude Code's native skill resolution is a literal-string, directory-name-based match; see project/documentation/skill-authoring.md's "Invocation Convention").

⚠️ scripts/generate-j-alias.sh was retired by E50_S14 and no longer exists — there is nothing to run. This file was previously generated from a bare skills/reconcile-origin/SKILL.md source; E50_S15 deleted that directory. This file is now the sole canonical, hand-edited source for this skill — edit it directly.

Use this skill to rebase local work on top of the latest origin/<branch> state without re-implementing git logic inline.

Instructions

  1. Determine the target branch:
    • If the user passed an argument, use that branch name.
    • Otherwise, use the current branch name.
  2. Invoke .agents/skills/j-reconcile-origin/scripts/reconcile-origin.sh [<branch>] and capture stdout.
    • Do not run any inline git commands in this skill — all git work is handled by the script.
    • The script handles dirty-worktree detection internally and returns {"status":"error","code":"uncommitted_changes",...} if the working tree is not clean.
  3. Parse the script's JSON response and react by status:
    • ok
      • Report success.
      • Include the branch name and rebased_commits count.
    • local_branch_missing
      • If remote_exists is true, present options in this format:

        What would you like to do?

        1. Create a local tracking branch for <branch> and continue /reconcile-origin
        2. Cancel and inspect the branch setup manually
        3. Other (describe below)
      • If the user chooses option 1, invoke .agents/skills/j-reconcile-origin/scripts/reconcile-origin.sh <branch> --create-tracking.
      • If remote_exists is false, explain that neither a local branch nor origin/<branch> was found and stop.
    • conflict
      • Present one structured conflict rapport per item in conflicts.
      • For each conflict include:
        • File path
        • The description
        • local_section
        • origin_section
      • Then present options in this format:

        What would you like to do?

        1. Resolve the conflict now by merging both sides carefully
        2. Keep the local intent, then re-apply the essential upstream change manually
        3. Handle it later — leave annotated conflict markers in the file and continue the scripted flow
        4. Other (describe below)
      • If the user chooses “Handle it later”, invoke .agents/skills/j-reconcile-origin/scripts/reconcile-origin.sh <branch> --handle-later <file> for the selected conflict file.
    • handled_later
      • Confirm that the selected file was annotated for later resolution.
      • Tell the user the conflict markers were intentionally preserved with a # RECONCILE-ORIGIN CONFLICT: note.
    • error
      • Report the script's message clearly.
      • If code indicates branch_not_found_on_origin, explain that the remote branch could not be fetched.
      • If code indicates uncommitted_changes, remind the user to stash or commit first.
  4. When presenting a conflict rapport, make the incompatibility explicit.
    • Explain what the local section is trying to preserve.
    • Explain what the origin section changed upstream.
    • Recommend at least two concrete resolution paths before offering “Handle it later” as the final actionable option.

Guard Rails

  • All git work must go through .agents/skills/j-reconcile-origin/scripts/reconcile-origin.sh.
  • Do not inline fetch, checkout, pull, merge, rebase, or status commands in this skill body.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.