Git Hygiene Enforcer

🌐Community
by patricio0312rev · vlatest · Repository

Automatically cleans up messy Git repositories by removing unused files, branches, and tags.

Install on your platform

We auto-selected Claude Code based on this skill’s supported platforms.

1

Run in terminal (recommended)

terminal
claude mcp add git-hygiene-enforcer npx -- -y @trustedskills/git-hygiene-enforcer
2

Or manually add to ~/.claude/settings.json

~/.claude/settings.json
{
  "mcpServers": {
    "git-hygiene-enforcer": {
      "command": "npx",
      "args": [
        "-y",
        "@trustedskills/git-hygiene-enforcer"
      ]
    }
  }
}

Requires Claude Code (claude CLI). Run claude --version to verify your install.

About This Skill

What it does

The Git Hygiene Enforcer skill helps teams maintain consistent and high-quality Git practices. It enforces conventions for commit formatting (using Conventional Commits), sets up commit hooks to validate commits, defines rules for branch naming and protection, standardizes pull request descriptions with templates, and automates checks using workflows like GitHub Actions or GitLab CI. This ensures a cleaner and more organized Git repository history.

When to use it

  • When your team needs standardized commit messages following the Conventional Commits format.
  • To enforce consistent branch naming conventions across all projects.
  • For automating code quality checks and ensuring adherence to Git best practices.
  • To streamline pull request workflows with pre-defined templates.
  • When you want to improve overall repository hygiene and reduce errors related to Git usage.

Key capabilities

  • Commit Formatting: Enforces Conventional Commits format (e.g., feat(auth): add OAuth2 login).
  • Commit Hooks: Uses Husky + Commitlint or pre-commit for automated commit validation.
  • Branch Naming Conventions: Defines and enforces branch naming patterns (e.g., feature/AUTH-123-oauth-login).
  • Branch Protection Rules: Configures rules like requiring PR reviews, status checks, and linear history.
  • Pull Request Templates: Creates standardized pull request description templates.
  • Automated Workflows: Integrates with GitHub Actions or GitLab CI for automated checks.

Example prompts

  • "Enforce Conventional Commits format on all commits."
  • "Set up a commit hook to validate commit messages against the defined conventions."
  • "Create a pull request template with sections for description and related issue."
  • "Define a branch naming convention of <type>/<ticket-id>-<description>."

Tips & gotchas

  • Requires familiarity with Git concepts like branches, commits, and hooks.
  • Setting up commit hooks might require adjustments to existing development workflows.
  • The skill relies on external tools like Husky, Commitlint, and GitHub Actions/GitLab CI for full functionality.

Tags

🛡️

TrustedSkills Verification

Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.

Security Audits

Gen Agent Trust HubPass
SocketPass
SnykPass

Details

Version
vlatest
License
Author
patricio0312rev
Installs
32

🌐 Community

Passed automated security scans.