Claude Enforcer
Most people focus on what to say to AI. The real leverage is in what you show it before you speak.
Claude Code is Anthropic's command-line AI assistant for software development. When you run it in a project directory, it reads a CLAUDE.md file at the start of every conversation. This file is where you write the rules: your project's architecture, coding conventions, API keys to avoid, workflows to follow. Everything Claude needs to know before it touches your code.
The problem is that rules fade. As conversations grow longer, the instructions you loaded at the start get diluted by everything that comes after. Researchers call this "lost in the middle", and it means your carefully written rules stop being consulted reliably.
This tool helps you build a context system that resists drift.

The Problem
When you put everything in CLAUDE.md, two things happen:
-
Context bloat. Every conversation loads every rule, even irrelevant ones. A 500-line file full of deployment procedures wastes context when you're just trying to fix a CSS bug.
-
Instruction drift. You write a rule that says "never commit without running tests." For the first twenty messages, Claude follows it. By message forty, it commits without running tests. The rule is still there in the context window. The model just stops reaching for it.
The Solution
Claude Code has three mechanisms that help, but most developers underuse them:
Skills are reusable instruction files that load on-demand. Instead of a 500-line CLAUDE.md that fades, you have a lean set of essentials (~100 lines) plus specialized skills you invoke when needed. Type /deploy when deploying, /api when working with your API, /review when reviewing code. The context stays relevant.
Hooks are shell scripts that run before Claude acts. A PreToolUse hook can block a forbidden action regardless of what Claude "remembers." It doesn't matter if the model forgot your rule about never using a certain account. The hook blocks it anyway.
Agents are subprocesses that start with fresh context. When you need to validate something without the drift of the current conversation, you spawn an agent with context: none. It reads your reference files directly, uninfluenced by the long conversation above. Each agent gets a distinct persona, a specific expert lens, so that when multiple agents evaluate the same problem, they bring genuinely different perspectives rather than echoing each other.

Agent Teams coordinate multiple Claude Code instances working in parallel. Where individual agents evaluate independently and report back, teammates share a task list, message each other, and divide labor across files. Think of the difference this way: individual agents are expert witnesses who testify separately; a team is a crew building different parts of the same house.
Requirements
Claude Code v2.1.32 or later. Skills became user-invocable in v2.1.3 (January 2026). Earlier versions will refuse to run /skill-builder directly. Check with claude --version and update with claude update if needed.
Install
Option A — npx (recommended)
npx skills add odysseyalive/claude-enforcer
This works across Claude Code, Cursor, Codex, and 37 other agents.
Option B — curl
Includes extra setup (agent teams, auto-approved research tools):
claude /init # if you haven't already
bash -c "$(curl -fsSL https://raw.githubusercontent.com/odysseyalive/claude-enforcer/main/install)"
Then run your first audit:
/skill-builder audit
Usage