code/sync-branch/SKILL.md
--- name: sync-branch description: >- Merges one branch into another with conflict handling. Stashes work, updates both branches, merges, resolves conflicts preserving both sides, pushes, and restores state. Use when keeping a long-lived branch in sync with its upstream. argument-hint: [source] [target] [--no-push] [--dry-run] disable-model-invocation: true context: fork allowed-tools: - AskUserQuestion - Bash - Read --- # Sync Branch Merge one branch into another, handling conflic
npx skillsauth add mostafa-drz/claude-skills code/sync-branchInstall 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.
Merge one branch into another, handling conflicts and preserving work in progress.
Read ~/.claude/skills/sync-branch/preferences.md using the Read tool. If not found, no preferences are set.
On startup, use Bash to detect: current git branch, git status, and remote URL (git remote get-url origin). Skip any that fail.
Check $ARGUMENTS:
help → display help then stopconfig → interactive setup then stopreset → delete ~/.claude/skills/sync-branch/preferences.md, confirm, stopParse from $ARGUMENTS:
--no-push — merge locally, don't push--dry-run — show what would happen without executing$0 = source branch, $1 = target branchSync Branch — Merge one branch into another
Usage:
/sync-branch Merge default source into current branch
/sync-branch <source> Merge source into current branch
/sync-branch <source> <target> Merge source into target
/sync-branch --no-push <source> Merge without pushing
/sync-branch --dry-run <source> Preview without executing
/sync-branch config Set defaults
/sync-branch reset Clear preferences
/sync-branch help This help
Examples:
/sync-branch main
/sync-branch main all-demos
/sync-branch --dry-run main feature/auth
/sync-branch --no-push develop
How it works:
1. Stashes uncommitted work (if any)
2. Updates source and target branches from remote
3. Merges source into target
4. Resolves conflicts (preserving both sides)
5. Pushes target (unless --no-push)
6. Restores original branch and stash
Current preferences:
(shown above under Preferences)
Use AskUserQuestion:
Q1 — "Default source branch?" (main (default), develop, custom) Q2 — "Auto-push after merge?" (Yes (default), No) Q3 — "Conflict resolution style?" (preserve-both (default) — keep changes from both sides, ask-each — show each conflict and ask, prefer-source — favor source branch, prefer-target — favor target branch)
Save to ~/.claude/skills/sync-branch/preferences.md.
If no preferences file exists, show:
"First time using /sync-branch? Run /sync-branch config to set defaults, or continue — I'll merge main into your current branch."
Then proceed.
$0 if provided, else saved default, else main$1 if provided, else current branchIf source == target, error and stop.
If --dry-run:
git fetch origin
git log {target}..origin/{source} --oneline
Show what commits would be merged, then stop.
If working tree is dirty:
git stash --include-untracked
Record that a stash was created.
Record which branch the user was on originally.
git checkout {source}
git pull origin {source}
If pull fails → restore state, report error, stop.
git checkout {target}
git pull origin {target}
git merge {source} --no-edit
If merge reports conflicts:
git diff --name-only --diff-filter=UAskUserQuestion, let them decidegit add each resolved filegit commit --no-editUnless --no-push or preference says no:
git push origin {target}
git stash popSynced {source} → {target}
{source}: {short sha} {subject}
{target}: {short sha} {subject}
Conflicts: {count} ({file list} or "none")
Pushed: {yes/no}
If user changes source branch, save preference. If user changes conflict style, save preference.
development
--- name: triage-board description: >- Generates a structured triage artifact from the current conversation's findings — a self-contained Desktop folder with a JSON Schema, schema-conformant report.json, prose markdown, and a single-file HTML viewer. Viewer ships with MD / CSV / JSON download buttons in the header and a per-finding "Copy as Markdown" action that produces a GitHub/Linear/Notion-ready ticket block. Stateless — triage state lives in the user's ticket system, not in the
development
Runs a beginner-mind end-to-end UI audit of any running app — local dev server, staging, production, or a specific URL. Drives Chrome through every interactive element on the target surface, collects structured findings (severity, category, where, symptom, impact, repro, triage), and hands the result off to `/triage-board` which produces the Desktop folder (schema + JSON + Markdown + single-file HTML viewer with MD/CSV/JSON exports and a per-finding Copy as Markdown button). Use when you want fresh-eyes verification of a feature, page, modal, flow, branch, or whole app — before shipping, before review, before a demo, or any time the UI deserves a careful poke.
development
Reviews the user's past Claude Code conversations from a wellbeing perspective — sentiment, tone, emotional arc, recurring patterns — and generates a supportive, science-grounded report in both Markdown and HTML. Default lookback is 48 hours across all projects. Uses recognised emotion frameworks (Plutchik, Ekman, Russell's circumplex, Pennebaker linguistic markers) and cites the science behind every observation. Learns the user's baseline tone over time so future reports flag genuine shifts, not noise. Use when the user asks for an emotional/wellbeing recap, mood check, sentiment review, or wants to understand their own ups and downs across recent work sessions.
development
--- name: workflow-advisor description: >- Analyzes recent Claude Code conversations and local Claude state (skills, settings, memory files, CLAUDE.md), researches the latest Claude Code features and best practices online, and suggests one workflow improvement at a time with reasoning and a concrete action item. Can save accepted suggestions to memory for tracking. Use when you want to discover underused Claude Code features, improve your development workflow, stay current with the lat