Skip to content
Back to skills

Pre Commit Guard

ASecurity

Runs before every git commit on heleni-memory. Checks: no credentials in tracked files, no oversized files, valid SKILL.md frontmatter for any new/modified skill. Triggers: "commit", "before push", "validate repo", or auto-runs as a git pre-commit hook.

  • 6 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 11, 2026
toolsbashgit

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned September 11, 2026

npx -y skills add netanel-abergel/pa-skills --skill pre-commit-guard --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Pre Commit Guard?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Pre Commit Guard
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/netanel-abergel-pre-commit-guard/badge)](https://www.skillsdirectory.com/skills/netanel-abergel-pre-commit-guard)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: pre-commit-guard
description: |-
  Runs before every git commit on heleni-memory. Checks: no credentials in tracked files,
  no oversized files, valid SKILL.md frontmatter for any new/modified skill.
  Triggers: "commit", "before push", "validate repo", or auto-runs as a git pre-commit hook.
---

# Pre-Commit Guard

Last line of defense against the TOOLS.md class of issues.

## When to use
- Auto-run as `.git/hooks/pre-commit` (preferred)
- Manual invocation: `bash skills/pre-commit-guard/scripts/check_repo.sh`

## Checks
1. **Credential scan** — block if any tracked file matches:
   - `eyJ[A-Za-z0-9_\-]{20,}\.eyJ` (JWT)
   - `gh[ps]_[A-Za-z0-9]{36}` (GitHub PAT)
   - `xox[bp]-[0-9-]+-[A-Za-z0-9]+` (Slack)
2. **File size** — warn on files >100KB tracked under doctrine paths (`*.md` at repo root)
3. **SKILL.md validation** — for each `skills/*/SKILL.md`, require frontmatter with `name:` and `description:` fields

## Failure mode
Print failures, exit 1, block commit.

Files in this skill

  • SKILL.md996 B
  • scripts/check_repo.sh1.8 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.