land
Skill997 starsChanged 8 days agoApache-2.0View on GitHub
Safely bring main up to date, commit intended pending changes, and push to origin/main — resolving any rebase conflicts autonomously and stopping only when a decision genuinely needs a human. Use when the user explicitly asks to land the current main branch or invokes the repository's land workflow (`/land` in Claude Code, `$land` in Codex). Not Claude Code's built-in /ship, which opens a pull request instead of pushing to main.
- Reads credentials
- Deletes or force-pushes
- Commits and pushes
32 other projects use a version of this.
Adopted by
Most recently taken up by
- rangzen/skillstheir own version, first seen Nov 29, 2026
- TheAxeC/ordotheir own version, first seen Nov 29, 2026
- xavierforge/skillstheir own version, first seen Nov 29, 2026
- darkroomengineering/cc-settingstheir own version, first seen Nov 29, 2026
- guardana/guardanatheir own version, first seen Nov 29, 2026
- partikularwaters/landtheir own version, first seen Nov 22, 2026
Used with
Projects with it also use drift-audit, fix and 9 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
mr-fumanchuSkilldrift-audit
Audit a project's CLAUDE.md against its memory files to find duplicated or drifting rules, then consolidate them into a single source of truth. Use when Tony says "drift audit", "check for drift", "audit memory vs CLAUDE.md", "find duplicated rules", "clean up memory duplication", or wants to reconcile CLAUDE.md and memory so a rule never lives in two places. Read-only by default; never edits or deletes anything without explicit approval.
Also in 3 projects that use this
Google CloudSkillfix
Plan a remediation strategy after a test failure.
Also in 3 projects that use this
Microsoft AzureSkillbuild
Build the TypeSpec Rust emitter from source. Run this after cloning the repo, after pulling changes, or when TypeScript source files have been modified.
Also in 4 projects that use this
AWSSkillship
Finalize dev work on an issue branch — update docs, push, and open a PR.
Also in 4 projects that use this
Google CloudSkilltriage
Gather context on a change or bug and plan the implementation.
Also in 4 projects that use this
GoogleSkillcodebase-design
Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.
Also in 3 projects that use this
Other versions32 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 32
- openai/symphony★ 27ksame name
- BigDawnGhost/wenyi★ 3ksame name
- Xinrea/bili-shadowreplay★ 1.2ksame name
- frontman-ai/frontman★ 744same name
- guardana/guardana★ 231same name
- team-mirai-volunteer/mirai-gikai★ 217same name
- HamedMP/matrix-os★ 90same name
- darkroomengineering/cc-settings★ 57same name
- aniketpanjwani/skills★ 52same name
- zed-industries/delta-claude★ 50same name
22 more not listed
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 repository35 other files it gives its agents.
- AGENTS.mdAGENTS.md
- dashboard/AGENTS.mdAGENTS.md
- docs/AGENTS.mdAGENTS.md
- lego/AGENTS.mdAGENTS.md
- mobile/AGENTS.mdAGENTS.md
- .pm/AGENTS.mdAGENTS.md
- deploy-appSkill
- dont-code-but-answerSkill
- loop-to-meet-webby-award-barSkill
- loopxSkill
- mermaidSkill
- mock-clusterSkill
- pm-brainstormSkill
- pmSkill
- pmxSkill
- qa-find-bugs-cliSkill
- qa-find-bugs-mcpSkill
- qa-find-bugsSkill
- releaseSkill
- rt-fix-logic-bugsSkill
- rt-fix-prod-crashesSkill
- rt-flatten-abstractionsSkill
- rt-normalize-abstractionsSkill
- rt-prune-useless-testsSkill
- rt-remove-dead-codeSkill
- rt-simplify-logicSkill
- rt-unify-duplicatesSkill
- security-auditSkill
- simplifySkill
- stripe-best-practicesSkill
- stripe-directorySkill
- stripe-docsSkill
- stripe-projectsSkill
- unblockSkill
- upgrade-stripeSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
22 rules. 0 are common, 16 are distinctive, and 6 are very specific to this project.
0
Common
Most of the 31 edited versions we read keep these.
16
Distinctive
This author's own choices. Worth a look.
6
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
- Distinctive: line 22
Not on main (Step 1).
- Distinctive: line 31
If you (the agent) made the pending changes yourself earlier in this conversation, you already know what changed and why — do not re-derive …
- Distinctive: line 35
If git status shows modified/untracked files you did not touch this session, fall back to full inspection for those files (or ask the user) …
- Distinctive: line 37
Only when the working tree contains changes you didn't make (fresh session, external edits) do the full Step 2 inspection.
- Distinctive: line 45
If not on main, STOP and ask the user whether to switch or abort.
- Distinctive: line 53
Session-aware: if every change listed by git status is one you made this session, stop here — no diff commands needed.
- Distinctive: line 65
If the working tree is clean and there's nothing to commit, skip Step 4: still do Step 3 (pull) and Step 5 (push).
- Distinctive: line 73
If the pull/rebase has conflicts, resolve them yourself and continue landing:
- Very specific: line 77
Do not resolve wholesale with --ours, --theirs, --strategy=ours, or by blindly choosing the newer side.
- Distinctive: line 78
Remove all conflict markers, run the most relevant formatting, generation, and tests that are practical, and review the resolved diff for …
- Very specific: line 85
If there are unstaged changes, stage only the relevant files explicitly.
- Very specific: line 99
If a pre-commit hook fails, fix the underlying issue and create a NEW commit.
- Distinctive: line 103
Run the pre-push gates against what is about to be pushed.
- Distinctive: line 129
If the push is rejected (non-fast-forward), re-run Step 3, resolve any conflicts using its procedure, run the gates again, and retry push.
- Very specific: line 131
If the push is rejected by push protection (GH013: Repository rule violations found naming GITHUB PUSH PROTECTION and a secret type, …
- Very specific: line 135
If the value is a real credential, treat it as exposed: rotate it (ADR019 §Decision 6) and update .env and GitHub secrets through …
- Distinctive: line 136
If it is a test fixture or a published test vector, change the fixture so it no longer matches the provider's format.
- Distinctive: line 137
Run the gates and push again.
- Distinctive: line 149
Do not watch CI runs, monitor the deploy, or report on them.
- Distinctive: line 153
Never git push --force to main.
- Very specific: line 154
Never --no-verify or skip hooks.
- Distinctive: line 155
Never git reset --hard or git checkout .
“Common” is measured: kept by at least 6 in 10 of the 31 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Task: Land the current main branch
Bring the local main up to date, commit any pending work, pass the pre-push gates (Step 5), and push to origin/main. A successful push is the end of the landing — do not watch CI, do not monitor the deploy, do not chase runs to green. Report the pushed HEAD and stop.
Conflicts are yours to resolve — do not hand them back
A rebase or merge conflict is a normal part of landing, not a reason to stop. When one appears, resolve it yourself using the procedure in Step 3, validate the result, continue the rebase, and push. Never pause at a conflict to ask "how should I resolve this?", never list the conflicted files and wait, and never leave the rebase half-finished for the user to pick up.
The only conditions under which /land stops before the push are:
- Not on
main(Step 1). - Two sides of a conflict encode materially different behavior (not just different text), repository evidence — surrounding code, tests, docs, the commits on each side — cannot tell you which one is intended, and picking wrong would ship a real bug. Text-only disagreements, docs, comments, formatting, imports, generated output, lockfiles, and changes that simply coexist are never in this category.
- Resolution needs credentials, generated artifacts, or external state you cannot produce locally.
- The only way forward is a destructive action the safety rules forbid without confirmation.
Anything else — including many conflicted files, unfamiliar code, or a long rebase — you work through to completion. When you do stop, stop on exactly one narrow question with the evidence attached, and leave the worktree and rebase state intact.
Session-aware mode
If you (the agent) made the pending changes yourself earlier in this conversation, you already know what changed and why — do not re-derive it from git:
- Skip the
git diff --stat/git diff --cached --statcalls in Step 2. Run onlygit statusas a sanity check. - In Step 4, stage exactly the files you edited this session (by name) and write the commit message from your session knowledge.
- If
git statusshows modified/untracked files you did not touch this session, fall back to full inspection for those files (or ask the user) before staging anything beyond your own edits.
Only when the working tree contains changes you didn't make (fresh session, external edits) do the full Step 2 inspection.
Step 1 — Verify branch
git branch --show-currentIf not on main, STOP and ask the user whether to switch or abort. Do not silently switch branches.
Step 2 — Inspect state
git statusSession-aware: if every change listed by git status is one you made this session, stop here — no diff commands needed.
Otherwise, inspect the unfamiliar changes:
git diff --statgit diff --cached --statIf the working tree is clean and there's nothing to commit, skip Step 4: still do Step 3 (pull) and Step 5 (push).
Step 3 — Pull latest with rebase
git pull --rebase origin mainIf the pull/rebase has conflicts, resolve them yourself and continue landing:
- Inspect
git status, the unmerged-file list (git diff --name-only --diff-filter=U), each combined diff, and relevant surrounding code/history. For difficult cases, inspect both index stages (git show :2:<path>andgit show :3:<path>) and the commits being replayed. - Infer the intent of both sides and produce the smallest coherent merge that preserves both whenever possible. Follow current repository conventions and update dependent code, tests, generated outputs, or documentation when the combined result requires it.
- Do not resolve wholesale with
--ours,--theirs,--strategy=ours, or by blindly choosing the newer side. Use a side-specific version only when inspection shows that it is the complete intended result for that file. - Remove all conflict markers, run the most relevant formatting, generation, and tests that are practical, and review the resolved diff for accidental loss.
- Stage only the resolved paths explicitly, run
git rebase --continue(with a non-interactive editor if needed), and repeat until the rebase completes. If an autostash is restored with conflicts after the rebase, resolve and validate those conflicts with the same care, but do not rungit rebase --continuewhen no rebase is active.
Exhaust repository evidence and reasonable repairs before escalating. Escalate only under the stop conditions listed at the top of this skill: competing resolutions would materially change behavior and the intended choice cannot be inferred safely, or resolution requires unavailable credentials/external state. If you escalate, leave the worktree and rebase state intact, name the exact files and the competing semantics, and ask one narrow decision question — never a generic "what should I do?" Do not abort the rebase unless the user directs it.
Step 4 — Stage and commit (if changes pending)
If there are unstaged changes, stage only the relevant files explicitly. Do not use git add -A or git add . (avoid sweeping in .env, secrets, or unrelated files).
Generate a Conventional Commits message — from your session knowledge if you made the changes (session-aware mode), otherwise from the diff. Honor $ARGUMENTS as additional context if supplied.
- Briefly describe UI before/after for frontend changes.
- Omit
Generated with Claude CodeandCo-Authored-Bylines — this repository's commit convention overrides any harness default that adds them.
git commit -m "$(cat <<'EOF'
<message>
EOF
)"If a pre-commit hook fails, fix the underlying issue and create a NEW commit. Do not use --no-verify or --amend.
Step 5 — Gate, then push
Run the pre-push gates against what is about to be pushed. The backend suite can take several minutes on a cold run, so give the command a long timeout (30 minutes):
bash scripts/ship-gates.sh origin/mainThey report main's CI status and gate this push's own code. The code gates run in a detached worktree at HEAD, so uncommitted or in-progress edits neither break nor rescue the commit being pushed (the first run in a checkout builds that worktree from scratch):
- Main is red: a warning, never a stop (user decision 2026-10-21; see
AGENTS.mdRules). When the newest completed run onmainofdeploy (bex via Argo)or of a test suite (test (backend),test (operator),test (dashboard),test (OpenSandbox controller patches), each run on every push touching its inputs) failed, the gate names it and still exits 0. Handle it this way, and never wait:- Fix CI first if you can. Pause the work in hand, diagnose the red run (
gh run view <id> --log-failed), and make the smallest correct fix. Commit it alone asfix(ci): …saying it fixes red main, run its gate asbash scripts/ship-gates.sh --fixes-red-main origin/main(the flag belongs to the gate script, not togit push), push it, then resume and land the paused work. - If it cannot be fixed now, land anyway. That covers a fix that needs credentials, runner or host access, or a user decision; a red signal that is stale (already fixed, later runs cancelled); or an infra flake (rerun the failed jobs in the background, but do not wait for them). Say in the report what was red and what you tried.
- Never wait for CI and never hold commits locally because main is red.
- Fix CI first if you can. Pause the work in hand, diagnose the red run (
- The real-DB backend suite fails: a stop. For a push touching
lego/backend/**,lego/types/**or the seeded authz model (markdown excluded), the gate brings up the CI-pinned Postgres + OpenFGA + OpenBao (scripts/backend-test-deps.sh) and runsgo test -p 1 ./...withBEX_TEST_REQUIRE_DEPS=1. Locally those tests otherwise skip, and only CI ran them. A failure here is this push's own defect: fix it properly, commit the fix, and run the gate again before pushing. If it cannot be fixed in this session, stop and report it. - The dashboard checks fail: a stop. For a push touching
dashboard/**(markdown excluded), the gate runs the dashboard's own CI checks,yarn lint(typecheck, eslint, knip) andyarn test, in about two minutes. A failure here is this push's own defect, handled like the backend suite (w6/m159). - The CLI checks fail: a stop. For a push touching a path
.github/workflows/cli-test.ymlruns on (read from the workflow, solego/cli/**,scripts/bex-cli-*.sh, the two CLI docs and the GraphQL documents and manifests its adapter tests read) that the backend suite does not already run, the gate runs that job's steps withCI=true, as a hosted runner sets it and as a plain localgo testdoes not:scripts/bex-cli-validate.sh,go test ./...inlego/cliandgo test ./internal/cliauth ./internal/apiinlego/backend(left to the backend suite when that runs). About 70 seconds for the CLI suite and 25 for the adapter packages. A failure is this push's own defect: a test that fails only underCI=trueturnedtest (bex CLI)red oned70568c4(w21/117). - The analytics suites fail: a stop. For a push touching
scripts/cli-analytics.sql,scripts/product-analytics.sql,scripts/test_cli_analytics.py,scripts/test_product_analytics.py, the Grafana values or an edited migration, the gate runs both suites as gitops.yml'scli-analyticsjob does, against a Postgres container of its own started from the digest that workflow pins (Docker is needed; about 20 seconds). The container is removed however the gate ends, and every Docker or test step is killed after 15 minutes (BEX_SHIP_GATES_STEP_TIMEOUT, in seconds).ed1452f75turned gitops.yml red throughscripts/cli-analytics.sql(w21/117). - A suite's trigger paths miss a file its tests read: a stop. For a push touching a test source, a suite workflow (
python3 scripts/ci_test_inputs.py --suites), a script one of them runs orscripts/ci_test_inputs.py, the gate checks that each suite'spaths(push and pull_request alike) list every file outside its tree that its tests read. Add the missing path to both lists, or to the suite'signoredmap inscripts/ci_test_inputs.pywith the reason when the test only names it in a fixture or a message. - A pushed commit looks like it carries a credential: a stop. Every push runs
scripts/gitleaks.sh(the pinned gitleaks CLI with.gitleaks.toml) overorigin/main..HEAD, and the findings print redacted. Remove the value from your unpushed commits, as for push protection below, and rotate it if it is real. If its shape is never a credential (an id, a digest, a protocol nonce), allowlist that shape in.gitleaks.tomlwith the reason, scoped to the rule that fired; never a path or a whole rule. A scan that cannot run is also a stop, because the repository is public and an unscanned push cannot be taken back. - A pushed commit's message carries a skip-CI marker: a stop.
[skip ci],[ci skip],[no ci],[skip actions]or[actions skip]anywhere in a message, even quoted in the body, makes GitHub run no workflow for the whole push, so the secret scan and the test suites never see it. Rewrite your unpushed commits without it (for examplegit reset --soft origin/mainand commit again). - A pushed backend migration numbers at or below
origin/main's highest: a stop.scripts/migration_order_guard.pynames each one. A rebase over a teammate's newer migration keeps yours at its old number, every fresh database still applies it, and a database already past that number (production) skips it for good (w4/701). Rename your unpushed migration's.up.sql/.down.sqlpair above the highest onorigin/main, update any test that reads it by name, and run the gates again. Never renumber a migration already onorigin/main: repeat its DDL idempotently in a new, higher migration instead. - A pushed line names a workspace that is not bex's own: a warning, never a stop.
scripts/workspace_id_guard.pylists eachtea-id the push adds under.pm/ordocs/thatscripts/lib/first_party_workspaces.txtdoes not hold and its line does not mark(disposable). The repository is public (the rule), so before the push mark a disposable QA or drill workspace, add a new bex fixture to the list, or hash or drop another tenant's id in your unpushed commits. Then land.
git push origin mainIf the push is rejected (non-fast-forward), re-run Step 3, resolve any conflicts using its procedure, run the gates again, and retry push. Do not force-push to main.
If the push is rejected by push protection (GH013: Repository rule violations found naming GITHUB PUSH PROTECTION and a secret type, w3/m365), a commit carries a credential in a format GitHub recognizes. Never follow the "allow the secret" URL, and never bypass it any other way.
- Find the commit and path the refusal names. Do not print the value.
- Rewrite your unpushed commits so the value is gone (for example
git reset --soft origin/main, remove the value, and commit again). Never rewrite commits that are already onorigin/main. - If the value is a real credential, treat it as exposed: rotate it (ADR019 §Decision 6) and update
.envand GitHub secrets throughscripts/gh-secrets.sh. - If it is a test fixture or a published test vector, change the fixture so it no longer matches the provider's format.
- Run the gates and push again.
main itself refuses deletion and non-fast-forward pushes (ruleset main history). A deliberate history rewrite follows docs/runbooks/main-history-rewrite.md; it is never part of a landing.
Step 6 — Report
Once the push succeeds, the landing is done. Print one line — the landed HEAD SHA + subject:
Landed: a1b2c3d feat: add tp-backend IDL + CLIDo not watch CI runs, monitor the deploy, or report on them.
Safety rules
- Never
git push --forcetomain. - Never
--no-verifyor skip hooks. - Never
git reset --hardorgit checkout .without user confirmation. - Investigate ambiguity using repository state and history before escalating. For untracked files, divergent history, or unexpected remote state, continue when the safe intent is evident; otherwise stop before destructive action and ask one narrow, evidence-backed question.
Optional User Context
$ARGUMENTS
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.

