skills/workflow-repository/syncing-main-branch/SKILL.md
Switch a clean Git worktree to local `main` and fast-forward it from its configured upstream without losing branches, commits, or local files. Use only when the user explicitly invokes $syncing-main-branch or names syncing-main-branch.
npx skillsauth add narumiruna/agent-skills syncing-main-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.
Use only after explicit invocation. Operate on the current repository and preserve the branch, commits, and files being left.
git status --porcelain=v1 --untracked-files=all
git status --short --branch
git symbolic-ref --quiet --short HEAD
Stop on any local change; do not stash, commit, discard, or carry it automatically. If HEAD is detached, record it and inspect containing refs. Stop until an otherwise reflog-only commit is preserved with a user-chosen branch or tag.
Resolve main exactly.
refs/heads/main when it exists.main only when exactly one intended remote main is clear: git switch --no-overwrite-ignore --track -c main <remote>/main.main does not exist, or another worktree owns it. Do not substitute another branch or bypass worktree protection.Switch with ignored-file overwrite protection when needed:
git switch --no-overwrite-ignore main
main tracks the intended upstream, fetch its configured remote, then fast-forward only:upstream_remote=$(git config --get branch.main.remote)
git rev-parse --abbrev-ref 'main@{upstream}'
git fetch "$upstream_remote"
git merge --ff-only --no-overwrite-ignore 'main@{upstream}'
Stop on missing or unexpected upstream, authentication failure, divergence, ignored-file collision, or non-fast-forward. Do not rebase, reset, force, delete files, change upstream, or delete the previous branch.
git status --short --branch and git log -1 --oneline --decorate. Report the active branch, before/after object IDs, upstream, and whether it advanced. “Already up to date” is success and requires no commit.development
Score or compare one or more agent skills across trigger clarity, workflow actionability, safety boundaries, verification rigor, incremental knowledge value, and leanness. Use only when the user explicitly asks for ratings, numerical quality scores, rubric-based scorecards, or scored comparisons; use creating-agent-skills for unscored reviews or revisions.
development
Assess or improve an existing codebase's architecture when the user asks about module boundaries, coupling, scattered ownership, testability, change locality, deep modules, seams, or behavior-preserving structural refactoring. Use for cross-module design rather than ordinary diff review or a confirmed edge-case bug fix.
development
Perform read-only security audits, vulnerability assessments, or threat-focused reviews of diffs, pull requests, code paths, or explicitly scoped repositories when security is the primary objective or acceptance criterion. Use reviewing-code for ordinary review with baseline security coverage and hardening-code-paths for fixing confirmed findings.
development
Run iterative multi-reviewer panels over a code diff, verify their findings, apply explicitly authorized fixes, and re-review the updated change until it passes or reaches a stopping condition. Use when the user asks for a panel loop, multi-model code-review consensus, or a review-fix-re-review cycle.