Install
$ agentstack add skill-ravisingh11-agent-safe-engineering-prepare-safe-commit ✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.
Security review
✓ PassedNo 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.
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
- Read the repository instructions and inspect
git status --shortbefore changing the index. - Inspect
git diff --cached --name-status,git diff --cached --stat, and the complete staged patch. - Stop if the staged set is empty, contains unrelated work, includes another person's changes, or cannot be explained as one outcome.
- Record verification using
references/evidence-format.md. Use only commands that ran, manual observations that occurred, or explicit not-run reasons. - Write a proposed commit message from the staged diff and captured evidence, never from chat history.
- Resolve
scripts/check_commit_guardrails.pyrelative to this installed skill, assign that path toguardrail_checker, and run:
``sh python3 "$guardrail_checker" \ --message-file /path/to/commit-message.txt \ --evidence-file /path/to/verification-evidence.yaml ``
- Resolve every required finding. Report advisory findings without silently rewriting scope.
- Show the exact staged files, proposed message, verification, and remaining advisories.
- Create the commit only when the user requested a commit. Never infer authorization to push.
- 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.
- Author: ravisingh11
- Source: ravisingh11/agent-safe-engineering
- License: Apache-2.0
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.