rebase-and-validate
Skill296 starsChanged 58 days agoMITView on GitHub
Rebase the current branch onto a target branch, resolve conflicts safely, and validate the result
- Deletes or force-pushes
- Commits and pushes
In this repository12 other files it gives its agents.
- .github/copilot-instructions.mdCopilot instructions
- address-pr-commentsSkill
- agentic-workflowsSkill
- commit-messageSkill
- create-prSkill
- nvx-benchmarkSkill
- nvx-ci-investigationSkill
- nvx-debugSkill
- nvx-host-connectSkill
- nvx-openvmm-promoteSkill
- nvx-runSkill
- review-changesSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
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
- could be automatic: a setting could enforce it
- Very specific: line 12
Verify that the target ref exists and is not the current branch.
- Distinctive: line 22
If no rebase is in progress, rebase the current branch onto the effective target ref.
- Distinctive: line 44
Run the deterministic applicable gates with the working directories, environment, feature flags, matrix values, dependency setup, and …
- Distinctive: line 54
Do not push or force-push.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 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
Rebase the current Git branch onto the target branch supplied in the input, then ensure the
repository builds and its tests pass. If no target is supplied, use dev from the remote that
resolves to microsoft/nvx, normally origin/dev.
- Inspect the current branch,
HEAD, worktree status, and whether a rebase is already in progress. Verify that the target ref exists and is not the current branch. Also record theopenvmmsubmodule status and whether it is dirty, any merge commits between the target andHEAD, and which commits to be rebased are signed. - Resolve the effective target before rebasing. For a remote-tracking ref, fetch its branch from that remote and use the refreshed remote-tracking ref. For a local branch with an upstream, fetch and use its upstream ref without moving the local branch. For a local branch without an upstream, use the supplied ref exactly. Do not perform a broad or destructive fetch.
- Preserve all existing user changes, including uncommitted work in the
openvmmsubmodule. Never discard, overwrite, reset, or broadly replace them, and never update or switch a dirty submodule. If local changes block the rebase, ask before stashing or using--autostash. - If no rebase is in progress, rebase the current branch onto the effective target ref. If one is
already in progress, inspect it and continue that rebase instead of starting another. If the branch
contains merge commits, such as earlier merges of
dev, explain that a plain rebase drops them and ask before flattening or preserving them. Keep commit signing enabled; never pass--no-gpg-signor overridecommit.gpgsign, and stop if signing fails. - Resolve conflicts by examining the base, both sides, nearby code, and relevant tests so the
result preserves the intent of both branches. Stage only resolved files and continue until the
rebase completes. Do not skip or drop commits unless explicitly authorized. Never resolve an
openvmmgitlink conflict by picking either pin: combining both changes usually needs a new OpenVMM revision, so stop, report both revisions, and ask. Usenvx-openvmm-promotefor a new pin. - Confirm that the effective target is an ancestor of the new
HEADand that no conflict markers or unmerged paths remain. Confirm that every rebased commit that was signed is still signed. Compare theopenvmmgitlink atHEADwith the submodule checkout;nvx.py verifyfails while they differ. Ask before updating a clean submodule, and report dependent gates as blocked when it is dirty. - Discover the repository's validation sources of truth from its current CI definitions, contributor documentation, build manifests, task runners, and scripts. In NVX, the Validation section of the repository instructions names the authoritative local gates. Do not assume any repository layout, language, package manager, build system, command name, or globally installed tool. Use the repository-prescribed commands and tool versions to identify the build, test, lint, formatting, static-analysis, generation, packaging, and smoke gates applicable to the rebased result.
- Run the deterministic applicable gates with the working directories, environment, feature flags, matrix values, dependency setup, and ordering prescribed by the repository. Start with the narrowest checks for conflict-resolved or changed code, then run the complete applicable CI-equivalent validation set. If a gate requires an unavailable platform, service, secret, privilege, hardware feature, tool, dependency, or generated artifact, identify the prerequisite precisely and report the gate as skipped or blocked instead of treating it as passed. Do not substitute a materially different command without explaining why it is equivalent.
- Diagnose and minimally fix failures caused by the rebased result. Rerun each failing check after its fix, then rerun the complete applicable validation set. Do not change unrelated code merely to make a check pass.
- Do not push or force-push. Finish with a concise report containing the supplied and effective
target refs, resulting commit, conflicts and fixes, signature and submodule state, validation
commands and outcomes, final worktree status, and any checks that could not run. Note that
publishing the rewritten branch needs
git push --force-with-lease, which restarts CI for a Ready pull request and triggers a new Copilot review. Never claim success for a skipped or environment-blocked check.
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.

