Skip to content
Back to skills

Sync

ASecurity

Land origin/[default branch] in the primary checkout and this worktree, delete local branches whose work is already in it, and remove idle agent worktrees. Use after a merge (the user says a PR is merged); the merge-pr skill runs it for you. Session-start cleanup is automatic (SessionStart hook). `--dry-run` previews.

  • 7 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added December 3, 2026
ai-agentsbashgit

Security analysis

A100/100

Scanned December 3, 2026

npx -y skills add ivan-ii-tech-digital/agent-kit --skill sync --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Sync?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Sync
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ivan-ii-tech-digital-sync/badge)](https://www.skillsdirectory.com/skills/ivan-ii-tech-digital-sync)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: sync
description: Land origin/[default branch] in the primary checkout and this worktree, delete local branches whose work is already in it, and remove idle agent worktrees. Use after a merge (the user says a PR is merged); the merge-pr skill runs it for you. Session-start cleanup is automatic (SessionStart hook). `--dry-run` previews.
model: haiku
argument-hint: "[--dry-run]"
---

## Mode

```text
$ARGUMENTS
```

## Step 0: Confirm the trigger

Runs only on the user's `/sync`, from the merge-pr skill's Step 6, or when the user's message says a PR is merged. Never on your own initiative.

## Run

Run the sync script (on PATH from this plugin) and relay its report. Pass `--dry-run` through when `$ARGUMENTS` contains it; ignore anything else.

```bash
ak-git-sync --dry-run   # when $ARGUMENTS contains --dry-run
ak-git-sync             # otherwise
```

The script lands the working branch, then removes only clean, landed, unlocked, idle worktrees and branches (never protected or `release/*`); each `kept:` line says why something stayed. The rules live in `bin/ak-git-sync` and the plugin README.

## Report

Print the script output as is: `done:` lines, then `kept:` lines. Every `kept:` line is something the script refused to touch and why; do not act on those yourself, the user decides. `warning:` lines close the report; never drop them: `plugins changed: run /reload-plugins` is the user's to type (until then the session's hooks point at the old plugin files), and a squashed-promotion warning names its fix for the user to approve. Non-zero exit → quote the error and stop.

## What this skill deliberately does NOT do

- Never deletes a branch or worktree with commits or changes not in the default branch, and never touches a locked worktree or one with a live process or recent file activity.
- Never stashes, never switches the primary checkout's branch, never resolves merge conflicts (aborts and reports), never pushes.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.