land-to-main
Skill1 starsChanged 13 days agoMITView on GitHub
Lands a finished work branch onto the local main branch. Use when the user asks to land, land to main, merge to main.
- Commits and pushes
In this repository16 other files it gives its agents.
- AGENTS.mdAGENTS.md
- arenaSkill
- build-ticketSkill
- deep-reviewSkill
- design-it-twiceSkill
- designSkill
- domain-modelingSkill
- grillingSkill
- lets-buildSkill
- lets-designSkill
- model-tiersSkill
- prepare-commitSkill
- ready-ticketSkill
- reflectSkill
- review-diffSkill
- to-ticketsSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
17 rules. About 0 are common, 14 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈14
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 15
Not on
main: if HEAD is main, refuse and stop. - Distinctive: line 16
Clean tree: if there are uncommitted changes (staged or unstaged), stop.
- Distinctive: line 17
Already landed: if work branch and main point at the same commit, report that and stop (nothing to do).
- Distinctive: line 21
Run these steps in order. Stop and wait for the user on any unexpected failure.
- Distinctive: line 28
If any look like WIP / temporary / "fixup later" commits, ask before continuing.
- Distinctive: line 37
Complex or semantic conflicts: stop, explain the conflict, wait for direction.
- Distinctive: line 42
Prefer the project's documented lint and test entrypoints.
- Distinctive: line 43
Run lint, then tests. Fail-stop on either — do not fast-forward if either fails.
- Distinctive: line 44
Do not run a full production build unless the project documents that as the check to use.
- Distinctive: line 50
Only after lint and tests succeed:
- Very specific: line 59
Use the work branch name or its SHA for <work-branch-tip>.
- Distinctive: line 62
If the main worktree has local changes, the merge should fail.
- Very specific: line 63
If no worktree has main, you can directly git push .
- Distinctive: line 75
Leave open any ticket the work only partly addresses.
- Distinctive: line 85
Do not commit, amend, squash, or otherwise rewrite history unless the user explicitly asks.
- Distinctive: line 86
Do not delete branches.
- Distinctive: line 88
If unsure how to proceed: stop and wait for the user.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
Land to Main
Land the current work branch onto local main. Remotes are out of scope — do not push or pull.
Preconditions (fail fast)
- Not on
main: ifHEADismain, refuse and stop. - Clean tree: if there are uncommitted changes (staged or unstaged), stop. Do not commit as part of landing.
- Already landed: if work branch and
mainpoint at the same commit, report that and stop (nothing to do).
Workflow
Run these steps in order. Stop and wait for the user on any unexpected failure.
1. Inspect history
Review commits on the work branch that are not on main (git log main..HEAD).
- Normally land as-is.
- If any look like WIP / temporary / "fixup later" commits, ask before continuing. Do not squash or rewrite unless the user asks.
2. Rebase onto local main
git rebase main- Simple conflicts (obvious one-sided or mechanical): resolve,
git add, continue. - Complex or semantic conflicts: stop, explain the conflict, wait for direction.
- Never use
git rebase -i.
3. Lint and test
- Prefer the project's documented lint and test entrypoints.
- Run lint, then tests. Fail-stop on either — do not fast-forward if either fails.
- Do not run a full production build unless the project documents that as the check to use.
4. Fast-forward main
main is typically checked out in another worktree, so do not git checkout main here.
Only after lint and tests succeed:
- Find the worktree that has
main:git worktree list - Fast-forward that checkout to this branch tip (stay in the work-branch worktree):
git -C <main-worktree-path> merge --ff-only <work-branch-tip>Use the work branch name or its SHA for <work-branch-tip>.
--ff-onlyonly — if FF is not possible, stop and ask (do not create a merge commit).- If the main worktree has local changes, the merge should fail; abort and report — do not dirty-merge or stash there.
- If no worktree has
main, you can directlygit push . HEAD:main. Do not force push. - Stay on the work branch. Do not delete any branches.
5. Verify
Confirm work branch and main are the same commit
(e.g. git rev-parse HEAD vs git -C <main-worktree-path> rev-parse HEAD).
6. Close tickets
Find the tickets the landed commits resolve (from commit messages, or the ticket this work started from). Close each in the project's tracker; skip any that are already closed. Leave open any ticket the work only partly addresses.
7. Report
Report briefly: branch name, new main tip (short SHA + subject), that checks passed,
and the tickets closed and left open.
Hard rules
- Local
mainonly — no remote fetch/pull/push. - Do not commit, amend, squash, or otherwise rewrite history unless the user explicitly asks.
- Do not delete branches.
- End on the work branch, with
mainfast-forwarded to match. - If unsure how to proceed: stop and wait for the user.
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.

