بنقرة واحدة
guard
Use before any git commit to check for secrets, security antipatterns, and test breakage
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Use before any git commit to check for secrets, security antipatterns, and test breakage
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Use when the user wants to do a QA session or report multiple bugs — interactive session where bugs are reported conversationally and agents fix them in parallel
Use when executing implementation plans with independent tasks — orchestration pattern for worktree isolation, TDD discipline, and two-stage review. Referenced by execute-plan, fixit, and bugbash.
Use when the user reports a bug or issue that can be fixed without blocking their current work — backgrounds an agent in a worktree to fix and merge back without breaking stride
Use after implementing changes in an OpenSpec project to review implementation against the active change's deltas — auto-fixes confident issues, parks questions for the user
Install the anutron (claude-skills) kit into the current project — symlinks or copies skills, registers hooks, compiles CLAUDE.md from snippets.
Uninstall the anutron (claude-skills) kit from the current project — reverses everything /anutron-install did.
| name | guard |
| description | Use before any git commit to check for secrets, security antipatterns, and test breakage |
| tags | ["quality"] |
Fast safety check before committing. Scans for secrets, security antipatterns, test breakage, and lint issues. Binary pass/fail output.
$ARGUMENTS - Optional: --strict for zero-tolerance mode (warnings also fail)git diff --cached --name-only 2>/dev/null || echo '(not in a git repo)'git diff --name-only 2>/dev/null || echo '(not in a git repo)'find . -maxdepth 1 \( -name go.mod -o -name Gemfile -o -name package.json -o -name Cargo.toml -o -name pyproject.toml \) 2>/dev/null | head -3Run these checks against all staged files (or all changed files if nothing is staged). Be fast -- this is a pre-commit gate, not a full review.
Scan staged/changed files for common files that should not be committed:
.env, .env.* files (environment/secrets)node_modules/ contentsdist/, build/, *.o, *.pyc, __pycache__/).idea/, .vscode/settings.json).DS_Store, Thumbs.db)*.log)credentials.json, *.pem, *.key)Report: WARNING if any found (FAIL in --strict mode).
Scan staged/changed files for:
password\s*=, api_key, secret, token\s*=, Bearer )AKIA, aws_secret_access_key)-----BEGIN.*PRIVATE KEY-----).env files being committedhttps://user:pass@)Report: FAIL if any found, with file and line number.
Scan for common dangerous patterns:
eval() or exec() with variable inputdangerouslySetInnerHTML or equivalentverify: false, VERIFY_NONE)Access-Control-Allow-Origin: *)chmod 777 or world-readable permissions--no-verify or security bypass flags in codeReport: FAIL if any found.
Run a quick test check:
IF project has test framework:
Run tests targeting changed files only (same mapping as /test)
Report: PASS or FAIL with failure details
ELSE:
Report: SKIP (no test framework detected)
Keep this fast -- targeted tests only, not the full suite.
IF go.mod exists: run `revive -set_exit_status ./...` or `go vet ./...`
IF package.json exists: run `npx eslint {changed files}` if eslint is configured
IF Gemfile exists: run `bundle exec rubocop {changed files} --force-exclusion` if rubocop is configured
IF pyproject.toml exists: run `ruff check {changed files}` if ruff is configured
IF Cargo.toml exists: run `cargo clippy -- -D warnings`
ELSE: SKIP
Report: FAIL if lint errors found.
IF --strict mode:
FAIL if ANY check has warnings or failures
ELSE:
FAIL if ANY check has failures (warnings are noted but pass)
Format:
## Guard Check
| Check | Status | Details |
|-------|--------|---------|
| Gitignore | PASS/WARN | {brief or "Clean"} |
| Secrets | PASS/FAIL | {brief or "Clean"} |
| Security | PASS/FAIL | {brief or "Clean"} |
| Tests | PASS/FAIL/SKIP | {brief or "All passing"} |
| Lint | PASS/FAIL/SKIP | {brief or "Clean"} |
**Result: PASS / FAIL**
{If FAIL: list each issue with file and line number}
{If PASS: "Safe to commit."}
Keep the output concise. This should feel like a quick gate check, not a verbose report.