merge-to-main
Merge a feature branch to main — squash, rebase onto local main, verify no main changes lost, ff-merge into the main worktree.
- License 许可
- MIT
- 所属仓库
- kfet/fir
- 最近更新
- 2026-11-13
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- merge-to-main
- builtin
- true
- override
- true
- description
- Merge a feature branch to main — squash, rebase onto local main, verify no main changes lost, ff-merge into the main worktree.
03 SKILL.md 正文
Merge the current feature branch into local main with a clean, linear history.
- Check main is current —
git fetch originand confirm localmainis not behindorigin/main(git rev-list --count main..origin/mainmust be0). If it is behind, fast-forward local main first and rebase this branch onto it. Merging — and especially cutting a release — on a stale base means redoing it: the version may already be taken upstream. - Squash if too many commits.
- Rebase onto local main.
- Verify the diff — run
git diff main..HEAD. Confirm it contains only the feature's intended changes and nothing that removes or reverts existing main content. If main changes were dropped during conflict resolution, fix before proceeding. - Build — run
make allto confirm nothing broke. - Update CHANGELOG.md — ensure all commits in the branch have corresponding entries in the
[Unreleased]section. Comparegit log main..HEAD --oneline --no-mergesagainst existing entries; add any missing ones under the appropriate subsection (Added/Changed/Fixed/Removed). Check the entries are under## [Unreleased], not merely present: a rebase across a release boundary relocates them into the just-released section with no conflict, andgit diff main..HEADstill shows a clean pure-addition diff. Read the top of the file (sed -n '1,40p' CHANGELOG.md) and confirm with your own eyes that each new line sits above the first## [x.y.z]heading; move any that don't. - FF-merge into the main worktree.
- Build again — run
make allfrom the main worktree to confirm the merge is clean.
At the end ask the user if they want to clean-up by removing the local worktree and branch. Careful, this could be destructive!
04 同仓库更多 Skills
wt
Spawn a fresh fir agent in its own tmux session on its own git worktree. Use whenever the user wants the work — or the conversation about the work — to happen over there, not here. If the user points at this skill, or has directly loaded it in the context, that alone is the cue — spawn, don't inline.
wrap-up
Wrap up work on a project branch — review, fix, and simplify in a loop until clean, then ff-merge to main.
tmux-observer
Attach a tmux window to an already-running fir session — observe its transcript and drive its input via tmux send-keys. Use when you need to watch or steer another fir agent.
tmux-driver
Drive interactive CLIs (python, gdb, etc.) via named tmux sessions with multi-window support. Falls back to fir's built-in PTY driver when tmux is unavailable.
telegram-bot-setup
Set up a new Telegram bot channel for a fir project — install the telegram MCP, create a per-project state dir, drop in the bot token, wire .fir/mcp.json with TELEGRAM_STATE_DIR, pair the user, and verify. Use when the user asks to add, configure, or onboard a Telegram bot for a fir worktree/project.
sync
Sync with an upstream source repo — detect changed files, apply equivalent downstream edits, update the baseline, and report any new features or non-trivial changes picked up.