ClaudeCodeMod

All shelves / Mods / Safety

public-repo-guard

By Szotasz

public-repo-guard is a Claude Code safety mod by Szotasz.

Asks in a popup before a push to a public GitHub repo, or before one goes public, when outgoing commits hold keys, emails, local paths, or private repo names.

DrawsHolds a command

Install

The marketplace name is claude-mods.

In your shell
claude plugin marketplace add Szotasz/claude-mods
claude plugin install public-repo-guard@claude-mods
Open the repo

It runs inside the Claude Code process. The side panel is only what the author's README names. Read the repo before you install, or run claude plugin validate on the plugin folder.

Version
0.1.0
Repo stars
6
Last change
2026-10-07

What it can reach

  • Draws in the session
  • Holds a command
  • Sees tool calls
  • Calls another program on this machine

The plugin's own page is the Hungarian section of the root README. The author says it needs Claude Code around 2.1.289 and the gh CLI signed in. It scans commits not yet on the remote, the message and the added lines, for Supabase project IDs, keys, emails, local /Users/ paths, private repo names from gh repo list --visibility private, and .env files, then asks: deny, push anyway, or push and remember. It does nothing on a push to a private repo. /pushor be and /pushor ki turn it on and off.

Demo

The public-repo-guard section on the author's GitHub page, in Hungarian
Screenshot of the author's GitHub page.

What it hooks into

  • session.startWhen a session starts
  • command.runWhen you run its slash command/pushor
  • state.setA Claude Code event
  • tool.callAround a tool call, where it can hold oneBash

Read from the on() calls in its hook modules. Open its source under Files to check what each one does.

Slash commands 1

  • /pushor

Files

The author's source, 3 files. They load when you open them.

Facts

Author
Szotasz
Category
Safety
Marketplace
claude-mods
Repo
Szotasz/claude-mods
Folder
plugins/public-repo-guard
Version
0.1.0
Repo stars
6
Last change
2026-10-07
Language
TypeScript
Files
6

Other mods in Safety

agentic-qe-fleetproffesor-for-testingHolds a commandHolds a command that would delete or overwrite .agentic-qe learning data, and toasts when the guard is set to notify.secrets-guardBioInfoHolds a commandDenies writes of secret files and credential-shaped content, and Bash that would print those secrets.wp-credential-guardnathanonnHolds a commandMasks a WordPress username and application password, refuses a slash command that carries one, and denies Bash when a placeholder is unknown.cockpittsergeytovarovHolds a commandDraws context weather and the plan limits above the prompt, and can stop a dangerous command.taxi-speedcamdevbrother2024Holds a commandStops a risky shell command and asks before it runs, shown as a taxi speed camera.guardrails-mdberget-aiHolds a commandSends each Bash command to a Berget AI scoring model and blocks it when the score says it destroys data, leaks a secret, or breaks your GUARDRAILS.md.pdpa-thaiBoom-VittHolds a commandRefuses a tool call that repeats a placeholder for Thai or other personal data it redacted before sending, and masks that data on screen.subagent-fenceerikdarlingdataHolds a commandRefuses a force-push, a push to a protected branch, a git command that skips hooks, and killing a process by name.launch-codesOneWave-AIHolds a commandHolds a dangerous shell command until you type a one-time code and press LAUNCH, and denies it otherwise.dogmaMarcel-BichHolds a commandRuns, asks about, or blocks git commands and deletes by your DOGMA-PERMISSIONS.md, always denies deleting a protected path, and draws the restricting rules.guard-packatretyak1985Holds a commandHolds file tools and shell moves that leave the project's roots, asks before a production deploy, and redacts secrets in a tool result before Claude reads it.supabase-guardSzotaszHolds a commandAsks before a Supabase write aimed at another project, or a destructive call, and stops the call when you refuse.
All 73 in Safety