Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Sync Main

ASecurity

Safely bring the local Fishhawk checkout and stack up to date after a PR merges — pre-pull safety checks for live runs and decompositions, `scripts/dev post-merge`, and confirming the rebuilt binaries are live. Use when the user says a PR merged, asks to "pull main", "sync", "update local", or "run post-merge".

9 stars
0 votes
0 copies
0 views
Added 10/7/2026
ai-agentsgit

Works with

claude codeterminalclimcp

Security Analysis

A100/100

Scanned 10/7/2026

$npx -y skills add kuhlman-labs/fishhawk --skill sync-main --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Sync Main?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Sync Main
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/kuhlman-labs-sync-main/badge)](https://www.skillsdirectory.com/skills/kuhlman-labs-sync-main)

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

Download with Pro
Files
SKILL.md
---
name: sync-main
description: Safely bring the local Fishhawk checkout and stack up to date after a PR merges — pre-pull safety checks for live runs and decompositions, `scripts/dev post-merge`, and confirming the rebuilt binaries are live. Use when the user says a PR merged, asks to "pull main", "sync", "update local", or "run post-merge".
disable-model-invocation: true
---

# Sync main after a merge

`scripts/dev post-merge [<issue>] [--start-deps]` does the whole walk:

1. `git pull --ff-only origin main`
2. `scripts/cleanup-merged`
3. an optional issue-closed check
4. `reload`, which rebuilds all five binaries, restarts fishhawkd and gates on `/healthz`

The command is the easy part. The judgment is in **whether it is safe to pull and restart right now**.

## Operator-only: stop if you are a run agent

This skill stops services or deletes state, and its confirmation steps need a human. Before anything else:

```sh
top=$(git rev-parse --show-toplevel) && "$top/scripts/is-run-agent"
```

Continue **only** if it prints `operator` and exits 0. On any other result, stop, do nothing, and report its output to the user. That includes `run-agent: …`, a `git` error (you are not in a repository checkout), and a missing script (this checkout predates the guard). The contract lives in `scripts/README.md` § "`is-run-agent`".

## 1. Is anything live? (stop and ask if yes)

```sh
pgrep -fl '[f]ishhawk-runner .*--run-id' || echo no-live-runner
git branch --show-current; git status --short
```

If the fishhawk MCP tools are available, also run `fishhawk_list_runs` and look for runs in a non-terminal state whose `working_dir` is this checkout. Each of these makes a pull or restart harmful:

| Live state | What a pull / restart breaks |
|---|---|
| A runner mid-stage | Restarting fishhawkd can strand its stage in `running` (recoverable only via the REST `reap-failure` endpoint). `post-merge` refuses on its own; `--force` needs the user's explicit OK |
| A decomposed parent with children not yet dispatched | Advancing `main` makes each later child fail `working_dir_diverged_from_base` |
| An implement/plan review round in flight | `post-merge` orphans it, and there is no re-dispatch verb |
| The user is awaiting (`fishhawk_await_*`) on another run | The restart kills the await with `connection refused` |

If any apply, report what's live and **hold**. Offer to do the safe parts now (delete stale local copies, prune branches) and pull later.

## 2. Clear files the pull would refuse

A pull can refuse when a local, previously-ignored or untracked file sits at a path the merge now tracks (e.g. a hand-copied `.claude/settings.json`). For each such path, compare it with the merged version and delete it only if identical:

```sh
git fetch -q origin main
git show origin/main:<path> | cmp -s - <path> && echo identical
```

If the file differs, show the diff and ask. Never discard local edits silently.

## 3. Pull and reload

Requires: on `main`, with a clean tree.

```sh
scripts/dev post-merge <issue-number-if-known> --start-deps
```

- A diverged local `main` fails loudly by design. Don't resolve it with a merge commit; show `git log --oneline origin/main..main` and ask.
- `post-merge` runs the **old** `scripts/dev`. If the merge changed `scripts/dev` itself, the change applies from the next invocation.

## 4. Confirm the new code is live

- **fishhawkd:** `/healthz` `git_sha` equals `git rev-parse --short HEAD`.
- **fishhawk-runner:** nothing to do; it is spawned fresh from `bin/` per stage.
- **fishhawk-mcp:** relay the closing banner verbatim.
  - `auto-swap` / `schema_major_shim`: this is an expectation, not a confirmed swap. Confirm with `fishhawk_doctor` or a version-returning MCP call showing the new GitSHA. If it is stale, run `bin/fishhawk-mcp-shim --status`, then the user reconnects the MCP client.
  - `ACTION REQUIRED` / shim rebuilt: the user must reconnect their MCP client (`/mcp` in Claude Code).

Report: the new HEAD, which branches were pruned, the healthz SHA, and the banner. Flag anything you held back.

Attribution

kuhlman-labskuhlman-labs
View sourceSee grades on GitHubMore from kuhlman-labs →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

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

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Caveman

Terse caveman voice: answer first, fluff gone, every technical fact kept. Use for /caveman, "caveman mode", "talk like caveman", "be brief", "less tokens". Stays on until "stop caveman" or "normal mode".

1100021 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

698431 votes

Writing Skills

Create and manage Claude Code skills in HASH repository following Anthropic best practices. Use when creating new skills, modifying skill-rules.json, understanding trigger patterns, working with hooks, debugging skill activation, or implementing progressive disclosure. Covers skill structure, YAML frontmatter, trigger types (keywords, intent patterns), UserPromptSubmit hook, and the 500-line rule. Includes validation and debugging with SKILL_DEBUG. Examples include rust-error-stack, cargo-dep...

3931 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3421 votes

catchup

Recovers the conversation and failed tool calls of a previous Codex, Amp, Claude Code, Antigravity, Cline, Copilot CLI, Cursor, DeepSeek Harness, Grok Build, Kimi, OpenCode, Pi Agent, or ZCode session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", asks to recover/summarize a previous session before continuing, or asks to diagnose or report a catchup failure. Do NOT use for the current conversation, git history, or any non-agent log.

741 votes
View all in ai-agents →