respect-hooks

respect-hooks is a cursor rule for Claude Code, Cursor from Intense-Visions/harness-engineering. It costs 514 tokens per session, scanned A, original, MIT.

A project rule explaining why lifecycle hooks must remain active and why their safety checks should not be bypassed.

In plain words
What is it for?
It is for guiding agents around Git hooks, file-protection checks, validation gates, state preservation, and project telemetry.
Why use it?
It prevents skipped verification, unapproved configuration changes, deleted safeguards, and other workarounds that can hide problems.

Cursor rule for Claude CodeCursor

Written for Claude Code and Cursor: PreToolUse hook event, but also a Cursor plugin manifest. Also seen: reads .claude/ paths.

Good fit It is for guiding agents around Git hooks, file-protection checks, validation gates, state preservation, and project telemetry.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/intense-visions/harness-engineering/respect-hooks
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/Intense-Visions/harness-engineering

Made for: Claude Code, Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for respect-hooks

README.md
[![agentmods](https://agentmods.dev/badge/rules/intense-visions/harness-engineering/respect-hooks.svg)](https://agentmods.dev/rules/intense-visions/harness-engineering/respect-hooks)
Your own site
<a href="https://agentmods.dev/rules/intense-visions/harness-engineering/respect-hooks"><img src="https://agentmods.dev/badge/rules/intense-visions/harness-engineering/respect-hooks.svg" alt="Measured on agentmods" height="20"></a>
Per session 514 This file is loaded in full into every session.
When invoked 514 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00514 $0.00514
Opus 5 $0.00257 $0.00257
Sonnet 5 $0.00103 $0.00103
Haiku 4.5 $0.00051 $0.00051

Measured 3d ago against content hash a15bc77aacef, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

respect-hooks scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor-plugin/rules/respect-hooks.mdc · 38 lines

How it starts

The opening of the file, as written. The whole thing — 38 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Respect lifecycle hooks

The standard hook profile (shipped with the harness plugin) wires several pre- and post-tool hooks that exist for specific safety reasons:

Hook Event What it blocks
block-no-verify PreToolUse:Bash Any command containing --no-verify (or equivalent skip flags)
protect-config PreToolUse:Write/Edit Edits to harness/git/CI config without explicit human approval
quality-gate PostToolUse:Edit/Write Files left in failing-validation state
pre-compact-state PreCompact Loss of session state during context compaction
adoption-tracker / telemetry-reporter Stop (log-only — never block)

These hooks are not noise. Each was added in response to a specific failure mode.

What you must not do

  • Never propose git commit --no-verify. block-no-verify will reject it, and proposing it anyway tells the human you didn't read the rule.
  • Never propose modifying or removing hook scripts without the human asking explicitly. If a hook is firing too often, the right fix is calibration (in the hook's own rules file or harness.config.json), not deletion.
  • Never bypass protect-config by suggesting a manual override. If harness.config.json or .claude/settings.json legitimately needs editing, do so directly via the Edit tool — the hook will surface for approval, which is the intended flow.
  • Never silence quality-gate after a failed edit. Fix the file so validation passes, or revert the edit.

When a hook misfires

If you genuinely believe a hook is wrong (false positive on a rule):

  1. Surface it to the human. Don't quietly route around it.
  2. Suggest updating the hook's logic or calibration, not bypassing the event.
  3. Reference the specific hook by name so the human can locate and audit it.

Why this rule exists

Hooks are mechanical safety. If a hook is wrong, fix it deliberately. If a hook is right, respect it. The middle path — bypassing a hook because it's inconvenient — is how the original incident that motivated the hook recurs.

Read the full file on GitHub · 38 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 38 lines · 514 tokens per session scan A a15bc77aacef

Subscribe to this mod's changes

respect-hooks is a cursor rule published in the GitHub repository Intense-Visions/harness-engineering (20 stars, last pushed yesterday), licensed MIT. It adds 514 tokens to every session, about $0.0026 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.