whatisgithub

What is detent?

clear-sights/detent — explained in plain English

Analysis updated 2026-05-18

16PythonAudience · developerComplexity · 3/5LicenseSetup · easy

In one sentence

A Claude Code plugin that intercepts agent hook events and swaps model-driven file reads, writes, and web fetches for deterministic, code-based equivalents wherever possible.

Mindmap

A visual breakdown will appear here once this repo is fully enriched.

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Install as a Claude Code plugin so file reads, writes, and edits route through a deterministic store instead of being retyped by the model.

USE CASE 2

Block WebFetch and WebSearch calls and replace them with a curl-then-read pattern so page content isn't silently summarized.

USE CASE 3

Search all content the agent has ever written or read by grepping the local content-addressed store.

USE CASE 4

Reference previously seen file content in a prompt using a short detent:// address instead of pasting it again.

What is it built with?

PythonClaude Code HooksMCP

How does it compare?

clear-sights/detent920linjerry-stack/capital-studioadya84/ha-world-cup-2026
Stars161616
LanguagePythonPythonPython
Setup difficultyeasyeasyeasy
Complexity3/53/52/5
Audiencedeveloperresearchergeneral

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

Installs as a Claude Code plugin with two commands, a separate pip install is only needed for running the test suite.

Apache-2.0 license: free to use, modify, and distribute, including commercially, with an explicit patent grant included.

So what is it?

Detent is a tool for people using AI coding agents, built as a plugin for Claude Code. The idea behind it is simple: whenever an agent could either have a model regenerate or retype something, or instead have a plain deterministic program do it, Detent makes sure the deterministic path runs. The only thing the AI model does is reason and decide what to do next. Everything else, like reading files, writing them, checking facts, and showing results, is handled by plain code with no model call involved. The project is written in Python. It works by plugging into Claude Code hook events, watching for things like tool calls, and either rewriting them, blocking them, or letting them through, based on a fixed set of rules called moves. There are 29 of these moves defined in the code, split into three groups: ones that enforce rules, ones that save data into a local store, and ones that display results to the screen. Everything the tool saves goes into a local, content-addressed store, meaning identical data is only stored once and can be fetched again by a short address, like detent://abc123. Typing that kind of address into a prompt, or using it as the content of a file write or edit, pulls the exact stored bytes back out instead of making the model retype them itself. One notable behavior: Detent blocks WebFetch and WebSearch calls entirely, telling the agent to use a plain curl command followed by reading the saved file instead. This is meant to avoid having a model quietly summarize or alter a page content while fetching it. Tool calls made through MCP integrations are not affected by this rule. Installing Detent is done through Claude Code plugin system, with one command to add the marketplace and another to install the plugin. There is also a companion project called Makoto for other kinds of checks. Detent is released under the Apache-2.0 license, which allows free use, modification, and distribution, and includes an explicit patent grant.

Copy-paste prompts

Prompt 1
Walk me through installing the Detent plugin in Claude Code with the marketplace add and install commands.
Prompt 2
Explain what the 29 moves in detent/moves.py do and how they're grouped into enforcement, capture, and display.
Prompt 3
Show me how the detent:// pointer syntax works for materializing stored bytes into a file write.
Prompt 4
Help me understand why Detent blocks WebFetch and WebSearch and what the curl-and-read alternative looks like.
Prompt 5
Compare Detent's content-addressed store to a simple file cache.

Frequently asked questions

What is detent?

A Claude Code plugin that intercepts agent hook events and swaps model-driven file reads, writes, and web fetches for deterministic, code-based equivalents wherever possible.

What language is detent written in?

Mainly Python. The stack also includes Python, Claude Code Hooks, MCP.

What license does detent use?

Apache-2.0 license: free to use, modify, and distribute, including commercially, with an explicit patent grant included.

How hard is detent to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is detent for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.