.codex/skills/sync-rebase-and-push/SKILL.md
Safely sync local commits with remote by rebasing onto origin/main and then push, following a GitHub Desktop-style flow. Use when asked to push/sync a branch, reconcile local and remote state, resolve rebase conflicts, run targeted tests or typechecks, and push only if checks pass.
npx skillsauth add inline-chat/inline sync-rebase-and-pushInstall 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.
Follow a safe, repeatable push flow:
origin/main.Run these commands in order:
git rev-parse --abbrev-ref HEAD
git status -sb
git fetch --prune origin
git status -sb
git for-each-ref --format='%(upstream:short)' "$(git symbolic-ref -q HEAD)"
Then print divergence:
git rev-list --left-right --count HEAD...@{upstream}
origin/main:git rev-list --left-right --count HEAD...origin/main
If there are uncommitted changes, stop and ask the user before proceeding. Do not auto-stash.
origin/mainRun:
git rebase origin/main
If rebase succeeds, continue to checks. If rebase stops, continue to conflict handling.
When rebase conflicts occur, run:
git status -sb
git diff --name-only --diff-filter=U
For each conflicted file:
After each resolved file:
git add <file>
Continue rebase:
git rebase --continue
Repeat until rebase completes or another blocker appears.
Determine touched scope after rebase:
git diff --name-only origin/main...HEAD
Map touched files to checks:
server/: cd server && bun run typecheck, then targeted bun test for touched modules.web/: cd web && bun run typecheck.admin/: cd admin && bun run typecheck.cli/: cd cli && cargo check (or cargo test when behavior changed).apple/InlineKit: cd apple/InlineKit && swift build (and swift test if tests changed).apple/InlineUI: cd apple/InlineUI && swift build.proto/: bun run generate:proto, then run checks for all impacted consumers.Prefer focused checks over full-suite runs unless user explicitly asks for full validation. If any check fails, do not push. Fix first, then re-run affected checks.
Decide push mode from branch/upstream state:
git push -u origin <current-branch>
git push --force-with-lease
git push
Never force-push main unless the user explicitly asks.
Always report:
tools
Explain and use the Inline CLI (`inline`) for authentication, chats, users, spaces, messages, search, bots, typing, notifications, tasks, schema, attachments, downloads, JSON output, and configuration. Use when asked how to use the Inline CLI or its commands, flags, outputs, or workflows.
development
Reads commits and changed files within a timeframe specified by user and compiles a changelog for both iOS and macOS.
development
Write, review, or improve SwiftUI code following best practices for state management, view composition, performance, macOS-specific APIs, and iOS 26+ Liquid Glass adoption. Use when building new SwiftUI features, refactoring existing views, reviewing code quality, or adopting modern SwiftUI patterns.
development
Based on the context, write a summary of changes, what's left, production readiness, tests run, and APIs/packages used.