Home / Claude Code mods / Security / repo-guard

repo-guard

repo-guard is a Claude Code mod by YuehengHan that blocks destructive git commands and asks before Claude first edits a repo other than the session's own.

Updated 2026-10-09

What is repo-guard?

repo-guard is a Claude Code mod by YuehengHan that blocks destructive git commands and asks before Claude first edits a repo other than the session's own. It is listed under Security and has no public popularity data yet.

TypeClaude code mod
AuthorYuehengHan
RepositoryYuehengHan/my-claude-mods
Popularityno public popularity data yet
CategorySecurity
SecurityLow risk (96/100)
Rank#5,224 of 5,272 Claude Code mods; #535 in Security
Last commit2026-10-09
Hooks2 events
Seesevery tool call
Draws onnothing

Is repo-guard safe to install?

repo-guard scores 96/100 on the MCPMods security check: Low risk. No checks raised a concern. It passed 7 of 8 checks.

Mod footprints come from claude plugin validate, which lists every event a mod hooks and every API call it makes without running it.

CheckResult
No network accessPass
Starts no processesPass
Writes no files or configPass
Doesn't read environment variablesPass
Only sees the events it hooksPass
Doesn't drive ClaudePass
Passes claude plugin validatePass
No license detectedNote

API calls in its code

CallWhat it means
$.fs.existsreads files
$.session.cwd
$.ui.toastdraws interface

How do I install repo-guard?

  1. Check your Claude Code version. Mods need Claude Code 2.1.287 or later and are on by default.
    claude --version
  2. Read its footprint. This lists every event it hooks and every API call it makes, without running it.
    git clone https://github.com/YuehengHan/my-claude-mods
    claude plugin validate ./my-claude-mods/plugins/repo-guard
  3. Install it. Run this in your terminal, then /reload-plugins in an open session.
    git clone https://github.com/YuehengHan/my-claude-mods && claude --plugin-dir ./my-claude-mods/plugins/repo-guard

Or ask Claude to set it up

Paste this into Claude Code and it installs repo-guard for you:

Install the "repo-guard" Claude Code mod from https://github.com/YuehengHan/my-claude-mods/tree/main/plugins/repo-guard. Run claude plugin validate on it first and show me what it can access before you enable it.

More from YuehengHan/my-claude-mods

This repository has at least 9 Claude Code mods on MCPMods.

  • claude-mood: Claude's mood in the status line, from what the turn has read, written and broken (High risk)
  • claude-pet: A pet in the status line that levels up with your work, gets dizzy on errors, sleeps when you're away, and unlocks achie (High risk)
  • control-tower: /tower: one pane showing every Claude Code session on this machine — which is working, which waits for you, which is don (High risk)
  • done-ping: When a long turn finishes or Claude needs you: a macOS notification with a distinct sound for done, failed and needs-you (Review before installing)
  • fortune: Programmer jokes after the working spinner, and a daily fortune (/fortune) — 今日宜重构,忌周五上线 (Review before installing)
  • sdk-sync: After an SDK release (v* tag): /release-check gathers what changed and asks Claude for a read-only audit of the sibling (Review before installing)
  • tldr: A one-line TL;DR under every long answer, written by Haiku, so a session you switch back to reads at a glance (Low risk)
  • where-am-i: A band above the prompt: repo, branch, uncommitted changes and this session's task (Low risk)