Skills Agentes

Freeze

Restringe las ediciones de archivos a un directorio específico durante la sesión (gstack).

Solicitabashreadaskuserquestion
Estrellas
129k

en todo el repo

Actividad
63

0–100, la ruta de este skill

Actualizado
hace 5 días

último commit aquí

Commits
4

últimos 90 días

Contexto
947 tok

17 tok en reposo

Paquete
3 archivos

13 KB

Instalar

Funciona con cualquier agente que lea SKILL.md

npx -y skills add garrytan/gstack --skill freeze --agent claude-code

Se instala solo en este repositorio.

Este skill runs shell commands, reads environment config.

Qué hace

  • Instala hooks PreToolUse en Edit y Write que bloquean cualquier edición fuera de un directorio permitido
  • Pide al usuario mediante AskUserQuestion qué directorio restringir y lo guarda en un archivo de estado de sesión
  • Resuelve la ruta a absoluta, añade barra final y compara cada file_path contra ese límite, denegando por defecto si no puede parsear
  • Resuelve symlinks por su componente final para evitar que apunten fuera del límite

Úsalo cuando

  • Al depurar, para evitar 'arreglar' accidentalmente código no relacionado
  • Cuando quieres acotar los cambios a un solo módulo
  • Cuando te piden 'freeze', 'restrict edits', 'only edit this folder' o 'lock down edits'

No lo uses cuando

    Qué lo activa

    Di cualquiera de estas frases y el agente debería cargar este skill.

    • Restringe las ediciones a la carpeta src/
    • Congela los cambios solo en este módulo
    • Bloquea la edición fuera de esta carpeta durante la sesión

    SKILL.md

    En inglés

    When to invoke this skill

    Blocks Edit and Write outside the allowed path. Use when debugging to prevent accidentally "fixing" unrelated code, or when you want to scope changes to one module. Use when asked to "freeze", "restrict edits", "only edit this folder", or "lock down edits".

    /freeze — Restrict Edits to a Directory

    Lock file edits to a specific directory. Any Edit or Write operation targeting a file outside the allowed path will be blocked (not just warned).

    mkdir -p ~/.gstack/analytics
    echo '{"skill":"freeze","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/analytics/skill-usage.jsonl 2>/dev/null || true
    

    Setup

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

    • Question: "Which directory should I restrict edits to? Files outside this path will be blocked from editing."
    • Text input (not multiple choice) — the user types a path.

    Once the user provides a directory path:

    1. Resolve it to an absolute path:
    FREEZE_DIR=$(cd "<user-provided-path>" 2>/dev/null && pwd)
    echo "$FREEZE_DIR"
    
    1. Ensure trailing slash and save to the freeze state file:
    FREEZE_DIR="${FREEZE_DIR%/}/"
    eval "$(~/.claude/skills/gstack/bin/gstack-paths)"
    STATE_DIR="$GSTACK_STATE_ROOT"
    mkdir -p "$STATE_DIR"
    echo "$FREEZE_DIR" > "$STATE_DIR/freeze-dir.txt"
    echo "Freeze boundary set: $FREEZE_DIR"
    

    Tell the user: "Edits are now restricted to <path>/. Any Edit or Write outside this directory will be blocked. To change the boundary, run /freeze again. To remove it, run /unfreeze or end the session."

    How it works

    The hook reads file_path from the Edit/Write tool input JSON (shared real-JSON extractor with /careful — one copy, sourced by both hooks), then checks whether the path starts with the freeze directory. If not, it returns a hookSpecificOutput payload with permissionDecision: "deny" to block the operation (nested under hookSpecificOutput — Claude Code ignores a top-level permissionDecision).

    Polarity is fail-closed: a tool payload the hook cannot parse is DENIED, not allowed — a boundary that fails open is not a boundary. A payload that parses but has no file_path (a non-file tool) is allowed. Symlinks are resolved through their FINAL component, so an in-boundary symlink pointing outside the boundary is checked against its target.

    The freeze boundary persists for the session via the state file. The hook script reads it on every Edit/Write invocation. Boundaries containing spaces are supported.

    Notes

    • The trailing / on the freeze directory prevents /src from matching /src-old
    • Freeze applies to Edit and Write tools only — Read, Bash, Glob, Grep are unaffected
    • This prevents accidental edits, not a security boundary — Bash commands like sed can still modify files outside the boundary
    • To deactivate, run /unfreeze or end the conversation

    Reproducido de garrytan/gstack bajo licencia MIT. Leer esta página en markdown.

    Archivos

    3 archivos en el paquete. Solo se lee SKILL.md al activarse — las referencias se cargan si el skill decide que las necesita.

    Antes de instalar

    Requiere el script bin/check-freeze.sh y bin/gstack-paths de gstack instalados en ~/.claude/skills/gstack.

    Necesita en el PATH:git

    Variables de entorno:FREEZE_DIRGSTACK_STATE_ROOTSTATE_DIR

    Detalles

    Creador
    garrytan
    Licencia
    MIT
    Recursos incluidos
    Incluye scripts o referencias
    Repositorio
    garrytan/gstack
    Código fuente
    Ver SKILL.md

    Más de garrytan/gstack

    Este repo incluye 59 skills. Si instalas uno, normalmente ya tienes los demás.

    Browse

    129k

    Navegador headless rápido para QA testing y dogfooding de sitios (gstack).

    Costo de contexto al activarse
    14.8k tok
    Tamaño del paquete
    237 archivos
    Última actualización
    hace 7 horas
    Permisos
    testing qa

    Ship

    129k

    Flujo de ship: detecta y fusiona la rama base, corre tests, revisa el diff, sube VERSION, actualiza CHANGELOG, hace commit, push y crea el PR (gstack).

    Costo de contexto al activarse
    22.8k tok
    Tamaño del paquete
    21 archivos
    Última actualización
    anteayer
    Permisos
    devops infraestructura

    Ios Qa

    129k

    QA en dispositivo iOS real para apps SwiftUI, con bucle de agente guiado por visión sobre USB (gstack).

    Costo de contexto al activarse
    15.4k tok
    Tamaño del paquete
    38 archivos
    Última actualización
    anteayer
    Permisos
    testing qa

    Revisión de planes con ojo de diseñador — interactiva, al estilo de las revisiones de CEO e Ingeniería. (gstack)

    Costo de contexto al activarse
    22.8k tok
    Tamaño del paquete
    5 archivos
    Última actualización
    anteayer
    Permisos
    diseno ui

    Revisión de plan en modo gerente de ingeniería: arquitectura, flujo de datos, diagramas, casos límite, cobertura de pruebas y rendimiento. (gstack)

    Costo de contexto al activarse
    17.9k tok
    Tamaño del paquete
    5 archivos
    Última actualización
    anteayer
    Permisos
    herramientas desarrollo

    Actualización de documentación posterior al ship (gstack).

    Costo de contexto al activarse
    14.4k tok
    Tamaño del paquete
    5 archivos
    Última actualización
    anteayer
    Permisos
    documentos

    Skills relacionados

    Úsalo cuando la implementación esté completa, todos los tests pasen, y necesites decidir cómo integrar el trabajo.

    Costo de contexto al activarse
    1.9k tok
    Tamaño del paquete
    1 archivo
    Última actualización
    hace 9 días
    herramientas desarrollo

    Úsalo al empezar trabajo de feature que necesita aislamiento del workspace actual, o antes de ejecutar planes de implementación: asegura un workspace aislado vía herramientas nativas o fallback a git worktree.

    Costo de contexto al activarse
    1.7k tok
    Tamaño del paquete
    1 archivo
    Última actualización
    el mes pasado
    herramientas desarrollo

    Úsala al crear nuevas skills, editar skills existentes o verificar que funcionan antes de desplegarlas.

    Costo de contexto al activarse
    6.6k tok
    Tamaño del paquete
    7 archivos
    Última actualización
    hace 9 días
    herramientas desarrollo