Saltar al contenido
Skillpedia
Deploy y nube (DevOps)139 mil · #705

guard

Qué hace

Esta skill activa dos comprobaciones de seguridad a la vez: avisos para los comandos arriesgados y un límite sobre en qué carpeta se pueden cambiar archivos. Es para quien quiere una red de seguridad sólida mientras trabaja un agente.

Cuándo usarla

  • ✓Cuando quieres la máxima protección mientras un agente trabaja en tu proyecto.
  • ✓Cuando quieres avisos de comandos destructivos y un límite de carpeta al mismo tiempo.
  • ✓Cuando encargas una tarea a un agente en un proyecto importante y no puedes permitirte errores.

Link de la skill

https://github.com/garrytan/gstack/blob/main/guard/SKILL.md

Cópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.

Cómo usar

La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.

Mensaje listo para pegar

Usa esta skill para ayudarme: https://github.com/garrytan/gstack/blob/main/guard/SKILL.md Lee el archivo SKILL.md de ese link y sigue sus instrucciones en mi tarea.
¿Quieres que tu IA encuentre skills como esta por sí sola?Instala el MCP gratis de Skillpedia: una línea, y busca entre 15.000+ skills antes de cada tarea.Instalar en 1 minuto →

Ejemplo de qué pedirle a la IA

“Activa el modo de seguridad máxima y mantén todas las ediciones dentro de la carpeta src. Avísame antes de cualquier cosa destructiva.”

5 skills nuevas por semana. 1 minuto de lectura.

Cómo funciona

Eliges una carpeta, y la skill combina los avisos de comandos con el límite de carpeta. Las ediciones fuera de la carpeta se bloquean, y los comandos arriesgados disparan un aviso.

Contenido técnico (SKILL.md original)

Texto original del autor, en inglés, directo de GitHub.

<!-- AUTO-GENERATED from SKILL.md.tmpl — do not edit directly --> <!-- Regenerate: bun run gen:skill-docs -->

/guard — Full Safety Mode

Activates both destructive command warnings and directory-scoped edit restrictions. This is the combination of /careful + /freeze in a single command.

Dependency note: This skill references hook scripts from the sibling /careful and /freeze skill directories. Both must be installed (they are installed together by the gstack setup script).

GSTACK_STATE_ROOT=$(~/.claude/skills/gstack/bin/gstack-paths --get GSTACK_STATE_ROOT); : "${GSTACK_STATE_ROOT:?gstack-paths failed; reinstall with ./setup or /gstack-upgrade}"
mkdir -p "$GSTACK_STATE_ROOT"/analytics
echo '{"skill":"guard","ts":"'$(date -u +%Y-%m-%dT%H:%M:%SZ)'","repo":"'$(basename "$(git rev-parse --show-toplevel 2>/dev/null)" 2>/dev/null || echo "unknown")'"}'  >> "$GSTACK_STATE_ROOT"/analytics/skill-usage.jsonl 2>/dev/null || true

Setup

Ask the user which directory to restrict edits to. Use AskUserQuestion:

  • Question: "Guard mode: which directory should edits be restricted to? Destructive command warnings are always on. Files outside the chosen path will be blocked from editing."
  • Text input (not multiple choice) — the user types a path.

Once the user provides a directory path:

Set the user-selected boundary with the shared writer, which resolves a physical absolute path and serializes replacement with investigation cleanup:

bash "$HOME/.claude/skills/gstack/freeze/bin/freeze-state.sh" set "<user-provided-path>"

On helper failure, do not claim the boundary is active. Preserve the state and report recovery; never bypass the shared writer with a direct write or deletion.

Tell the user:

  • "Guard mode active. Two protections are now running:"
  • "1. Destructive command guard — rm -rf, DROP TABLE, force-push, etc. warn before executing (overridable); catastrophic shapes (recursive delete of / or ~, force-push to the default branch) are hard-denied"
  • "2. Edit boundary — file edits restricted to <path>/. Edits outside this directory are blocked."
  • "To remove the persistent edit boundary, run /unfreeze. Ending the session stops its hooks but does not delete that boundary."

What's protected

See /careful for the full list of destructive command patterns and safe exceptions. See /freeze for how edit boundary enforcement works.

Preguntas frecuentes

¿Qué incluye el modo de seguridad máxima?

Avisos por comandos destructivos, más un bloqueo de las ediciones fuera de la carpeta que elijas.

¿Los avisos están siempre activos?

Sí. La descripción dice que en este modo los avisos de comandos destructivos siempre están activos.

¿Necesita otras skills instaladas?

Sí. Usa scripts de hooks de dos skills hermanas, que se instalan juntas.

Detalles

Descripción original del autor

Full safety mode: destructive command warnings + directory-scoped edits. (gstack)

repo: garrytan/gstack

Popularidad

Estrellas en GitHub
139 mil
Posición en el ranking
#705
Licencia
MIT
Actualizada
2/11/2026

¿Te sirve esta skill?

0

Entra para votar.

Comentarios

  • …

Más skills de este repositorio

Skills parecidas