commit-history-audit — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited commit-history-audit (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Catch commit hygiene problems before a PR reviewer does. Writing a good commit is covered by commit-message; this skill audits what's already on the branch — the full history from the point it diverged from the base branch — and produces a compliance report with specific remediation steps.
Convention detection is self-calibrating: the skill reads the repo's own commit history to determine what standards are in use before checking anything. It never imposes Conventional Commits on a repo that doesn't already use it.
# Identify the base branch (try common names in order)
git remote show origin 2>/dev/null | grep "HEAD branch" | awk '{print $NF}'
# Fallback: check for main, master, develop
git branch -r | grep -E "origin/(main|master|develop)" | head -1# Find commits on this branch not on the base branch
git log --oneline main..HEAD # replace 'main' with the detected base branchIf the branch has no divergence (is at HEAD of base), say so and stop — nothing to audit.
git log main..HEAD \
--pretty=format:"%H|%s|%an|%ae|%ai|%P" \
--no-mergesAlso collect any merge commits separately:
git log main..HEAD --merges --onelineBefore checking anything, read the base branch history to understand what this repo actually does:
git log origin/main -50 --pretty=format:"%s" 2>/dev/null | head -50Classify the repo into one of three modes:
| Mode | Signal | What to enforce |
|---|---|---|
| Conventional Commits | ≥40% of recent base commits match type: or type(scope): pattern | All CC rules apply |
| Ticket-prefixed | ≥30% of recent base commits start with [JIRA-123], #42, or similar | Ticket ref rules apply; CC rules do not |
| Free-form | Neither pattern detected | Only universal hygiene rules apply (WIP, length, merge commits) |
Record the detected mode and state it at the top of the audit report.
For every commit (excluding merge commits for rules 1–4, analysing merges in rule 5):
#### Rule 1 — Commit convention compliance (conditional on detected mode)
Conventional Commits mode only:
Subject must match: ^(feat|fix|refactor|docs|test|chore|perf|style|ci|build|revert)(\(.+\))?: .+
Flag: subject does not match — label [NO-CONVENTION]
Ticket-prefixed mode only:
Subject must start with a ticket reference matching the detected pattern (e.g. PROJ-123, #42).
Flag: subject has no ticket reference — label [NO-TICKET]
Free-form mode: Rule 1 does not apply. Skip it.
#### Rule 2 — Subject line length
Subject ≤ 72 characters. Applies in all modes.
Flag: exceeds limit — label [TOO-LONG] with current character count
#### Rule 3 — Imperative mood (heuristic)
Subject must not start with a past-tense or gerund verb. Applies in all modes.
Common violations: starts with "added", "adding", "fixed", "fixing", "updated", "updating", "changed", "changing", "removed", "removing"
Flag: detected past/gerund — label [PAST-TENSE]
#### Rule 4 — WIP / draft commits
Subject contains: wip, WIP, fixup!, squash!, temp, tmp, do not merge, dnm. Applies in all modes.
Flag — label [WIP]
#### Rule 5 — Merge commits (squash/rebase repos only)
Check the base branch merge style:
git log origin/main -20 --merges --onelineIf base branch has zero merge commits → repo uses squash or rebase strategy.
Flag any merge commit on the branch — label [MERGE-COMMIT]. Skip this rule if the base branch itself contains merge commits (the repo allows them).
#### Rule 6 — Single-purpose signal (advisory only, all modes)
If the branch touches clearly unrelated concerns across commits (e.g. UI changes mixed with database migrations), note this as a signal for the reviewer. Not a violation — never produces a flag in the table.
Output a structured report in this format:
## Commit History Audit — <branch-name>
Convention mode detected: Conventional Commits | Ticket-prefixed (PROJ-NNN) | Free-form
Base branch: <main|master|develop>
Commits audited: <N>
Merge commits found: <N>
### Results
| # | Short SHA | Subject | Issues |
|---|-----------|---------|--------|
| 1 | abc1234 | feat: add login page | ✅ |
| 2 | def5678 | Added user model | [NO-CONVENTION] [PAST-TENSE] |
| 3 | ghi9012 | wip fixes | [WIP] [NO-CONVENTION] |
### Violations Summary
**[NO-CONVENTION]** — 2 commits
**[PAST-TENSE]** — 1 commit
**[WIP]** — 1 commit
### Compliance Score
X / N commits clean → <PASS | NEEDS CLEANUP>
Pass threshold: all commits must be violation-free for a PASS.
### Remediation
For each violation, provide the specific fix:
**def5678 — "Added user model"**
Suggested rewrite: `feat(auth): add user model`
To amend: `git rebase -i main` and reword this commit.
**ghi9012 — "wip fixes"**
This commit should be squashed into its predecessor or given a meaningful message.
To squash: `git rebase -i main` and mark this commit `squash` or `fixup`.After the report, ask:
"Would you like me to generate the interactive rebase commands to fix these, or open the PR as-is with a note about the history?"
Do not run git rebase automatically — that is a destructive operation requiring user confirmation.
--all to audit further back."[bot] or noreply) are excluded from the audit.pre-commit-check (which audits staged changes before a single commit) and pr-summary (which creates the PR after history is clean).~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.