add-deferred-debt

Add deferred technical debt items identified during PR review

181 stars

Best use case

add-deferred-debt is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Add deferred technical debt items identified during PR review

Teams using add-deferred-debt should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/add-deferred-debt/SKILL.md --create-dirs "https://raw.githubusercontent.com/majiayu000/claude-skill-registry/main/skills/data/add-deferred-debt/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/add-deferred-debt/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How add-deferred-debt Compares

Feature / Agentadd-deferred-debtStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Add deferred technical debt items identified during PR review

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Add Deferred PR Debt

**Purpose:** Track technical debt items identified during PR review that were
deferred (not fixed in the current PR).

**When to Use:** During or after PR review when you identify issues that should
be tracked but won't be fixed immediately.

---

## Overview

This skill creates a tracked debt item from PR review findings. Items are tagged
with the PR number for traceability.

**Output Location:** `docs/technical-debt/MASTER_DEBT.jsonl`

---

## When to Use This Skill

Use during PR review when:

1. You find an issue but fixing it is out of scope for the current PR
2. The fix would significantly increase PR complexity
3. The issue existed before this PR (pre-existing tech debt)
4. The issue is low severity and can wait

**Do NOT defer if:**

- The issue is S0 (Critical) - must be fixed now
- The issue was introduced by this PR - fix it in this PR
- The issue is a security vulnerability - escalate immediately

---

## Execution Steps

### Step 1: Gather PR Context

Collect from the user or current context:

| Field       | Required | Description                       | Example                     |
| ----------- | -------- | --------------------------------- | --------------------------- |
| `pr_number` | Yes      | PR number                         | `325`                       |
| `file`      | Yes      | File path                         | `components/auth/login.tsx` |
| `line`      | Yes      | Line number                       | `145`                       |
| `title`     | Yes      | Short description                 | `Missing input validation`  |
| `severity`  | Yes      | S1, S2, or S3 (NOT S0)            | `S2`                        |
| `category`  | Yes      | security, performance, etc.       | `security`                  |
| `reason`    | Yes      | Why deferred (out of scope, etc.) | `Pre-existing issue`        |

### Step 2: Validate Severity

```
⚠️ S0 items cannot be deferred!

If this is truly critical, it must be fixed before PR merges.
Options:
   [1] Downgrade to S1 and defer
   [2] Block PR until fixed
   [3] Cancel deferral
```

### Step 3: Preview Item

```
📋 Deferred Debt Item Preview
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

PR:          #325
ID:          DEBT-XXXX (auto-assigned)
Source:      PR-325-001
File:        components/auth/login.tsx:145
Severity:    S2 (Medium)
Category:    security
Title:       Missing input validation
Reason:      Pre-existing issue, out of scope for this PR

Confirm? [Y/n]
```

### Step 4: Run Intake Script

```bash
node scripts/debt/intake-pr-deferred.js \
  --pr 325 \
  --file "components/auth/login.tsx" \
  --line 145 \
  --title "Missing input validation" \
  --severity S2 \
  --category security \
  --reason "Pre-existing issue, out of scope for this PR"
```

**Script behavior:**

1. Validates all inputs (rejects S0)
2. Generates source_id as `PR-{number}-{sequence}`
3. Assigns next available DEBT-XXXX ID
4. Appends to MASTER_DEBT.jsonl
5. Logs to intake-log.jsonl with PR context

### Step 5: Regenerate Views

```bash
node scripts/debt/generate-views.js
```

### Step 6: Confirm Success

```
✅ Deferred Debt Item Added

   ID:       DEBT-0892
   PR:       #325
   File:     components/auth/login.tsx:145
   Severity: S2
   Status:   NEW (from PR review)

📄 Updated files:
   - docs/technical-debt/MASTER_DEBT.jsonl
   - docs/technical-debt/views/verification-queue.md

💡 Reminder:
   - Add to PR description: "Defers: DEBT-0892"
   - Item will appear in next verification batch
```

---

## Batch Deferral

For multiple items in one PR:

```bash
# Run for each item
node scripts/debt/intake-pr-deferred.js --pr 325 --file "file1.tsx" ...
node scripts/debt/intake-pr-deferred.js --pr 325 --file "file2.tsx" ...

# Or use batch mode (future enhancement)
node scripts/debt/intake-pr-deferred.js --pr 325 --batch items.json
```

---

## PR Description Update

After adding deferred items, update the PR description:

```markdown
## Technical Debt

Defers: DEBT-0892, DEBT-0893

**Reason:** Pre-existing issues identified during review, out of scope for this
PR. Tracked for future cleanup.
```

---

## Integration with pr-review Skill

The `pr-review` skill includes a mandatory section for deferred items:

```markdown
## Deferred Items (Mandatory Section)

If ANY items are deferred during review:

1. List each with: file, line, severity, description
2. Run `add-deferred-debt` skill for each item
3. Verify items appear in MASTER_DEBT.jsonl

**No PR review is complete until deferred items are tracked.**
```

---

## Related

- `sync-sonarcloud-debt` - Import from SonarCloud
- `add-manual-debt` - Add items manually
- `verify-technical-debt` - Verify items in queue
- `pr-review` - Full PR review workflow

Related Skills

add-manual-debt

181
from majiayu000/claude-skill-registry

Manually add a technical debt item to MASTER_DEBT.jsonl

whisper-transcribe

159
from majiayu000/claude-skill-registry

Transcribes audio and video files to text using OpenAI's Whisper CLI, enhanced with contextual grounding from local markdown files for improved accuracy.

Media Processing

lets-go-rss

159
from majiayu000/claude-skill-registry

A lightweight, full-platform RSS subscription manager that aggregates content from YouTube, Vimeo, Behance, Twitter/X, and Chinese platforms like Bilibili, Weibo, and Douyin, featuring deduplication and AI smart classification.

Content & Documentation

astro

159
from majiayu000/claude-skill-registry

This skill provides essential Astro framework patterns, focusing on server-side rendering (SSR), static site generation (SSG), middleware, and TypeScript best practices. It helps AI agents implement secure authentication, manage API routes, and debug rendering behaviors within Astro projects.

Coding & Development

vly-money

159
from majiayu000/claude-skill-registry

Generate crypto payment links for supported tokens and networks, manage access to X402 payment-protected content, and provide direct access to the vly.money wallet interface.

Fintech & CryptoClaude

thor-skills

159
from majiayu000/claude-skill-registry

An entry point and router for AI agents to manage various THOR-related cybersecurity tasks, including running scans, analyzing logs, troubleshooting, and maintenance.

SecurityClaude

modal-deployment

159
from majiayu000/claude-skill-registry

Run Python code in the cloud with serverless containers, GPUs, and autoscaling using Modal. This skill enables agents to generate code for deploying ML models, running batch jobs, serving APIs, and scaling compute-intensive workloads.

DevOps & Infrastructure

grail-miner

159
from majiayu000/claude-skill-registry

This skill assists in setting up, managing, and optimizing Grail miners on Bittensor Subnet 81, handling tasks like environment configuration, R2 storage, model checkpoint management, and performance tuning.

DevOps & Infrastructure

tech-blog

159
from majiayu000/claude-skill-registry

Generates comprehensive technical blog posts, offering detailed explanations of system internals, architecture, and implementation, either through source code analysis or document-driven research.

Content & DocumentationClaude

ontopo

159
from majiayu000/claude-skill-registry

An AI agent skill to search for Israeli restaurants, check table availability, view menus, and retrieve booking links via the Ontopo platform, acting as an unofficial interface to its data.

General Utilities

chrome-debug

159
from majiayu000/claude-skill-registry

This skill empowers AI agents to debug web applications and inspect browser behavior using the Chrome DevTools Protocol (CDP), offering both collaborative (headful) and automated (headless) modes.

Coding & DevelopmentClaude

ux

159
from majiayu000/claude-skill-registry

This AI agent skill provides comprehensive guidance for creating professional and insightful User Experience (UX) designs, covering user research, information architecture, interaction design, visual guidance, and usability evaluation. It aims to produce actionable, user-centered solutions that avoid generic AI aesthetics.

UX Design & StrategyClaude