main-hooks

Automates Bash health-check enforcement in CSF NIP via PreToolUse gate and Python script.

Updated Apr 23, 2026
One-click install
npx skills add https://github.com/EndUser123/cc-skills-utils --skill main-hooks
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: main-hooks
Source: https://github.com/EndUser123/cc-skills-utils/tree/main/skills/main-hooks
Command: npx skills add https://github.com/EndUser123/cc-skills-utils --skill main-hooks

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The PreToolUse hook for the main-hooks workflow enforces correct Bash usage by ensuring system_health.py is invoked for health checks, preventing unsafe or misconfigured commands from executing.

Core Features & Use Cases

  • PreToolUse gate validates that Bash commands call the health checker script system_health.py.
  • Portable path handling via CLAUDE_PROJECT_DIR ensures commands work across environments.
  • Separate enforcement mode provides strict command validation while remaining compatible with simple usage.
  • Suitable for audits and environments requiring predictable health verification.

Quick Start

Invoke /main-hooks and run the provided health check commands to verify system status with enforcement.

Frequently Asked Questions about main-hooks

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce safe Bash health checks in CSF NIP workflows?▼

You can enforce safe Bash health checks in CSF NIP by applying a PreToolUse hook that validates commands invoke system_health.py before execution. This gate prevents non-compliant commands from running and guides proper usage.

What does a PreToolUse hook do for command validation?▼

A PreToolUse hook intercepts commands before execution, applying command matching logic to verify they call system_health.py. This mechanism prevents unsafe or misconfigured Bash commands from running in your environment.

Can I use portable paths for health check scripts across different environments?▼

Yes, portable path handling via CLAUDE_PROJECT_DIR ensures health check commands invoking system_health.py work across different environments. This approach maintains consistent enforcement without hardcoding absolute paths.

Why does my Bash command fail the health check gate in CSF?▼

Your Bash command fails the health check gate because the PreToolUse hook validates that system_health.py is invoked. Commands that bypass this script are blocked to prevent unsafe or misconfigured execution.

Do I need Python to run system_health.py for compliant health checks?▼

Yes, you need Python to run system_health.py, as the enforcement gate uses a Python script to validate Bash commands. The hook implements command matching logic to ensure proper invocation of the health checker.