Skip to main content
hook CX Codex

debt-ops — Claude Code hook: what it does and how to install

The debt-ops hook records deferred tech-debt items in a repository registry, while a review skill ranks them by file churn. Use it to keep postponed cleanup visible during coding.

MIT ★ 1,596 updated 2026-10-29

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/settings.json
Open on GitHub

What debt-ops does

debt-ops logs each deferred tech-debt item in a registry inside the repository. Its review skill ranks items according to how often the affected files change, helping teams decide what to address first.

Hooks run at session start and end, when a user submits a prompt, and after apply_patch, Edit, or Write. They invoke session-start.py, drop.py, feedback.py, and stop.py with python3. Python 3 is required for these commands to run.

For Claude Code, place the hook settings in .claude/settings.json. Codex is also listed as a supported platform, but the installation instruction provided is for Claude Code.

What it helps with

  • record a deferred tech-debt item in the repository registry
  • rank pending debt items by how often their files change
  • track deferred work after Edit and Write operations
  • run feedback handling after apply_patch

Example prompts for the agent

  • Record this deferred tech-debt item in the repository registry.
  • Review the registry and rank items by file churn.
  • After the Edit changes, check for newly logged tech-debt items.

How to install debt-ops

Manually: put the files in place

.claude/settings.json

The hooks block: event (PreToolUse, PostToolUse, Stop…) → command. Personal ones go to ~/.claude/settings.json

Step by step, with commands for each platform: Claude Code hooks: what they are, where to configure them, how to block a risky command

Questions about debt-ops

How do I install debt-ops in Claude Code?

Add the hook settings to .claude/settings.json.

What does debt-ops do?

Its hooks log deferred tech-debt items in a repository registry. A review skill ranks them by how often the affected files change.

What does debt-ops run?

Python 3 scripts run at session start and end, on prompt submission, and after apply_patch, Edit, or Write.

Source text

hooks.json · MIT
Hooks bundle shipped with the debt-ops plugin for Claude Code.

Catches AI-introduced tech debt at write-time: hooks log every deferral to a registry in your repo and a review skill ranks paydown by file churn.

Triggers on: PostToolUse, UserPromptSubmit, SessionStart, Stop.

```json
{
  "hooks": {
    "SessionStart": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "python3 ${PLUGIN_ROOT}/hooks/session-start.py"
          }
        ]
      }
    ],
    "UserPromptSubmit": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "python3 ${PLUGIN_ROOT}/hooks/drop.py",
            "timeout": 3
          }
        ]
      }
    ],
    "PostToolUse": [
      {
        "matcher": "apply_patch|Edit|Write",
        "hooks": [
          {
            "type": "command",
            "command": "python3 ${PLUGIN_ROOT}/hooks/feedback.py",
            "timeout": 5
          }
        ]
      }
    ],
    "Stop": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "python3 ${PLUGIN_ROOT}/hooks/stop.py",
            "timeout": 5
          }
        ]
      }
    ]
  }
}

```

© Brandin Canfield · MIT · hashgraph-online/awesome-codex-plugins

Similar hooks

All hooks for Code review and refactoring →

From the same set391

The whole set →
espresso espresso triggers scripts on session launch and prompt submission to keep agent outputs brief while preserving evidence. CX Codex ★ 1,596repo stars development-skills This hook routes development work through three tiers, formats file changes, and sends each change to a staff-reviewer subagent. It supports Claude Code and Codex. CX Codex ★ 1,596repo stars devin Session lifecycle hooks for Claude Code: track start and end, gate stops with a review, and hand tasks off to Devin's cloud. CX Codex ★ 1,596repo stars deepseek-minimal-anchor deepseek-minimal-anchor adjusts DeepSeek default reasoning behavior in Claude Code and Codex. It injects working anchors at session start, guides prompts per turn, and logs trajectory reports. CX Codex ★ 1,596repo stars cc cc — a hook bridge between Claude Code and Codex. It runs reviews, rescue tasks and tracked background jobs from Claude Code inside a Codex session. CX Codex ★ 1,596repo stars babok_analyst babok_analyst is a Claude Code hook bundle that manages the BABOK v3 business analysis agent’s session lifecycle and controls MCP tool execution through approval gates. CX Codex ★ 1,596repo stars archcore archcore is a Claude Code hook that brings Git project context into spec-driven development. It runs at session start, before file edits, and after Archcore document operations. CX Codex ★ 1,596repo stars aiboarding aiboarding is a Claude Code and Codex hook that generates, maintains, compresses, and audits AI-agent onboarding files, keeping AGENTS.md and CLAUDE.md current as the codebase changes. CX Codex ★ 1,596repo stars

Project sponsors

Companies that keep this analytics open