End-to-end workflow for rebasing che-code against a specific VS Code release.
Install
mkdir -p .claude/skills/rebase && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/12207" && unzip -o skill.zip -d .claude/skills/rebase && rm skill.zipInstalls to .claude/skills/rebase
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Orchestrates a full upstream VS Code rebase for che-code. Updates version references, validates and fixes rebase rules against the new upstream, runs rebase.sh, handles remaining conflicts, and verifies the result. Use when asked to rebase, align with upstream, or update to a new VS Code release.Key capabilities
- →Validate the target VS Code release version
- →Manage git branches for the rebase process
- →Update upstream version references in rebase.sh
- →Run pre-rebase conflict analysis and audit dependency pins
- →Execute the rebase against upstream VS Code
How it works
The skill orchestrates the rebase of che-code against an upstream VS Code release by validating versions, managing branches, updating references, analyzing conflicts, and running the rebase script.
Inputs & outputs
When to use rebase
- →Rebase che-code
- →Align fork with new VS Code release
- →Validate rebase rules
About this skill
Rebase che-code Against Upstream VS Code
End-to-end workflow for rebasing the che-code fork against a new upstream VS Code release. This skill coordinates three other skills (validate-rebase-rules, fix-rebase-rules, test-rebase-rules) along with rebase.sh.
Input
The user provides the target VS Code release in one of three forms:
- Full branch name:
release/1.120— used as-is - Short version:
1.120— expanded torelease/1.120 - Issue URL:
https://github.com/eclipse-che/che/issues/23823— fetch the issue title/body viagh issue view -R eclipse-che/che <number>, extract the version (pattern:1.NNN.xor1.NNN), expand torelease/1.NNN
If the user provides an issue URL, store it for later use in the PR description ("What issues does this PR fix?" section).
If not provided, ask.
Version validation
All three input forms go through the same validation:
- Format check: the resolved value must match
release/1.NNN(e.g.release/1.120) - Greater-than check: read
CURRENT_UPSTREAM_VERSIONfromrebase.sh, parse numeric parts, the target must be strictly greater. For example, ifCURRENT_UPSTREAM_VERSION="release/1.116"and the user provides1.115, inform them: "Version 1.115 is not valid — the current upstream version is already release/1.116" - Upstream existence check: verify the branch exists:
git ls-remote upstream-code refs/heads/release/1.NNN
If all checks pass: proceed silently. If any check fails: inform user what went wrong and ask for the correct version.
Branch Management
After validating the target version:
- Read
target_remotefrom.claude/skills/rebase/rebase-config.yamland ensure it is configured as a git remote namedtarget(add it if not:git remote add target <url>) - Fetch the target remote's main:
git fetch target main - Check current branch:
git branch --show-current - If on
main: create and switch to a new branch based ontarget/main:
For example, targetgit checkout -b alignment-with-upstream-1-<version> target/mainrelease/1.120produces branchalignment-with-upstream-1-120. - If already on the matching
alignment-with-upstream-1-<version>branch: continue on it - If on any other branch (including a different
alignment-with-upstream-*):- If there are uncommitted changes (
git status --porcelain): warn the user and stop - If clean: create and switch to a new branch based on
target/main
- If there are uncommitted changes (
Prerequisites
git remote get-url upstream-code || git remote add upstream-code https://github.com/microsoft/vscode
git fetch upstream-code
Commit Strategy
Each logical step produces a separate commit following single responsibility. Every commit becomes a checkbox in the PR description. Conditional commits are only created when there is work to do.
- Update upstream version references —
rebase.sh(PREVIOUS_UPSTREAM_VERSION,CURRENT_UPSTREAM_VERSION) - Pre-rebase conflict analysis —
.rebase/<ver>/pre-rebase-report.md - Audit and update dependency pins (CVE fixes) —
.rebase/<ver>/dependency-audit.md+.rebase/add/,.rebase/override/,code/changes - Create rebase rules for uncovered files — new
.rebase/replace/+elifentries (conditional) - Fix and update rebase rules — fixed
.rebase/replace/+ missingelifentries (conditional) - Rebase against upstream — merge commit from
rebase.sh - Fix rebase errors — npm install / EOVERRIDE fixes (conditional)
- Fix compilation errors — code fixes (conditional)
- Update artifacts lock —
build/artifacts/artifacts.lock.yaml
Reports
All reports are written to .rebase/<version>/ (e.g. .rebase/1.120/). Create the directory at the start of the rebase:
mkdir -p .rebase/<version>
Reports generated during the process:
.rebase/<ver>/pre-rebase-report.md— conflict classification frompre-rebase.sh.rebase/<ver>/dependency-audit.md— dependency pin audit results.rebase/<ver>/rebase-errors.md— Phase 2 errors if unfixed (conditional).rebase/<ver>/compilation-errors.md— Phase 3 compilation errors if unfixed (conditional)
Phase 1 — Prepare
Step 1: Update version references in rebase.sh
Read rebase.sh and extract the current values:
PREVIOUS_UPSTREAM_VERSION— the version that was previously rebased toCURRENT_UPSTREAM_VERSION— the version for the current/next rebase
Update them:
# PREVIOUS_UPSTREAM_VERSION becomes what was CURRENT_UPSTREAM_VERSION
# CURRENT_UPSTREAM_VERSION becomes the new target
For example, if CURRENT was release/1.108 and the new target is release/1.120:
PREVIOUS_UPSTREAM_VERSION="release/1.108"
CURRENT_UPSTREAM_VERSION="release/1.120"
Commit: "Update upstream version references"
Step 2: Fetch the new upstream branch
git fetch upstream-code <target-version>
Step 3: Run pre-rebase validation
Run pre-rebase.sh to discover all conflicts and classify them:
bash pre-rebase.sh
This performs a trial subtree merge on a temp branch, classifies every conflicting file, and writes .rebase/<ver>/pre-rebase-report.md. The report starts with a raw list of all conflicting files, then categorizes them as:
- RULED — has
.rebase/rules and anelifentry inresolve_conflicts(). Ready. - LOCK —
package-lock.jsonfiles. Auto-handled by the genericresolve_package_lockfunction. - TAKE_THEIRS — no che-specific changes vs previous upstream. Safe to take upstream.
- MISSING_ELIF — has
.rebase/rules but noelifentry. The smart fallback handles these, but explicit entries are recommended. - NEEDS_RULE — che-specific changes exist but no
.rebase/rule covers them. These are handled in Step 4.
If pre-rebase.sh exits with code 1, there are NEEDS_RULE files — proceed to Step 4.
Commit: "Pre-rebase conflict analysis" (includes the report file)
Step 3b: Audit dependency pins
Audit all dependency version pins in .rebase/add/ and .rebase/override/ files against the new upstream. Follow the process in .claude/skills/dependency-rebase-rules/SKILL.md:
- Compare every pinned version against what upstream uses at the target release
- Classify each pin as ACTIVE, REDUNDANT, or OUTDATED
- Write the audit report to
.rebase/<ver>/dependency-audit.md - Apply recommended changes (remove redundant pins, move pins to override, update
code/files) - After removing redundant pins, verify lock file stability (
npm installshould produce no changes)
Do not stop for user confirmation — apply changes and document everything in the report for review in the PR.
Commit: "Audit and update dependency pins (CVE fixes)" (includes the report + all pin changes)
Step 4: Create missing rules (if NEEDS_RULE files exist)
For each NEEDS_RULE file in the pre-rebase report, use the fix-rebase-rules skill (read .claude/skills/fix-rebase-rules/SKILL.md), specifically its "Handling uncovered Che-specific changes" workflow:
- Read the che-code file to understand the che-specific modification
- Read the upstream file at
PREVIOUS_UPSTREAM_VERSIONto see the original code - Create a rule:
from= upstream snippet,by= che-modified version - For source files (.ts, .html, etc.) — creates
.rebase/replace/<path>.json - For JSON files (package.json) — creates
.rebase/add/and/or.rebase/override/rules - Also updates
rebase.shrouting — adds theelifentry
If rule creation fails for a file: check whether that file actually conflicts in the rebase (from the pre-rebase report conflict list). If it conflicts, this is a real blocker — stop for manual review. If it does not conflict, log as ERROR in the pre-rebase report and continue.
Commit (conditional): "Create rebase rules for uncovered files"
Step 5: Add missing elif entries (if MISSING_ELIF files exist)
For files that have .rebase/ rules but no elif entry in resolve_conflicts(), add the entry following the existing patterns.
Step 6: Validate existing rules against the NEW upstream
Run the validate-rebase-rules skill (read .claude/skills/validate-rebase-rules/SKILL.md). This produces rebase-rules-validation.md.
Key point: the validation now runs against the new CURRENT_UPSTREAM_VERSION, so it will catch all from values that changed between the old and new upstream.
Step 7: Fix stale rules
If the validation report has ERROR-level items, run the fix-rebase-rules skill (read .claude/skills/fix-rebase-rules/SKILL.md).
Common issues:
- Stale
fromvalues — upstream changed the code thatfromwas matching. The fix skill updatesfromto match the new upstream andbyto produce the current che-code result. - Missing rules — the "Uncovered Che-specific Changes" section lists code that would be lost. Create new rules for these.
If a fix fails for a file: same logic as Step 4 — if the file conflicts in the rebase, stop; if not, log as ERROR and continue.
Step 8: Test the fixed rules
Run the test-rebase-rules skill (or directly):
bash .claude/skills/test-rebase-rules/run-all-tests.sh
All tests must pass (or show only cosmetic warnings) before proceeding. If a test fails, re-fix the rule and re-test (retry loop). If repeated attempts fail, apply the same conflict/no-conflict logic from Steps 4 and 7.
Commit (conditional, covers Steps 5-8): "Fix and update rebase rules"
Phase 2 — Rebase
Step 9: Run the rebase
bash rebase.sh
Expected outcomes:
| Outcome | Action |
|---|---|
rebase operation done successfully | No conflicts. Skip to Phase 3. |
rebase successful after conflict solving | All conflicts auto-resolved by resolve_conflicts(). Skip to Phase 3. |
| Script aborts with an error | See Step 10. |
Step 10: Handle remaining conflicts (if any)
If rebase.sh failed, tr
Content truncated.
When not to use it
- →When the target VS Code version is older than the current upstream version
- →When there are uncommitted changes on a non-matching branch
Prerequisites
Limitations
- →The target version must be strictly greater than the current upstream version.
- →Large version jumps (>4 releases) may produce many stale rules.
- →The skill does not automatically fix all compilation errors or rebase errors, requiring conditional steps.
How it compares
This skill automates and coordinates a complex multi-step rebase process, including validation and conflict analysis, which is more efficient than manual execution.
Compared to similar skills
rebase side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| rebase (this skill) | 0 | 1mo | Review | Advanced |
| run-nx-generator | 5 | 3mo | Review | Intermediate |
| git-commit | 11 | 6mo | Review | Beginner |
| morph-search | 9 | 7mo | Review | Beginner |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
run-nx-generator
nrwl
Run Nx generators with prioritization for workspace-plugin generators. Use this when generating code, scaffolding new features, or automating repetitive tasks in the monorepo.
git-commit
github
Execute git commit with conventional commit message analysis, intelligent staging, and message generation. Use when user asks to commit changes, create a git commit, or mentions "/commit". Supports: (1) Auto-detecting type and scope from changes, (2) Generating conventional commit messages from diff, (3) Interactive commit with optional type/scope/description overrides, (4) Intelligent file staging for logical grouping
morph-search
parcadei
Fast codebase search via WarpGrep (20x faster than grep)
upgrading-expo
sickn33
Upgrade Expo SDK versions
continue-implementation
LibPDF-js
Continue implementing a spec from a previous session
fix-dependabot-prs
bannzai
dependabotから上がってきた複数のPRを一括で解決し、まとめPRを作成する。dependabotのPR対応を依頼された時に使用。