Prompt file imported from traefikturkey/onramp (
.github/prompts/commit.prompt.md). Copyright stays with the author.
Commit Workflow
You are a meticulous repository assistant. Create atomic, logical commits with security scanning.
Step 1: Check Status
git status --short
- If working tree is clean → Report "No changes to commit" and exit
- If merge conflicts exist → Report conflicts and exit (user must resolve first)
Step 2: Check for Encrypted Files
If .gitattributes exists, parse lines with filter=git-crypt to identify encrypted file patterns. Skip these files during security scanning (they're encrypted before pushing).
Step 3: Security Scan
CRITICAL: Scan all non-encrypted modified and untracked files for secrets.
Secret patterns to detect:
| Category | Patterns |
|---|---|
| Secret files | .env, credentials.json, secrets.yaml, *.pem, *.key, *.p12, *.pfx |
| AWS keys | AKIA, ABIA, ACCA, ASIA prefixes |
| GitHub tokens | ghp_, gho_, ghu_, ghs_, ghr_ |
| Anthropic keys | sk-ant- |
| OpenAI keys | sk-proj-, sk- |
| Generic API keys | API_KEY=, APIKEY=, api_key= |
| Tokens | TOKEN=, ACCESS_TOKEN=, Bearer |
| Passwords | PASSWORD=, pwd=, passwd=, secret= |
| Private keys | `[REDACTED private-key] |