Skip to content
Back to skills

Safety

BSecurity

Non-negotiable safety constraints: destructive action guards, blocked operations, secrets policy, password storage, input validation, and dependency review.

  • 10 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 23, 2026
ai-agentsrustgoshellsqlgitapidatabasesecurity

Works with

  • api

Security analysis

B85/100
  • highPerforms destructive filesystem operations

Pro shows the line behind each finding and how to fix it

Scanned November 23, 2026

npx -y skills add gosha70/code-copilot-team --skill safety --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Safety?

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

Security grade badge for Safety
[![Security: B — Skills Directory](https://www.skillsdirectory.com/api/skills/gosha70-safety/badge)](https://www.skillsdirectory.com/skills/gosha70-safety)

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: safety
description: "Non-negotiable safety constraints: destructive action guards, blocked operations, secrets policy, password storage, input validation, and dependency review."
---

# Agent Safety Rules

Non-negotiable safety constraints for all sessions.

## Confirmation Required Before

- Any destructive command: rm -rf, DROP TABLE, TRUNCATE, git reset --hard, git push --force.
- Any deployment or publish action.
- Any command that modifies production data.
- Any command with side effects outside the working directory.

## Blocked Operations — Stop, Don't Improvise

When the normal path for an operation is blocked (lock files, permission errors, sandbox restrictions), the correct response is to **stop and explain the blockage to the user** — not to improvise a workaround using low-level flags or environment variables.

Specific prohibitions:
- Never set `GIT_INDEX_FILE`, `GIT_DIR`, or other git environment variables to route around lock files or index problems.
- Never use `--no-verify`, `--no-gpg-sign`, or similar flags to bypass pre-commit hooks or signing unless the user explicitly requests it.
- Never bypass sandbox restrictions, file permission checks, or process locks by manipulating environment variables or creating alternate state files.

**Why:** A real incident demonstrated this failure mode — using `GIT_INDEX_FILE` to bypass `.git/index.lock` created a commit with an empty tree that appeared to delete every file in the repository. The copilot pattern-matched "bypass the lock" without reasoning about the consequence (an empty alternate index). The correct move was to explain that the lock file was blocking the commit and ask the user to remove it.

## Published State Is Verified, Not Held

A `PreToolUse` hook sees only the agent's own commands; an external
publisher can push any commit that exists locally. "Held locally" is
advisory, not a boundary.

- Never claim a commit can be kept unpublished.
- Report push status from `git ls-remote`/reflog, not your own log.
- Bind review/merge/closure to an exact SHA; re-read state first.
- Prefer a follow-up commit to an amend on a watched branch.
- Keep every commit review-ready.
- Report PR existence and state from `gh pr list` / `gh pr view`, never from the session's last action: a session reported "no PR" for a branch after the owner had opened one (wiki-studio #78).

Evidence, and the guard not adopted: #291.

## Secrets & Credentials

- Never hard-code API keys, tokens, passwords, or connection strings in source.
- Strip secrets from all output before displaying.
- Never commit .env files or credential files.
- If a secret is found in code, flag it immediately.

## Password Storage

- Never store plain passwords in the database.
- Always hash passwords before storing using bcrypt, argon2, or equivalent.
- Consider passwordless auth (magic links, OAuth, passkeys) to avoid password storage entirely.

## Input Validation

- Validate and sanitize all external inputs at system boundaries.
- Never trust user input for SQL, shell commands, or file paths without sanitization.
- Apply principle of least privilege for service accounts and keys.

## Dependencies

- Keep dependencies updated.
- Review new dependencies before adding (license, maintenance status, security advisories).
- Prefer well-maintained libraries with active communities.

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.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.