Skip to content
Back to skills

Commit

ASecurity

Use when the user asks to commit changes (interactively, not inside an autonomous cycle). Runs code-simplifier + one reviewer (general code-reviewer OR the matching language reviewer, ECC agents/skills), then lint + targeted tests via `evolve commit-gate run`, writes a tree-SHA-bound attestation, commits + pushes via the sanctioned `evolve ship --class manual` path (which hard-verifies the attestation), then watches GitHub CI with one auto-fix-on-red pass.

  • 5 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 3, 2026
developmenttypescriptpythonrustgobashcode-reviewgitsecurity

Security analysis

A100/100

Scanned October 6, 2026

npx -y skills add mickeyyaya/evolve-loop --skill commit --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Commit?

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

Security grade badge for Commit
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/mickeyyaya-commit/badge)](https://www.skillsdirectory.com/skills/mickeyyaya-commit)

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: commit
description: Use when the user asks to commit changes (interactively, not inside an autonomous cycle). Runs code-simplifier + one reviewer (general code-reviewer OR the matching language reviewer, ECC agents/skills), then lint + targeted tests via `evolve commit-gate run`, writes a tree-SHA-bound attestation, commits + pushes via the sanctioned `evolve ship --class manual` path (which hard-verifies the attestation), then watches GitHub CI with one auto-fix-on-red pass.
argument-hint: "<commit message>"
---

# /evo:commit

> Gated interactive commit. A commit only lands if simplify → review → lint → targeted-test all pass; the gate writes `.commit-gate/attestation.json` bound to `sha256(git diff HEAD)`. The commit goes through `evolve ship --class manual`, which **hard-verifies that attestation at this repo's real commit chokepoint** — ship-gate forbids bare `git commit`, and ship commits internally, so this Go-side check (`go/internal/phases/ship/commitgate.go`) is the single enforcement point. This skill is the intelligent driver — the gate itself is `evolve commit-gate run` (Go; `go/internal/commitgate/`).

## Procedure

Follow in order. **Do not edit any file between step 4 and step 5** — that would make the attestation stale and ship will refuse.

1. **Stage everything**: `git add -A`. The sanctioned commit path (`evolve ship --class manual`) commits the whole working tree, so this is an all-or-nothing commit (not a partial one). Staging now also lets new files be reviewed and bound into the attestation.
2. **Detect changed languages**: `git diff --name-only HEAD`, then map extensions (`.go`→go, `.py`→python, `.ts/.tsx/.js/.jsx`→ts, `.rs`→rust).
3. **Review chain** — invoke via the **Agent tool** on the staged diff. Apply every CRITICAL/HIGH finding, re-stage (`git add -A`), and re-run until clean. Record the names you actually ran. Two reviewers are required, except for a proven comment removal (see the contract below):
   | # | Agent (or skill) | Covers |
   |---|---|---|
   | a | **simplify**: `code-simplifier` (or `ecc:code-simplifier`) | clarity, dead code, simplification |
   | b | **one review**: the matching language reviewer (`go-reviewer` / `python-reviewer` / `typescript-reviewer` / `rust-reviewer`) **OR** the general `code-reviewer` / `/code-review` — pick **one** | correctness, security, semantics |

   Prefer the language reviewer when there's a clear primary language (richer); use the general `code-reviewer` for mixed/other languages. The combined `evo:code-review-simplify` skill satisfies **both a and b** in a single pass.
4. **Scan for secrets, then run the gate**: first `"$CLAUDE_PROJECT_DIR/go/bin/evolve" scan secrets --staged`, then `"$CLAUDE_PROJECT_DIR/go/bin/evolve" commit-gate run --reviewers "<comma-list of what you ran>"`.
   - The scan is read-only and deterministic: it checks the staged diff's added lines and prints each finding as `<file>:<line>: <rule>: <masked match>` (raw secrets are never printed). **exit 0** → run the gate; **exit 1** → remove the secret, re-stage, return to step 3; **exit 2** → git failed (not a repo, bad revision); stop and report.
   - This is the gate (Go; `go/internal/commitgate/`): lang-detect, the `--reviewers` precondition, the lint lanes, and the tree-SHA-bound attestation. (The original bash runner was deleted once a differential-parity test proved the two byte-identical; a Go-only golden test now pins the attestation byte layout.)
   - **exit 0** → attestation written; proceed immediately to step 5 (no edits in between).
   - **exit 1** → reviewer-precondition or lint/test failure, or nothing staged (read stderr). Fix, re-stage, return to step 3 for the affected files.
   - **exit 2** → git/SHA fatal (not a repo, `git diff HEAD` failed). Stop and report.
   - **exit 3** → a required tool is missing/could not be installed; surface the printed manual install command to the user and stop.
5. **Commit + push** via the sanctioned path (handles both, on the current branch):
   ```bash
   "$CLAUDE_PROJECT_DIR/go/bin/evolve" ship --class manual "<message>"
   ```
   - `--class manual` re-stages (`git add -A`, a no-op after step 1), **verifies the commit-gate attestation matches the staged tree** (the Go-side hard gate), commits to the current branch, and pushes `origin/<branch>`.
   - **Non-TTY agents** (LLM invocations): the command will fail with a non-TTY error that includes the exact IPC auto-confirm env var to set. Set it before re-running. The signal name comes from `envShipAutoConfirm` in `go/internal/phases/ship/verify.go`.
   - If it refuses with *"stale"* or *"missing … attestation"* → a file changed after step 4; return to step 3.
6. **Watch CI** (skip with a clear note if `gh` is absent or the repo has no workflows):
   - `evolve ci watch --sha "$(git rev-parse HEAD)"` on main (a red files one fix-forward inbox item), or `evolve ci watch --pr <n>` on a PR branch (files nothing). Exit 0 = green, 1 = red (the output carries the `ci classify` verdict), 2 = the run could not be observed (gh failure or the `ci_watch.timeout_s` policy timeout).
   - **green** → done; report the run URL.
   - **red** → perform **one** auto-fix pass: read the printed classify table (or `gh run view --log-failed`) → fix → repeat steps 1–5 as a **new commit** (never force-push). Re-watch once. If still red, **stop and report** the failing job + logs for the user to decide.

## The `--reviewers` contract

The runner refuses to write an attestation unless `--reviewers` declares, by capability:
- a **simplify** reviewer (`code-simplifier` / `code-review-simplify` / `refactor`), AND
- **one review** reviewer — either the general `code-reviewer` / `code-review`, or the matching `<lang>-reviewer` for a changed language (`go-reviewer`, `python-reviewer`, `typescript-reviewer`, `rust-reviewer`). Only one is needed.

Namespace prefixes are stripped, so `ecc:go-reviewer` counts as `go-reviewer`. Pass the names you genuinely ran — fabricating the list to skip review is a CLAUDE.md Rule 9/12 violation.

**A proven comment removal needs no reviewer.** The runner checks this itself. At least one changed Go file must be comment-only against `HEAD`, by the same check as `commentaudit verify`. Every other changed file must be a regular Markdown file under `docs/`. When both hold, pass `--reviewers ""`. The attestation records no reviewer and `review_waiver: "comment-only"`, so the commit carries a `Review-waived: comment-only` trailer instead of `Reviewed-by:`. A code or test change, a rename, a symlink, a deletion, a `testdata/` fixture or a docs-only change still needs both reviewers (for docs-only, one `code-review-simplify` pass covers both) ([code comments](../../docs/conventions/code-comments.md)).

**A removed history comment must be recorded.** When the change removes a comment group that carries history (a cycle, wave, batch or round number, a date, a PR number, a SHA, an incident), the runner refuses it until the change adds the group to its package's page under `docs/history/code-comments/`. Run the command the refusal names, stage the pages it writes, and re-run the gate. The archive only grows: a change that deletes or rewrites an archive page (other than the generated `README.md` index) is refused, even when it is a waived comment removal.

## When NOT to use this skill

- **Inside an autonomous evolve-loop cycle.** Cycle commits use `evolve ship --class cycle` (audit-binding); only `--class manual` requires the commit-gate attestation, so cycles are exempt by construction. Use the cycle pipeline there.
- **Releases / version bumps.** Use `/evo:publish` (or `/evo:release` to gate readiness first).

## Emergency bypass

`evolve ship --class manual --bypass-commit-gate` skips the attestation check. Routine bypassing is a CLAUDE.md violation; use only when the gate itself is broken.

## Portability note

The attestation format (`.commit-gate/attestation.json` bound to `sha256(git diff HEAD)`) is self-contained. In **this** repo the gate is `evolve commit-gate run` (Go) and enforcement lives in `evolve ship --class manual` because ship-gate already forbids bare `git commit`. To vendor the gate into a repo with no ship-gate, add a thin PreToolUse hook that re-checks `.commit-gate/attestation.json` against `sha256(git diff HEAD)` on bare `git commit` — the attestation is just JSON, so the check needs no `evolve` binary even though producing it does.

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.