agentleFS
marcopavezmarcopavez/claude-impact-lab/.claude/skills/commit-window-guard/SKILL.md

commit-window-guard

Skill0 starsChanged 7 months agoMITView on GitHub

Use before any git commit during the sprint. Verifies that current time is within the build window (>= 2026-05-06 00:00 CLT) when the staged diff includes application code (apps/, packages/, prompts/). Documentation-only commits (docs/, RESUMEN/, README.md, .claude/, .gitignore) are allowed before the window opens. Sustains sub-check B3. Triggers - "commit", "git commit", "voy a commitear".

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    No hagas el check más permisivo "porque casi" abre la ventana.

    line 53
  2. Distinctive:

    No bloquees commits de docs.

    line 54
  3. Distinctive:

    No silencies la primera advertencia de "B3 reminder" — es lo que evita que Marco tenga el código pero le falte la evidencia.

    line 55

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Skill — commit-window-guard

Cuándo invocar

Antes de cualquier git commit durante la sprint. Si el commit es solo de docs (cualquier archivo bajo docs/, RESUMEN/, README.md raíz, .claude/, .gitignore, LICENSE), pasa libre. Si el commit incluye código de aplicación y la fecha actual es < 2026-05-06T00:00 CLT, bloqueá.

Procedimiento

  1. Hora actual: capturá Get-Date (PowerShell) o date (bash) en zona local. Pasala a UTC. Comparála con 2026-05-06T00:00:00-04:00 (CLT, UTC-4). En CLST sería UTC-3 — verificá zona del sistema.
  2. Diff staged:
    git diff --cached --name-only
    Capturá la lista.
  3. Clasificación:
    • Doc-only: todos los paths matchean ^(docs/|RESUMEN/|README.md|\.claude/|\.gitignore|LICENSE|.*\.md$).
    • Code-touching: al menos un path no matchea lo anterior — típico: apps/, packages/, prompts/, scripts/, *.ts, *.tsx, *.json config.
  4. Decisión:
    • Doc-only → ✅ pasa, sin output.
    • Code-touching && hora < ventana → 🔴 BLOQUEAR. Output:
      ❌ commit-window-guard: ventana cerrada.
      Hora actual:    {ISO timestamp local}
      Ventana abre:   2026-05-06T00:00:00 CLT
      Tiempo restante: {Xh Ym}
      Archivos código en stage:
        - apps/server/src/twilio-webhook.ts
        - prompts/triage.md
      Permitido fuera de ventana: solo docs/.
      Acción: unstage los archivos de código (`git restore --staged <files>`) o esperá la ventana.
      Exit code 2 si corrés como hook.
    • Code-touching && hora >= ventana → ✅ pasa con un único log: commit-window-guard: ventana abierta — {filecount} archivos código autorizados.
  5. Sub-check B3 reminder: si esta es la PRIMERA invocación del día con code-touching && ventana abierta, recordale a Marco: "Primer commit de código en ventana — verificá que ya tomaste screenshot de los ≥3 mensajes en consola Anthropic para evidencia B3."

Edge cases

  • Reloj del sistema mal configurado: si timezone es UTC y la fecha parece offset, refuerza con date -u y comparas contra UTC equivalente.
  • Commits mixtos: si el stage tiene mix doc + código, el commit completo se considera code-touching. No haces split automático — eso es decisión de Marco. Sugerís git commit docs/... -m "..." aparte.
  • --amend: si Marco intenta amend a un commit fuera de ventana, doble bloqueo + warning explícito.

Anti-patrones

  • No hagas el check más permisivo "porque casi" abre la ventana. Ventana es estricta o no es defensa para B3.
  • No bloquees commits de docs. La docs/ se trabaja antes y después de la ventana.
  • No silencies la primera advertencia de "B3 reminder" — es lo que evita que Marco tenga el código pero le falte la evidencia.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.