carloscape/octorato/hook-profile-gating
Claude Code and agent skill by carloscape/octorato
- community
Checking that the SKILL.md file is still in the repository.
Runtime gate hooks via OCTO_HOOK_PROFILE (minimal|standard|strict) and OCTO_DISABLED_HOOKS (comma-separated ids) — disable noisy hooks without editing hook files. Use when onboarding a new arm, debugging a runaway hook, or running a low-context session where the full hook stack is overhead. Always-on hooks (leak-guard, secret-scan, hooks-drift) cannot be disabled via env — that's by design. Pattern adopted from affaan-m/ECC.
Install
npx vskill@latest install carloscape/octorato/hook-profile-gatingSKILL.md
Hook Profile Gating
Why
Hook stack grows over time. Some hooks are non-negotiable (secret-scan, leak-guard); some are nice-to-have (typecheck, tmux-reminder); some get noisy in specific contexts (onboarding a new arm, debugging the brain itself). Editing settings.json to disable one is heavy. Env-vars give per-session gating.
How
Three env vars + one Python helper:
| Var | Values | Default | Effect | |||
|---|---|---|---|---|---|---|
OCTO_HOOK_PROFILE | minimal \ | standard \ | strict | standard | bulk gate by profile | |
OCTO_DISABLED_HOOKS | id1,id2,... (comma-separated) | empty | per-hook off-switch |
Profiles:
- minimal — only
always_on=Truehooks run (leak-guard, secret-scan, hooks-drift). Fastest. Use when sanity-checking a brain change without firing the world. - standard — default. Everything except
strict_only=Truehooks. - strict — everything, including
strict_only(slow type-checks, extended security scans).
OCTO_DISABLED_HOOKS overrides everything except always_on=True. You cannot disable the leak-guard via env, ever.
Helper API
scripts/lib/hook_flags.py:
How to port an existing hook
- Pick a hook id following
<phase>:<event>:<short-name>(e.g.pre:bash:tmux-reminder). - Add at the very top of the hook script:
``python import sys, pathlib sys.path.insert(0, str(pathlib.Path(__file__).resolve().parent.parent / "scripts" / "lib")) from hook_flags import should_run if not should_run("<your-id>"): sys.exit(0) ``
- Decide if it's
always_onorstrict_only. Default (neither) = runs in standard+strict, skipped in minimal. - Document the id in the hook's docstring + a row in
~/.claude/hooks/README.md.
Hooks that don't opt in are always active — porting is incremental, no flag-day required.
Examples
What NOT to do
- Don't make leak-guard env-overridable. It's
always_on=Truefor a reason — public brain. - Don't gate behavior outside hooks via these env vars. They're hook-runtime only; for runtime behavior in skills/scripts, use the operator-recall pattern (
load_config()from a YAML). - Don't ship a hook without an id. Untrackable disabling = bad ops story.
See also
- [[do-not-ask-to-pause]] — hooks should never prompt the operator; if they need a decision, they're not hooks
- [[dry-run-gate-pattern]] — sibling concept: opt-in for destructive ops, opt-out for hooks via env
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/hook-profile-gating/SKILL.md
Popularity
- Repository stars
- 17
- Repository forks
- 7
- 7-day trend score
- 14
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/carloscape/octorato/hook-profile-gating)