agentleFS
rubenmarcusrubenmarcus/agent-skills/skills/git-quality-hooks/SKILL.md

git-quality-hooks

Skill2 starsChanged 12 days agoMITView on GitHub

Add or repair local Git hooks for staged secret scanning and project-specific quality checks without overwriting existing workflows. Use for pre-commit, commit-msg, pre-push, or a requested local gate before sharing code.

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 7 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Put fast mechanical checks at the appropriate Git boundary.

    line 8
  2. Distinctive:

    Check the repository, branch, status, core.hooksPath, existing hooks, package scripts, and any hook manager.

    line 12
  3. Distinctive:

    Commit-msg: the project's actual message contract, if one exists.

    line 19
  4. Distinctive:

    Check the staged snapshot when the contract concerns the commit.

    line 22
  5. Distinctive:

    Use the pre-commit example for gitleaks only when that tool and command fit the environment.

    line 24
  6. Distinctive:

    Use an isolated fixture to check passing input, a failing scanner exit, and an unavailable scanner.

    line 30
  7. Distinctive:

    Document setup, dependencies, and which behavior each hook checks.

    line 32

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Git quality hooks

Put fast mechanical checks at the appropriate Git boundary. Preserve existing hook managers and team requirements.

Inspect the installation

Check the repository, branch, status, core.hooksPath, existing hooks, package scripts, and any hook manager. Determine whether the user requested advice or installation.

A collection's hook example must not activate merely because the skill is installed. Integrate only when hook configuration is part of the task.

Place checks deliberately

  • Pre-commit: staged-secret scanning and fast checks of staged content.
  • Commit-msg: the project's actual message contract, if one exists.
  • Pre-push: broader project verification before transferring changes.

Check the staged snapshot when the contract concerns the commit. Running a working-tree formatter does not establish what the staged version contains.

Use the pre-commit example for gitleaks only when that tool and command fit the environment. It redacts findings and fails if the scanner is unavailable. Compose it with existing hooks; do not overwrite or bypass their checks.

Choose any size or timing limits from project conventions. Do not carry one project's arbitrary numbers into another repository.

Verify and explain

Use an isolated fixture to check passing input, a failing scanner exit, and an unavailable scanner. Use synthetic data only. Preserve exit codes through wrappers and pipelines.

Document setup, dependencies, and which behavior each hook checks. Local hooks are not automatically active in every clone; use CI for the contracts the team requires remotely.

A hook can enforce mechanical checks. Independent review still needs an actual reviewer and evidence at the revision being shared.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.