no-mistakes is a local Git proxy that validates changes in an isolated worktree before forwarding a push to the real remote and opening a pull request. It is for developers and coding agents that want automated checks, safe fixes, CI repair, and human review before changes are published.
Borrowing it
Nothing to install: this file belongs to kunchenguid/no-mistakes. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/kunchenguid/no-mistakes/main/.agents/skills/gate-worktree-git-safety/SKILL.mdgit clone --depth 1 https://github.com/kunchenguid/no-mistakesWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/kunchenguid/no-mistakes/gate-worktree-git-safety)<a href="https://agentmods.dev/skills/kunchenguid/no-mistakes/gate-worktree-git-safety"><img src="https://agentmods.dev/badge/skills/kunchenguid/no-mistakes/gate-worktree-git-safety.svg" alt="Measured on agentmods" height="20"></a>- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00038 | $0.01293 |
| Opus 5 | $0.00019 | $0.00647 |
| Sonnet 5 | $0.00008 | $0.00259 |
| Haiku 4.5 | $0.00004 | $0.00129 |
Grade A, and why
gate-worktree-git-safety scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 36 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Recursive Gate-Execution Containment
internal/gatecontextis the single classifier for recursive pipeline control. It combines canonical registered gate common-directory identity with OS-authenticated IPC peer ancestry;NO_MISTAKES_GATEis diagnostic only. CLI preflight, daemon mutation ingress, gate init/eject, branch-sync mutation, and the managed pre-receive hook must all keep using that owner so marker removal, cwd changes, and direct pushes cannot bypass refusal. Read-only AXI status/logs, help, and doctor remain available. Regressions:internal/gatecontext,TestGateStepCannotStartRecursivePipeline.- Every pipeline agent prompt receives the phase boundary from
internal/gateguidance, and the generated user-level skill reuses the same owner. Step agents return only their assigned phase; the outer executor alone controls other validation, push, PR, and CI phases. Editinternal/skill/skill.go, then runmake skill; never edit the generated skill directly.
Filesystem and Paths
- Use
filepath.Join; respectNM_HOMEfor app state; directories are0o755and files0o644by convention. - On macOS, path comparisons may need symlink resolution (
/varvs/private/var); useworktrees.Canonical/worktrees.Containswherever run worktree paths are compared, so one spelling matches everywhere. - Run worktree placement (
worktree_roots) is owned byinternal/worktrees. Configuration decides it exactly once, at run creation (Layout.DirinRunManager.startRunWithIntentSource), and the result is persisted inruns.worktree_dir; every later consumer - resume, step diff, startup cleanup,procreap, eject, gatecontext attribution - must read it back throughworktrees.RecordedDirand never re-derive it from config, so a mid-flight edit can neither strand a parked run nor point a removal at a directory the run never used. An empty column means the default<NM_HOME>/worktrees/<repoID>/<runID>. worktrees.CheckPlacementis the single policy for an unusable root (insideNM_HOME, inside any registered checkout);config.ValidateWorktreeRootsowns what the config can judge alone. The daemon refuses to start on an unusable placement, soinit --worktree-rootmust refuse exactly the same set or it prints a paste that takes the operator's CLI down, and EVERYinitrefuses to register a checkout that contains a configured root - the same state reached from the other direction. User-facing semantics live indocs/src/content/docs/reference/global-config.md. Regressions:internal/worktrees,internal/config/config_worktree_roots_test.go,internal/daemon/worktree_roots_test.go,internal/gate/eject_sweep_test.go,internal/cli/init_test.go.
Git on Bare Gate Repos (safe.bareRepository)
- Agent harnesses and hardened CI inject
safe.bareRepository=explicit, which forbids cwd-based discovery of bare repositories. Route every gate git call throughgit.Run, which detects a bare git dir and prepends--git-dir=<dir>; never shell out to git in a bare gate repo relying oncmd.Diror-Cdiscovery (issue #362). - Startup gate migration is DB-authoritative with a strict validated
<id>.gitlegacy fallback; it must reject non-gates before hook or Git mutation and usegit.RunBareso a malformed directory cannot discover an ancestor worktree. Completed migrations carry the content-versioned gate-config stamp and normal restarts must stay filesystem-only for current gates. Regressions:TestMigrateGateConfigsRejectsInvalidDirectoriesAndSkipsCurrentGates,TestColdDetachedStartupProductionGateCardinality. - Regressions:
TestRunOnBareRepoUnderSafeBareRepositoryExplicit,TestWorktreeAddRemoveOnBareRepoUnderSafeBareRepositoryExplicit,TestInitUnderSafeBareRepositoryExplicit.
gh PR-Targeting From the Bare Gate Repo (internal/scm/github)
- The daemon runs
ghfrom the detached bare gate repo whose HEAD is the default branch, so every PR-targeting command must name the exact PR explicitly: an empty positional makesgh pr <verb>infer the cwd branch (main) and returnno pull requests found for branch maineven when the feature PR's checks are green.GetChecks,GetPRState,GetMergeableState, andUpdatePRroute through the sharedprSelector(number, else URL, else fail closed) - never append a barepr.Number/pr.URLthat can be empty. This is theghanalogue of the git bare-gate-repo trap above. - Regressions:
TestGetChecksTargetsKnownPRByURLWhenNumberMissing,TestPRTargetingReadsFailClosedWithoutIdentity,TestPRStateAndMergeableTargetKnownPRByURL,TestUpdatePRTargetsKnownPRByURLWhenNumberMissing,TestUpdatePRFailsClosedWithoutIdentity.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 9d ago First seen · 36 lines · 38 tokens per session scan A 23689dd07326
gate-worktree-git-safety is a skill published in the GitHub repository kunchenguid/no-mistakes (8,349 stars, last pushed today), licensed MIT. It adds 38 tokens to every session and 1,293 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
prowler-commit
Creates professional git commits following conventional-commits format. Trigger: When creating commits, after completing code changes, when user asks to commit.
gh-auth-isolation
Safely manage multiple GitHub identities (EMU + personal) in agent workflows.
comet-github
A routing guide for Comet-related GitHub work. It directs requests about pull requests, issues, CI failures, ideas, and fixes to the appropriate review or implementation process.
github-skill
Work with GitHub via the gh CLI — clone repositories, create/list/merge pull requests, create/list issues, and run any other gh command (API calls, workflow runs, releases, repo administration). List operations return parsed JSON.
re0-merge
Review and land an external contribution the way this suite does: gate it against the thesis, land it with the author's credit intact, complete a new skill rather than merging it raw, then approve, credit, and explain before closing. Use when reviewing a pull request, as any collaborator or maintainer, not only the…
codex-autoresearch
Run autonomous, measurable experiments in a Git repository: change one hypothesis, verify a numeric metric, keep improvements, and revert failures. Use when the user wants Codex to keep iterating toward a numeric target in the foreground or as a detached background run. Do not use for ordinary one-shot coding…