enforcement

Use when implementing hooks that BLOCK invalid actions, creating quality gates for state transitions, or enforcing tested:true verification. Load when designing enforcement mechanisms. Uses exit code 2 to block, JSON permissionDecision:deny, or updatedInput modification. Rules are instructions; hooks are enforcement.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "enforcement" with this command: npx skills add ingpoc/skills/ingpoc-skills-enforcement

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)

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

async-programming-skill

No summary provided by upstream source.

Repository SourceNeeds Review
General

scroll-storyteller

No summary provided by upstream source.

Repository SourceNeeds Review
General

browser-testing

No summary provided by upstream source.

Repository SourceNeeds Review
General

postgresql-skill

No summary provided by upstream source.

Repository SourceNeeds Review