sync-main
Skill9 starsChanged 2 months agoApache-2.0View on GitHub
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".
3 other projects use a version of this.
Adopted by
Most recently taken up by
- venables/skillstheir own version, first seen Sep 12, 2026
- noGarne/skillstheir own version, first seen Aug 4, 2026
- SrdjanCoric/skillstheir own version, first seen Aug 2, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- SrdjanCoric/skills★ 18same name
- noGarne/skills★ 1same name
- venables/skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository11 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- deploy-localSkill
- dev-cleanSkill
- diagnose-redSkill
- frontend-checkSkill
- new-go-moduleSkill
- record-adrSkill
- spec-changeSkill
- teardown-localSkill
- verify-gateSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 35
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 …
- Distinctive: line 44
If any apply, report what's live and hold.
- Distinctive: line 55
If the file differs, show the diff and ask.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Sync main after a merge
scripts/dev post-merge [<issue>] [--start-deps] does the whole walk:
git pull --ff-only origin mainscripts/cleanup-merged- an optional issue-closed check
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:
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)
pgrep -fl '[f]ishhawk-runner .*--run-id' || echo no-live-runner
git branch --show-current; git status --shortIf 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:
git fetch -q origin main
git show origin/main:<path> | cmp -s - <path> && echo identicalIf the file differs, show the diff and ask. Never discard local edits silently.
3. Pull and reload
Requires: on main, with a clean tree.
scripts/dev post-merge <issue-number-if-known> --start-deps- A diverged local
mainfails loudly by design. Don't resolve it with a merge commit; showgit log --oneline origin/main..mainand ask. post-mergeruns the oldscripts/dev. If the merge changedscripts/devitself, the change applies from the next invocation.
4. Confirm the new code is live
- fishhawkd:
/healthzgit_shaequalsgit 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 withfishhawk_doctoror a version-returning MCP call showing the new GitSHA. If it is stale, runbin/fishhawk-mcp-shim --status, then the user reconnects the MCP client.ACTION REQUIRED/ shim rebuilt: the user must reconnect their MCP client (/mcpin Claude Code).
Report: the new HEAD, which branches were pruned, the healthz SHA, and the banner. Flag anything you held back.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

