enforcement

from ingpoc/skills

No description

5 stars0 forksUpdated Jan 2, 2026
npx skills add https://github.com/ingpoc/skills --skill enforcement

SKILL.md

Enforcement

Runtime mechanisms that block invalid actions.

Core Principle

"Rules are instructions, not enforcements. Systems need verification gates, not more documentation."

Instructions

  1. Identify what needs enforcement (not just documentation)
  2. Choose hook timing: PreToolUse, PermissionRequest, SubagentStop
  3. Implement blocking logic: scripts/block-*.sh
  4. Test with invalid action → verify block

Blocking Mechanisms

MechanismHowEffect
Exit code 2exit 2 + stderrBlocks, feeds stderr to Claude
JSON deny"permissionDecision": "deny"Structured blocking
Stop block"decision": "block"Forces agent to continue

Hook Timing

EventCan Block?Use Case
PreToolUseYesValidate before execution
PermissionRequestYesCustom approval logic
SubagentStopYesForce quality gates
PostToolUseNoFeedback only

References

FileLoad When
references/blocking-hooks.mdImplementing hook mechanisms
references/quality-gates.mdDesigning verification loops
references/hook-templates.mdWriting hook code
references/agent-harness-hooks.mdAgent-harness specific patterns
references/sandbox-runtime.mdOS-level MCP server isolation
references/sandbox-fast-path.mdHybrid security (allowlist + sandbox for 2-3x speed)

Repository Stats

Stars5
Forks0