This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
IMPORTANT: When you receive a GitHub issue reference, a URL, or a direct prompt, you MUST follow this procedure BEFORE doing anything else. Do NOT explore the repository, analyze code, or take any other action until you have completed steps 1-4.
- If the input is a GitHub issue URL, fetch the issue details (title, body) using
gh issue view <URL>. Otherwise, use the prompt text directly. - Match the issue title or prompt text against the routing table below.
- If a skill matches, read that skill file and follow its instructions exactly as written. Do not skip steps or improvise alternatives.
- If no skill matches, report: "No matching skill for this input: <title or prompt>" and exit with a non-zero code.
| Input pattern | Skill file |
|---|---|
| "Alignment Che-Code with" | .claude/skills/rebase/SKILL.md |
| "add-rebase-rules" | .claude/skills/add-rebase-rules/SKILL.md |
che-code is Eclipse Che's fork of Microsoft's VS Code (Code-OSS) that runs in a browser, connecting to a remote HTTP(s) server on Kubernetes instead of desktop mode. The terminal is container-aware: it can open shells in any container of the running pod.
Upstream VS Code is stored as a Git subtree in the code/ directory. The repository is self-contained (no submodule setup needed).
npm install # Install deps + download built-in extensions (runs in code/)
npm run watch # Compile and watch for changes
npm run server # Run VS Code server at localhost:8000 (dev mode)npm run build # Build vscode-reh-web-linux-x64 (unminified)
npm run build:min # Build vscode-reh-web-linux-x64 (minified)
npm run rebuild-native-modules # Rebuild native Node modulespodman build -f build/dockerfiles/linux-musl.Dockerfile -t linux-musl .
podman build -f build/dockerfiles/linux-libc-ubi8.Dockerfile -t linux-libc-ubi8 .
podman build -f build/dockerfiles/linux-libc-ubi9.Dockerfile -t linux-libc-ubi9 .
podman build -f build/dockerfiles/assembly.Dockerfile -t che-code .podman run --rm -it -p 3100:3100 -e CODE_HOST=0.0.0.0 quay.io/che-incubator/che-code:nextcd code
npm run test-node # Mocha unit tests (Node.js)
npm run test-browser # Browser unit tests (Playwright)
npm run test-extension # Extension tests (vscode-test)
npm run smoketest # Full smoke test suitecd code
node build/eslint # ESLint
node build/stylelint # Stylelint
npm run hygiene # Full hygiene check (formatting, imports, layers)
npm run valid-layers-check # Architecture layer validationcd launcher
npm run compile # TypeScript compile
npm run lint # ESLint
npm run format # Prettier check
npm run format:fix # Prettier auto-fix
npm run build # Full build (format + compile + lint + test)Launcher uses Jest for testing, TypeScript 5.6+, and ES2022 modules.
npm --prefix code/extensions/che-api run license:generateReplace che-api with any Che extension name. Generates dependency reports in .deps/.
code/— VS Code upstream (git subtree) with Che modifications. This is where the bulk of the editor source lives (code/src/vs/,code/extensions/).launcher/— Standalone TypeScript project that configures and launches VS Code in Kubernetes. Handles workspace config, product.json generation, Open VSX registry integration, SSL certificates, and Kubernetes API interaction.build/dockerfiles/— Multi-stage Dockerfiles for three platform targets (musl/Alpine, libc-ubi8, libc-ubi9) plus an assembly Dockerfile that combines them.build/scripts/— Container entrypoint scripts (entrypoint.sh,entrypoint-volume.sh,entrypoint-init-container.sh).build/artifacts/—artifacts.lock.yamllocks built-in extension versions with SHA256 checksums. Regenerate with./build/artifacts/generate.sh.branding/— UI branding customization (icons, product.json overrides, CSS). Applied viabranding/branding.sh..rebase/— Patch management for upstream rebasing:add/— Files to add to upstreamoverride/— JSON files to merge over upstream (via jq)replace/— Per-file JSON replacement rules keyed by file path (not full file swaps). Each entry is a JSON object withfromandbystrings applied to the specified file path.
Nine extensions provide Kubernetes/Che integration:
che-api— API for Che platform integrationche-activity-tracker— User activity trackingche-commands— Custom command supportche-github-authentication— GitHub OAuth flowche-port— Port exposure management for podsche-remote— Remote workspace status indicatorche-resource-monitor— Resource usage monitoringche-terminal— Container-aware terminal (open shells in any pod container)che-telemetry— Telemetry collection
code/src/server-main.ts— VS Code remote server entry pointcode/src/vs/— Core VS Code modules (layered architecture enforced byvalid-layers-check)launcher/src/entrypoint.ts— Launcher entry point for Kubernetes environmentslauncher/src/vscode-launcher.ts— VS Code process management
To rebase on upstream VS Code:
git remote add upstream-code https://github.com/microsoft/vscode(if not already added)git fetch upstream-code release/<version>— fetch the release branch thatrebase.shtargets (checkUPSTREAM_VERSIONinrebase.shfor the current ref, e.g.upstream-code/release/1.104)./rebase.sh— Pulls subtree, applies.rebase/patches, updates JSON overrides- Fix any conflicts
./build/artifacts/generate.shto updateartifacts.lock.yaml
The code/ directory uses Gulp as its build system. Key gulp tasks:
vscode-reh-web-linux-x64/vscode-reh-web-linux-x64-min— Build the remote web hostwatch-client/watch-extensions— Watch mode (both run in parallel vianpm run watch)compile-build-with-mangling— Production compilation with name mangling
Node.js version must match what upstream VS Code requires (check code/remote/.npmrc for the target property).
The final image is assembled from three platform-specific builds:
- linux-musl — Alpine Linux (musl libc)
- linux-libc-ubi8 — Red Hat UBI 8
- linux-libc-ubi9 — Red Hat UBI 9
The assembly.Dockerfile combines all three into a single image that selects the right binary at runtime.
Settings used by automated skills (.claude/skills/):
- PR target repository:
RomanNikitenko/che-code - Git identity: name
che-code-rebase-bot, emailche-code-rebase-bot@noreply