Awesome-omni-skill dev-tech-debt-review

Detect AI/agentic-specific anti-patterns that traditional linters miss. Analyzes tool/agent boundary violations, prompt debt, context window issues, testing patterns, and more. Returns scored findings with remediation guidance.

install
source · Clone the upstream repo
git clone https://github.com/diegosouzapw/awesome-omni-skill
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/diegosouzapw/awesome-omni-skill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/ai-agents/dev-tech-debt-review" ~/.claude/skills/diegosouzapw-awesome-omni-skill-dev-tech-debt-review && rm -rf "$T"
manifest: skills/ai-agents/dev-tech-debt-review/SKILL.md
source content

dev.tech-debt-review

Detect AI/agentic-specific tech debt that traditional linters miss.

User Input

$ARGUMENTS

You MUST consider the user input before proceeding (if not empty).

Usage Modes

ModeCommandScopeWhen to Use
Changed Files
/dev.tech-debt-review
Files changed vs mainBefore PR (default)
Full Audit
/dev.tech-debt-review --all
Full src/ directoryRelease gate, quarterly review
Category Focus
/dev.tech-debt-review --category=boundary
Specific categoryTargeted cleanup

Categories:

boundary
,
prompt
,
context
,
testing
,
error
,
state
,
observability
,
subagent


Goal

Detect AI/agentic-specific anti-patterns that traditional linters miss:

CategoryWhat It FindsWhy It Matters
Tool/Agent BoundaryTools making decisions, encoding thresholdsViolates Constitution VII
Prompt DebtHardcoded prompts, no versioning, injection risksMaintenance nightmare
Context WindowUnbounded data, no truncation, raw dumpsPerformance/reliability
TestingLive LLM in unit tests, missing VCR, no evalsCI flakiness, cost
Error HandlingNo retry/backoff, missing timeoutsReliability
State ManagementUnbounded conversation historyMemory leaks
ObservabilityNo tracing, missing metricsDebugging blind spots
SubagentDepth > 1, unclear boundariesArchitecture violation

Traditional linters catch syntax and style. This skill catches semantic anti-patterns specific to agentic systems.


Operating Constraints

STRICTLY READ-ONLY: Do not modify any files. Output analysis and recommendations.

SEMANTIC ANALYSIS: Read and understand code patterns, don't just grep.

EVIDENCE-BASED: Every finding must cite file:line and code snippet.

SCORING: Aggregate findings into 0-100 score for PR gate decisions.


Constitution Alignment

This skill validates adherence to project principles:

PrincipleWhat We Check
I. Local-FirstNo data transmission, security of prompts
III. Causal-FirstRecommendations trace to evidence
VII. Intelligent ToolingTools provide data, agent provides judgment
VIII. Compounding ValueHistorical tracking of tech debt
IX. Agent-AwareContext optimized for agent cognition

Reference: Constitution Mapping


Execution Steps

Phase 0: Scope Determination

You handle this phase directly.

Parse user input to determine scope:

  1. If

    --all
    flag present: Full codebase audit

    find src -name "*.ts" -type f | grep -v ".d.ts" | grep -v "node_modules"
    
  2. If

    --category=X
    flag present: Filter to that category's patterns only

  3. If specific file path provided: Analyze that file

    ls -la <provided-path>
    
  4. Default (no args): Changed files only

    git diff --name-only main...HEAD | grep -E '\.tsx?$'
    

Report mode to user:

  • --all
    mode: "Running FULL CODEBASE audit on N files"
  • --category=X
    : "Running targeted audit for category: X"
  • Default: "Reviewing N files changed vs main"

Load context:

  • Read
    .specify/memory/constitution.md
    for principle references
  • Check for previous review at
    .claude/reviews/tech-debt-*.json
    for trend comparison

Phase 1: Parallel Category Analysis (Subagents)

Invoke 8 category-specific analyzers IN PARALLEL (single message, multiple Task calls).

Each subagent focuses on one category. Use Haiku for single-file analysis, Sonnet for cross-file patterns.

Task(boundary-analyzer, model=haiku, "Analyze files for Tool/Agent Boundary violations.

PATTERNS TO DETECT:
- JUDGMENT_IN_TOOL: Functions that return judgments ('good', 'bad', 'low', 'high')
- ORCHESTRATION_IN_TOOL: Tools that decide when/how to call other tools
- THRESHOLD_ENCODING: Hardcoded thresholds that encode decisions (if score < 0.3)
- DECISION_RETURN: Functions returning 'suggestedAction', 'shouldDo', etc.

FILES: [list]

For each finding, return:
- pattern: The pattern code (e.g., JUDGMENT_IN_TOOL)
- file: Absolute path
- line: Line number
- snippet: The offending code (max 5 lines)
- evidence: Why this matches the pattern

Return JSON array of findings. Return empty array if no issues.")

Task(prompt-analyzer, model=haiku, "Analyze files for Prompt Debt.

PATTERNS TO DETECT:
- HARDCODED_PROMPT: Prompt strings embedded directly in code (not in prompt files)
- NO_VERSIONING: Prompts without version tracking or timestamps
- INJECTION_RISK: User input concatenated into prompts without sanitization
- PROMPT_SPRAWL: Same prompt logic duplicated in multiple places

FILES: [list]

Return JSON array of findings with pattern, file, line, snippet, evidence.")

Task(context-analyzer, model=haiku, "Analyze files for Context Window issues.

PATTERNS TO DETECT:
- UNBOUNDED_DATA: Arrays/objects passed to agent without size limits
- NO_SUMMARIZATION: Large data returned without truncation/summarization
- RAW_DUMP: Tool returning raw data structures instead of formatted summaries
- CONTEXT_BLOAT: Unnecessary verbose output in tool responses

FILES: [list]

Return JSON array of findings with pattern, file, line, snippet, evidence.")

Task(testing-analyzer, model=haiku, "Analyze files for Testing Anti-patterns.

PATTERNS TO DETECT:
- LIVE_LLM_IN_UNIT: Unit tests that make real LLM API calls
- MISSING_VCR: Integration tests without VCR recordings
- MISSING_EVAL: Behavioral scenarios without TruLens evals
- FLAKY_ASSERTION: Tests asserting on non-deterministic LLM output
- NO_MOCK: Tests calling real external services

FILES: [list]
ADR-0011 Reference: Unit=mocked, Integration=VCR, E2E/Evals=live

Return JSON array of findings with pattern, file, line, snippet, evidence.")

Task(error-analyzer, model=haiku, "Analyze files for Error Handling issues.

PATTERNS TO DETECT:
- NO_RETRY_LOGIC: LLM API calls without retry/backoff
- MISSING_TIMEOUT: API calls without timeout configuration
- SILENT_FAILURE: Errors caught but not logged/propagated
- UNHANDLED_REJECTION: Async operations without error handling
- GENERIC_CATCH: catch(e) without specific error handling

FILES: [list]

Return JSON array of findings with pattern, file, line, snippet, evidence.")

Task(state-analyzer, model=haiku, "Analyze files for State Management issues.

PATTERNS TO DETECT:
- UNBOUNDED_HISTORY: Conversation history without max length
- MEMORY_LEAK: Growing state structures without cleanup
- NO_CHECKPOINT: Long-running operations without checkpointing
- STALE_STATE: Cached state without invalidation strategy

FILES: [list]

Return JSON array of findings with pattern, file, line, snippet, evidence.")

Task(observability-analyzer, model=haiku, "Analyze files for Observability gaps.

PATTERNS TO DETECT:
- NO_TRACING: LLM calls without trace/span context
- MISSING_METRICS: No token counting, latency tracking
- NO_DEBUG_LOG: Complex operations without debug logging
- OPAQUE_ERROR: Errors without context for debugging

FILES: [list]

Return JSON array of findings with pattern, file, line, snippet, evidence.")

Task(subagent-analyzer, model=sonnet, "Analyze files for Subagent Architecture violations.

PATTERNS TO DETECT:
- DEPTH_VIOLATION: Subagents spawning sub-subagents (depth > 1)
- UNCLEAR_BOUNDARY: Subagent with multiple unrelated responsibilities
- MISSING_ISOLATION: Subagent sharing mutable state with parent
- RECURSIVE_SPAWN: Agents that can spawn themselves

FILES: [list]
Constitution C8 Reference: Subagent depth limited to 1

Return JSON array of findings with pattern, file, line, snippet, evidence.")

Wait for all subagents to return.


Phase 2: Constitution Cross-Reference

You handle this phase directly.

For each finding from Phase 1, map to Constitution principles:

Reference: Constitution Mapping

PatternPrincipleSeverity Modifier
JUDGMENT_IN_TOOLVII+2 (direct violation)
ORCHESTRATION_IN_TOOLVII+3 (critical)
INJECTION_RISKI+5 (security)
DEPTH_VIOLATIONC8+4 (architecture)
LIVE_LLM_IN_UNITADR-0011+3 (testing strategy)

Phase 3: Severity Scoring

You handle this phase directly.

Base deductions per finding type:

Reference: Severity Criteria

CategoryPatternBase Deduction
BoundaryJUDGMENT_IN_TOOL-8
BoundaryORCHESTRATION_IN_TOOL-10
BoundaryTHRESHOLD_ENCODING-6
PromptHARDCODED_PROMPT-3
PromptINJECTION_RISK-15
PromptPROMPT_SPRAWL-4
ContextUNBOUNDED_DATA-7
ContextRAW_DUMP-5
TestingLIVE_LLM_IN_UNIT-10
TestingMISSING_VCR-6
TestingMISSING_EVAL-8
ErrorNO_RETRY_LOGIC-6
ErrorSILENT_FAILURE-8
StateUNBOUNDED_HISTORY-10
StateNO_CHECKPOINT-5
ObservabilityNO_TRACING-5
ObservabilityMISSING_METRICS-4
SubagentDEPTH_VIOLATION-12

Scoring formula:

score = max(0, 100 - sum(deductions))

Score interpretation:

ScoreGradeAction
90-100AShip it
80-89BMinor cleanup before merge
70-79CPlan remediation sprint
60-69DUrgent fixes needed
< 60FBlock release

Phase 4: Generate Report

You handle this phase directly.

Output format:

## Tech Debt Review Report

**Score**: XX/100 (Grade: X)
**Trend**: [+/-N vs last review] or [First review - no trend data]
**Files Analyzed**: N
**Scope**: [changed files | full codebase | category: X]

---

### Executive Summary

| Category | Findings | Impact | Constitution |
|----------|----------|--------|--------------|
| Boundary | N | -XX | VII |
| Testing | N | -XX | ADR-0011 |
| ... | ... | ... | ... |
| **Total** | **N** | **-XX** | |

---

### P0 - Block Release

These issues MUST be fixed before merge:

#### [PATTERN_CODE] in file.ts:123

**Code:**
```typescript
// The offending code snippet

Problem: [Why this is an anti-pattern]

Constitution: Violates Principle [X]

Remediation: [Specific fix guidance]


P1 - This Sprint

[Summary findings - less detail than P0]


P2 - Backlog

PatternFileLineCategory
............

Historical Trend

DateScoreGradeChange
[today]XXX-
[prev]XXX+/-N

Anti-Pattern Reference

See: AI Anti-Patterns Guide


---

### Phase 5: Save Historical Data

**You handle this phase directly.**

Save review results to `.claude/reviews/tech-debt-YYYY-MM-DD.json`:

```json
{
  "version": "1.0.0",
  "timestamp": "2026-01-26T14:30:00Z",
  "scope": "changed_files|all|category:X",
  "filesAnalyzed": 145,
  "score": 78,
  "grade": "C",
  "categories": {
    "boundary": { "findings": 3, "impact": -23 },
    "testing": { "findings": 5, "impact": -30 },
    ...
  },
  "findings": [
    {
      "pattern": "JUDGMENT_IN_TOOL",
      "category": "boundary",
      "file": "src/tools/analyzer.ts",
      "line": 42,
      "snippet": "...",
      "severity": 8
    }
  ],
  "trend": {
    "previousScore": 72,
    "previousDate": "2026-01-19",
    "change": 6
  }
}

Integration with Other Skills

SkillRelationship
/dev.test-review
Complementary - test-review checks test quality, tech-debt-review checks testing anti-patterns
/dev.verify-wiring
Sequential - verify-wiring first, then tech-debt-review
/arch-review
Parallel - different focus areas
/dev.pr
Gate - score threshold can block PR

Suggested workflow:

/dev.verify-wiring → /dev.tech-debt-review → /dev.test-review → /dev.pr

Red Flags (Auto-Fail)

These patterns automatically set grade to F:

PatternWhy
INJECTION_RISKSecurity vulnerability
DEPTH_VIOLATIONArchitecture violation
Multiple ORCHESTRATION_IN_TOOLFundamental design issue

References


Handoff

After running this skill:

  • Grade A/B: Proceed to
    /dev.pr
  • Grade C: Review findings, plan fixes, proceed if time-boxed
  • Grade D/F: Fix critical issues, re-run before PR