AI Agent Hub
Back to plugins
🧩

dsh-checkout-guard

admin-security Updated 2026.08.18

Run the following command in DeepSeek Harness:

dsh plugin install LeslieWylie/dsh-checkout-guard

Paste the following prompt into your AI chat to install this plugin:

Run dsh plugin install LeslieWylie/dsh-checkout-guard inside DeepSeek Harness to install this plugin; source: https://github.com/LeslieWylie/dsh-checkout-guard

About this plugin

Git never complains. It executes every command exactly as issued, but when you are eight commits behind origin and still editing, when someone else unfinished work is quietly sitting in the index, when no repository-local email means your work address is permanently stamped on a public commit, or when two clones of the same repo exist and you are in the stale one, git returns zero and your work is lost, misplaced, or gone. dsh-checkout-guard intercepts precisely this class of misread-state operations before you write, commit, or push.

It ships two read-only tools. checkout_guard performs a deep health check on a single working copy: branch drift, staged content, commit identity origin, remote staleness, and whether another clone of the same repository on this machine has moved ahead. checkout_guard_scan sweeps every working copy under a root in one pass, flagging those that are behind, diverged, or detached, and grouping duplicates by remote so two clones of one repo are visible at a glance. With expectBranch and expectIdentity you upgrade the report from description to assertion: a mismatch becomes a hard blocker.

It is built for developers juggling many repositories across clones, switching between CI and local, or running multi-agent workflows where every write path needs a pre-flight safety gate. It fixes nothing, never takes the index lock, and makes no authenticated network calls. It does one thing: before you touch the working tree, it tells you whether the ground beneath your feet is still the ground you think it is.

Use Cases

  • Verify branch drift, staged content, and commit identity before editing or committing
  • Sweep all clones under a root to surface behind, diverged, or detached working copies at a glance
  • Add a pre-write assertion layer in multi-agent workflows before any git mutation

Best For

  • Developers juggling many repositories across multiple clones
  • Script authors building multi-agent pipelines that need pre-write validation
  • Engineers switching between CI and local who risk acting on stale repo state