plugins/lt-dev/skills/rebasing-branches/SKILL.md
Guides rebase workflows for updating feature branches onto the current development branch (dev/develop). Handles conflict resolution with priority ordering, extracts Linear ticket context from branch names for smarter conflict decisions, performs post-rebase optimization, and uses force-push-with-lease for safety. Activates when user mentions "rebase", "branch aktualisieren", "dev stand", "feature branch updaten", "merge conflicts", "rebase MRs", "force push", or "git rebase". NOT for merge request descriptions (use git:mr-description). NOT for general git operations.
npx skillsauth add lennetech/claude-code rebasing-branchesInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill provides knowledge and strategy for rebasing feature branches onto a development branch. For automated execution, use the lt-dev:branch-rebaser agent via /lt-dev:git:rebase or /lt-dev:git:rebase-mrs.
--force silently overwrites teammate pushes — always --force-with-lease — If a teammate pushed to the same remote branch while you were rebasing locally, plain --force overwrites their commits without any warning. --force-with-lease refuses the push if the remote has moved. There is no valid reason to use --force on a shared branch.pnpm-lock.yaml or package-lock.json conflicts, resolving in favor of the dev-branch version without running pnpm install afterwards leaves the lockfile describing packages that aren't actually in node_modules. Always: resolve → install → verify pnpm run build before continuing.git rebase --abort works only if you haven't started a commit — Once you git add the resolved conflict files, --abort still works. After git rebase --continue has moved past the conflict commit, you need git reset --hard ORIG_HEAD to recover, which DOES require the original ref. ORIG_HEAD is auto-set by rebase start — safe to rely on.feat/dev-1628-abc-xyz contains the Linear ID. The rebaser agent uses this to pull ticket context for smarter conflict decisions. Branches without a ticket ID get generic treatment — prefer feat/dev-XXXX-... naming for rebaseable branches.| User Intent | Correct Skill | |------------|---------------| | "Rebase my branch onto dev" | THIS SKILL | | "Rebase all open MRs" | THIS SKILL | | "Branch aktualisieren" | THIS SKILL | | "Merge conflicts lösen" | THIS SKILL | | "Create MR description" | git:mr-description | | "Generate commit message" | git:commit-message | | "Update nest-server" | nest-server-updating | | "npm audit fix" | maintaining-npm-packages |
| Element | Purpose |
|---------|---------|
| Agent: lt-dev:branch-rebaser | Autonomous rebase execution |
| Command: /lt-dev:git:rebase | Single branch rebase |
| Command: /lt-dev:git:rebase-mrs | Batch rebase for MRs/PRs |
| Command: /lt-dev:review | Code review after rebase |
| Skill: generating-nest-servers | Backend code patterns |
| Skill: developing-lt-frontend | Frontend code patterns |
| Skill: coordinating-agent-teams | Parallel worktree execution for batch rebase (>2 branches) |
dev)Same as single branch, plus:
gh) or GitLab (glab)| Priority | Source | Method |
|----------|--------|--------|
| 1 | User argument | --base=<branch> |
| 2 | Common convention | Check if dev or develop exists |
| 3 | Default branch | Use main or master |
# Detect base branch
git branch -r | grep -E 'origin/(dev|develop)$' | head -1 | sed 's|origin/||;s/^[[:space:]]*//'
Branch names often contain Linear ticket IDs. Extract and load ticket context for better conflict resolution and code optimization.
| Pattern | Example | Ticket ID |
|---------|---------|-----------|
| feat/DEV-123-description | feat/DEV-123-add-auth | DEV-123 |
| fix/DEV-456-description | fix/DEV-456-login-bug | DEV-456 |
| DEV-789/description | DEV-789/refactor-api | DEV-789 |
| feature/PROJ-42-desc | feature/PROJ-42-users | PROJ-42 |
# Extract ticket ID from branch name
git branch --show-current | grep -oE '[A-Z]+-[0-9]+'
Once extracted, load via mcp__plugin_lt-dev_linear__get_issue:
| File Type | Strategy |
|-----------|----------|
| package.json | Accept dev versions, keep feature-specific additions |
| *.lock files | Regenerate after resolving package.json |
| Config files | Merge both, prefer dev for shared settings |
| Model/DTO files | Keep both changes, resolve type conflicts |
| Test files | Keep both tests, fix import conflicts |
| Migration files | Keep both, verify execution order |
# Continue rebase after resolving conflicts
git add .
git rebase --continue
# If rebase becomes unrecoverable
git rebase --abort
After successful rebase, check if new dev code makes parts of the feature branch redundant:
# Format all files in a project
pnpm dlx oxfmt .
# Format specific files
pnpm dlx oxfmt src/path/to/file.ts
# Lint all files
pnpm dlx oxlint .
# Lint with auto-fix
pnpm dlx oxlint --fix .
Always use --force-with-lease instead of --force:
git push --force-with-lease
This prevents overwriting changes that someone else pushed to the same branch after your last fetch.
| Scenario | Command |
|----------|---------|
| Rebase current branch onto dev | /lt-dev:git:rebase |
| Rebase with specific base branch | /lt-dev:git:rebase --base=main |
| Rebase all open MRs for a project | /lt-dev:git:rebase-mrs |
| Rebase selected MRs/PRs | /lt-dev:git:rebase-mrs [project-url] |
development
Single source of truth for the lenne.tech fullstack production-readiness checklist. Defines the eight pillars (configuration & secrets, observability & logging, health & lifecycle, security hardening, data durability, resilience under load, deployment hygiene, runbook & rollback) with concrete file/line evidence requirements per pillar, severity classification (Critical / Major / Minor), and a canonical machine-parseable report block. Activates whenever an agent or command needs to gate a release on production-readiness — currently used by /lt-dev:production-ready, lt-dev:production-readiness-orchestrator, and the devops-reviewer (read-only). NOT for OWASP-style code-level security review (use security-reviewer). NOT for npm dependency audits (use maintaining-npm-packages).
development
Single source of truth for executing GitLab CI/CD pipelines locally with the same image, env vars, and service containers as the real runner — so pipeline failures are caught before push. Defines pipeline discovery (.gitlab-ci.yml + includes), per-job execution via gitlab-runner exec, service-container orchestration (Mongo, Redis, MailHog), env injection without secrets, cache/artifact handling, and a job-by-job verdict report. Also describes the GitHub Actions equivalent via act for projects that mirror to GitHub. Activates whenever an agent or command needs to validate that the CI pipeline will pass — currently used by /lt-dev:production-ready and lt-dev:production-readiness-orchestrator. NOT for running the local check script (use running-check-script). NOT for writing or refactoring CI configs (use the devops agent).
development
Single source of truth for designing, running, and interpreting k6 load tests against lenne.tech fullstack APIs. Defines installation paths (brew, docker, npm), the three canonical scenarios (smoke / load / soak), endpoint discovery from the generated SDK, realistic Better-Auth login flows, threshold defaults for ~10 concurrent users (p95 < 500ms, error rate < 1%, http_req_failed < 1%), result interpretation, and the optimisation ladder when the system fails (DB indices, query rewrites, caching, connection pool sizing, rate-limit relaxation, payload trimming). Activates whenever an agent or command needs to validate that the API is stable for ~10 concurrent users performing many actions in short time, or to detect performance regressions via k6. Currently used by /lt-dev:production-ready, lt-dev:production-readiness-orchestrator, and lt-dev:performance-reviewer. NOT for Lighthouse frontend performance (use a11y-reviewer). NOT for unit performance assertions (use the test runner directly).
tools
Migrates lenne.tech projects from the legacy jest+eslint+prettier toolchain to the current vitest+oxlint+oxfmt baseline used by nest-server-starter and nuxt-base-starter. Covers swc decoratorMetadata config, the @Prop union-type fix for SWC, supertest default-import correction, ESM/CJS interop, the Nitro PORT-vs-NITRO_PORT bug, ANSI escape stripping in workspace runners (lerna/nx), free-port logic for check-server-start.sh, the offers-pattern config.env.ts (NSC__-only + fail-fast + auto-derived appUrl), and the multi-phase check-envs.sh smoke test. Activates whenever someone is migrating an existing project to the new toolchain, debugging "Cannot determine a type for the X field" Mongoose errors, ERR_SOCKET_BAD_PORT crashes from check-server-start, or wants to align an existing project with the current starter conventions.