anthropics / anthropics/skills

rulehook — turn CLAUDE.md soft rules into enforced hooks (zero tokens, zero deps)

Abierto
#1,309 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Python
Estrellas
176k
Forks
20.9k
Merge medio
7 h 21 min
PR fusionados (30 d)
5

Descripción

## What

**rulehook** — Turn soft CLAUDE.md rules into enforced hooks using a three-layer architecture.

### The problem

5+ open issues on `anthropics/claude-code` about CLAUDE.md rules being ignored. Rules are soft constraints with zero enforcement. The result: users burn credits, lose trust, and one paying subscriber (#29236) is considering legal action.

### The approach

```
L1: SKILL.md prevention — insert mandatory pre-check before code generation
L2: Stop hook intercept — two-stage grep (scan transcript, warn on violation)
L3: SessionStart audit — read observations.jsonl, inject compliance rate
```

Three independent hooks connected via filesystem. No central coordinator. Zero token overhead (Node.js regex, no LLM call). Zero external deps.

### Why this belongs here

Not a single-use tool — an architecture pattern. Extensible via a RULES object (add one JSON entry per rule). 10-rule stress test: 0.10ms/check, 100% pass.

**Repo**: https://github.com/wuykjl/rulehook
**License**: MIT
**Install**: Two files + two JSON config blocks

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.