What is RepoGuards?
RepoGuards is an open-source Claude Code plugin for developers and teams working across multiple Git repositories. Its hooks inspect commands and file writes as the agent makes tool calls, blocking selected risky actions and providing information about other repositories when the agent reaches into them. It also includes a session-aware tool for reviewing and committing work across repositories, plus a registry for projects and skill tracks. It is built for Claude Code and tested only there, and requires Git and Python 3.9 or later.
RepoGuards Features:
Cross-Repo Checks: Hooks inspect commands aimed at repositories outside the session's current directory before those commands run.
Foreign Repo State: For allowed cross-repository writes, RepoGuards can attach the other repository's branch, open changes, and count of commits waiting to be pushed.
Action Blocks: The guards refuse sweeping commands such as add . or commit -a in a foreign repository, and block pushes to foreign repositories while showing what the push would publish.
Ownership Rules: Projects can declare owned paths in .claude/owns.json, and hooks refuse edits to those paths from outside the owning repository.
Session-Aware Closing: The close.py tool reports changes and unpushed commits across touched repositories, and its --commit option stages only still-dirty paths named by writing tools in that session.
Turn-End Reports: A hook reports work left uncommitted in another repository at the end of a turn, so unfinished changes are visible to the agent.
Project Registry: A central registry tracks projects and their allowed skill tracks, which determine which tracks load in each project.
RepoGuards Benefits:
Safer Shared Work: Changes left by collaborators or parallel sessions are less likely to be swept into an agent's commit without their work being noticed.
Clearer Push Decisions: Seeing the branch and pending commits helps a developer review what is at stake before publishing changes from a separate repository.
Fewer Forgotten Changes: End-of-turn reporting makes cross-repository work easier to spot when a session appears complete in its main project.
More Precise Commits: Restricting automated staging to paths written in the current session helps keep commits focused on that session's work.
Consistent Boundaries: Declared path ownership gives teams a way to make repository responsibilities explicit rather than relying on an agent to infer them.
Use Cases:
Cross-Repo Releases: Use it when preparing a release that requires coordinated edits to an application repository, a data repository, and a website.
Parallel Development: Use it when an agent works alongside another developer or session and may encounter uncommitted changes in a neighboring repository.
Reviewing a Push: Use it when an agent needs to update another repository but should not publish its branch without a developer reviewing the pending commits.
Protected Project Files: Use ownership declarations when a project maintains specific files that agents working from other repositories must not edit.
Multi-Project Sessions: Use the closing tool after an agent has changed several repositories to review what remains open and stage only the session's eligible paths.
Project-Specific Skills: Use the registry to configure which skill tracks load in different projects, such as keeping platform-specific deployment commands with the relevant project.

