CtrlK
BlogDocsLog inGet started
Tessl Logo

custom-rebase

Rebases Fusion Framework feature branches onto main and handles monorepo conflict traps. USE FOR: rebase this branch, refresh branch from main, fix pnpm-lock.yaml conflicts, resolve Version Packages conflicts, generate a rebase risk report. DO NOT USE FOR: dependency PR review, branch cleanup unrelated to rebase, or destructive reset without explicit approval.

84

1.02x
Quality

96%

Does it follow best practices?

Impact

98%

1.02x

Average score across 1 eval scenario

SecuritybySnyk

Passed

No findings from the security scan

SKILL.md
Quality
Evals
Security

Custom Rebase

When To Use

Use for Fusion Framework branch refreshes where the agent must rebase onto origin/main, resolve common monorepo conflicts, and sanity-check the result before force-pushing.

Trigger phrases:

  • "rebase this branch onto main"
  • "refresh my branch"
  • "fix rebase conflicts"
  • "handle pnpm-lock.yaml conflicts"
  • "generate a rebase report"

Required Gates

  • Confirm the current branch and repository root before starting.
  • Stop if the working tree is dirty unless the user explicitly says those changes are expected.
  • Use pnpm only.
  • Never run git reset --hard, git rebase --abort, git rebase --skip, or git push --force-with-lease without making the action and target branch explicit.
  • Prefer origin/main as the rebase target unless the user gives another base.

Workflow

  1. Prepare:
git status
git branch --show-current
git fetch origin
git fetch origin main:refs/remotes/origin/main
  1. Rebase:
git rebase origin/main
  1. Resolve known conflicts:
ConflictAction
pnpm-lock.yamlRegenerate with pnpm install, then git add pnpm-lock.yaml
Version Packages package.jsonKeep main with git checkout --ours "packages/*/package.json", then stage
Version Packages CHANGELOG.mdKeep main with git checkout --ours "packages/*/CHANGELOG.md", then stage
Source filesResolve manually, preserve user intent, stage resolved files

Then continue:

git rebase --continue
  1. If .changeset/pre.json exists, align pre-release baselines:
node .agents/skills/custom-rebase/scripts/align-pre-initial-versions.cjs
  1. Check the local result against the remote branch:
BRANCH=$(git rev-parse --abbrev-ref HEAD)
git fetch origin
git diff --stat origin/$BRANCH...HEAD
git diff --name-only origin/$BRANCH...HEAD | sort
git log --oneline --left-right --cherry --no-merges origin/$BRANCH...HEAD
git push --force-with-lease --dry-run origin $BRANCH
  1. Generate the raw report when risk or size warrants it:
node .agents/skills/custom-rebase/scripts/generate-rebase-report.cjs --no-fetch

Read the latest .tmp/skills/custom-rebase/*-rebase-report.md and summarize only the decision-relevant parts: largest diffs, dependency changes, package scope, pre.json changes, lockfile churn, validation to run, and push recommendation.

Troubleshooting

SymptomResponse
Rebase is going the wrong wayStop and verify current branch plus git rebase origin/main direction
pnpm install failsCheck repo root, conflicted package.json syntax, and unstaged package manifest changes
Local branch diverged unexpectedlyExplain the divergence and ask before any reset
Conflict repeats commit after commitResolve the recurring pattern once, continue, and re-check after completion

Expected Output

  • Rebased branch or clear blocker
  • Conflict decisions made explicit
  • Remote comparison before push
  • Human-readable risk summary when a report was generated
  • Suggested validation commands before the user or agent pushes

Related Skills

  • fusion-dependency-review for dependency PR analysis
  • custom-dependency-pr-solver for Dependabot batch processing
Repository
equinor/fusion-framework
Last updated
First committed

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.