AgentStack
SKILL verified Apache-2.0 Self-run

Prepare Safe Commit

skill-ravisingh11-agent-safe-engineering-prepare-safe-commit · by ravisingh11

Inspect, validate, and prepare a safe Git commit from the staged diff. Use when Codex is asked to commit changes, review staged files before committing, write an evidence-backed commit message, or verify a proposed commit against canonical and repository-specific machine-readable guardrails.

No reviews yet
0 installs
0 views
view→install

Install

$ agentstack add skill-ravisingh11-agent-safe-engineering-prepare-safe-commit

✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

Are you the author of Prepare Safe Commit? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Prepare Safe Commit

Treat the staged diff as the only change source. Load the repository's .ai/guardrails.yaml overlay when present; otherwise use references/commit-policy.yaml.

To calibrate advisory thresholds, run scripts/calibrate_thresholds.py --commits 100. It reports local-history percentiles and suggested p90 values without editing policy.

Workflow

  1. Read the repository instructions and inspect git status --short before changing the index.
  2. Inspect git diff --cached --name-status, git diff --cached --stat, and the complete staged patch.
  3. Stop if the staged set is empty, contains unrelated work, includes another person's changes, or cannot be explained as one outcome.
  4. Record verification using references/evidence-format.md. Use only commands that ran, manual observations that occurred, or explicit not-run reasons.
  5. Write a proposed commit message from the staged diff and captured evidence, never from chat history.
  6. Resolve scripts/check_commit_guardrails.py relative to this installed skill, assign that path to guardrail_checker, and run:

``sh python3 "$guardrail_checker" \ --message-file /path/to/commit-message.txt \ --evidence-file /path/to/verification-evidence.yaml ``

  1. Resolve every required finding. Report advisory findings without silently rewriting scope.
  2. Show the exact staged files, proposed message, verification, and remaining advisories.
  3. Create the commit only when the user requested a commit. Never infer authorization to push.
  4. Re-read the created commit and confirm its files match the reviewed staged set.

Safety Rules

  • Do not stage files merely because they are modified.
  • Do not fabricate, upgrade, or normalize verification results.
  • Do not amend, rebase, force push, or rewrite history unless explicitly requested.
  • Treat failed, blocked, and not-run evidence as truthful records, not proof that a release gate passed.
  • Treat readability size findings as prompts to split, simplify, or explain a change, not as quality scores.

Commit Narrative

Use a specific Conventional Commit subject. Require a body only when the resolved repository policy configures one. Describe outcome and operational consequence rather than listing files.

The YAML policy is canonical when this skill and the policy differ. Keep deterministic rules required and subjective narrative judgment advisory until measured false-positive evidence supports promotion.

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet — be the first.

Versions

  • v0.1.0 Imported from the upstream source.