/tech-debt-analyzer
This skill should be used when analyzing technical debt in a codebase, documenting code quality issues, creating technical debt registers, or assessing code maintainability. Use this for identifying code smells, architectural issues, dependency problems, missing documentation,
$ npx -y skills add ailabs-393/ai-labs-claude-skills --skill tech-debt-analyzer --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/tech-debt-analyzer
Context preview
The summary Claude sees to decide when to auto-load this skill.
This skill should be used when analyzing technical debt in a codebase, documenting code quality issues, creating technical debt registers, or assessing code maintainability. Use this for identifying code smells, architectural issues, dependency problems, missing documentation,
SKILL.md
tech-debt-analyzer.SKILL.mdname: tech-debt-analyzer
description: This skill should be used when analyzing technical debt in a codebase, documenting code quality issues, creating technical debt registers, or assessing code maintainability. Use this for identifying code smells, architectural issues, dependency problems, missing documentation, security vulnerabilities, and creating comprehensive technical debt documentation.
Technical Debt Analyzer
Overview
Systematically identify, analyze, document, and track technical debt in JavaScript/TypeScript codebases. This skill provides automated analysis tools, comprehensive debt categorization frameworks, and documentation templates to maintain a technical debt register.
Core Workflow
1. Automated Analysis
Run automated scripts to detect technical debt indicators across the codebase.
Code Smell Detection
Identify code quality issues using the automated detector:
python3 scripts/detect_code_smells.py src --output markdown
The script analyzes:
- **Large Files:** Files exceeding 500 lines
- **Complex Functions:** High cyclomatic complexity (>10) or long functions (>50 lines)
- **Debt Markers:** TODO, FIXME, HACK, XXX, BUG comments
- **Console Statements:** Debug statements left in code
- **Weak Typing:** Use of `any` type in TypeScript
- **Long Parameters:** Functions with >5 parameters
- **Deep Nesting:** Code nested >4 levels deep
- **Magic Numbers:** Hardcoded numeric values
**Output Example:**
# Technical Debt Analysis Report
**Files Analyzed:** 127
**Total Lines:** 15,432
**Total Issues:** 89
### Issues by Severity
- HIGH: 23
- MEDIUM: 41
- LOW: 25
## Large Files (12 issues)
### High Priority
- src/components/Dashboard.tsx (847 lines): File too large
- src/services/DataProcessor.ts (623 lines): File too large
...
Dependency Analysis
Examine dependencies for debt indicators:
python3 scripts/analyze_dependencies.py package.json
The script identifies:
- **Deprecated Packages:** Known deprecated libraries (request, tslint, etc.)
- **Duplicate Functionality:** Multiple packages serving same purpose
- **Version Issues:** Overly loose or strict version constraints
- **Security Concerns:** Known vulnerable packages (requires audit data)
**Output Example:**
# Dependency Analysis Report
**Package:** expense-tracker
**Dependencies:** 24
**Dev Dependencies:** 18
**Total Issues:** 7
## Deprecated/Outdated Packages (3)
### request [HIGH]
Using deprecated package - use axios, node-fetch, or got instead
- Current version: ^2.88.0
## Duplicate Functionality (2)
### HTTP client [MEDIUM]
Multiple packages for HTTP client: axios, node-fetch
2. Manual Code Review
Complement automated analysis with manual review for issues that require human judgment.
Review Focus Areas
**Architectural Debt:**
- Tight coupling between components
- Missing abstractions
- Poor separation of concerns
- Circular dependencies
**Test Debt:**
- Missing test coverage for critical paths
- Fragile tests coupled to implementation
- No integration or E2E tests
- Slow test execution
**Documentation Debt:**
- Missing README or setup instructions
- No architecture documentation
- Outdated API docs
- Missing ADRs for major decisions
**Performance Debt:**
- N+1 query problems
- Inefficient algorithms
- Memory leaks
- Large bundle sizes
**Security Debt:**
- Missing input validation
- No authentication/authorization
- SQL injection vulnerabilities
- XSS vulnerabilities
- Exposed secrets
3. Categorize and Assess
Organize findings using the standardized debt categories.
Debt Categories
Refer to `references/debt_categories.md` for comprehensive details on:
1. **Code Quality Debt:** Code smells, complexity, duplication 2. **Architectural Debt:** Structure, coupling, abstractions 3. **Test Debt:** Coverage gaps, fragile tests 4. **Documentation Debt:** Missing or outdated docs 5. **Dependency Debt:** Outdated or problematic dependencies 6. **Performance Debt:** Inefficiencies and bottlenecks 7. **Security Debt:** Vulnerabilities and weaknesses 8. **Infrastructure Debt:** DevOps and deployment issues 9. **Design Debt:** UI/UX inconsistencies
Severity Assessment
Assign severity based on impact and urgency:
**Critical:**
- Security vulnerabilities
- Production-breaking issues
- Data loss risks
- **Action:** Immediate fix required
**High:**
- Significant performance problems
- Architectural issues blocking features
- High-risk untested code
- **Action:** Fix within current/next sprint
**Medium:**
- Code quality issues in frequently changed files
- Missing documentation
- Outdated dependencies (non-security)
- **Action:** Address within quarter
**Low:**
- Minor code smells
- Optimization opportunities
- Nice-to-have improvements
- **Action:** Address when convenient
Priority Matrix
| Impact / Effort | Low Effort | Medium Effort | High Effort | |----------------|-----------|---------------|-------------| | High Impact | Do First | Do Second | Plan & Do | | Medium Impact | Do Second | Plan & Do | Consider | | Low Impact | Quick Win | Consider | Avoid |
4. Document Findings
Create comprehensive documentation of technical debt.
Technical Debt Register
Use the provided template to maintain a debt register:
**Template Location:** `assets/DEBT_REGISTER_TEMPLATE.md`
**Structure:**
## DEBT-001: Complex UserService with 847 lines
**Category:** Code Quality
**Severity:** High
**Location:** src/services/UserService.ts
**Description:**
UserService has grown to 847 lines with multiple responsibilities
including authentication, profile management, and notification handling.
**Impact:**
- Business: Slows down feature development by 30%
- Technical: Difficult to test, high bug rate
- Risk: Changes frequently break unrelated functionality
**Proposed Solution:**
Split into separate services:
- AuthenticationService
- UserProfileService
- NotificationServ
Read more
name: tech-debt-analyzer description: This skill should be used when analyzing technical debt in a codebase, documenting code quality issues, creating technical debt registers, or assessing code maintainability. Use this for identifying code smells, architectural issues, dependency problems, missing documentation, security vulnerabilities, and creating comprehensive technical debt documentation.
Technical Debt Analyzer
Overview
Systematically identify, analyze, document, and track technical debt in JavaScript/TypeScript codebases. This skill provides automated analysis tools, comprehensive debt categorization frameworks, and documentation templates to maintain a technical debt register.
Core Workflow
1. Automated Analysis
Run automated scripts to detect technical debt indicators across the codebase.
Code Smell Detection
Identify code quality issues using the automated detector:
python3 scripts/detect_code_smells.py src --output markdown
The script analyzes:
- **Large Files:** Files exceeding 500 lines
- **Complex Functions:** High cyclomatic complexity (>10) or long functions (>50 lines)
- **Debt Markers:** TODO, FIXME, HACK, XXX, BUG comments
- **Console Statements:** Debug statements left in code
- **Weak Typing:** Use of `any` type in TypeScript
- **Long Parameters:** Functions with >5 parameters
- **Deep Nesting:** Code nested >4 levels deep
- **Magic Numbers:** Hardcoded numeric values
**Output Example:**
# Technical Debt Analysis Report **Files Analyzed:** 127 **Total Lines:** 15,432 **Total Issues:** 89 ### Issues by Severity - HIGH: 23 - MEDIUM: 41 - LOW: 25 ## Large Files (12 issues) ### High Priority - src/components/Dashboard.tsx (847 lines): File too large - src/services/DataProcessor.ts (623 lines): File too large ...
Dependency Analysis
Examine dependencies for debt indicators:
python3 scripts/analyze_dependencies.py package.json
The script identifies:
- **Deprecated Packages:** Known deprecated libraries (request, tslint, etc.)
- **Duplicate Functionality:** Multiple packages serving same purpose
- **Version Issues:** Overly loose or strict version constraints
- **Security Concerns:** Known vulnerable packages (requires audit data)
**Output Example:**
# Dependency Analysis Report **Package:** expense-tracker **Dependencies:** 24 **Dev Dependencies:** 18 **Total Issues:** 7 ## Deprecated/Outdated Packages (3) ### request [HIGH] Using deprecated package - use axios, node-fetch, or got instead - Current version: ^2.88.0 ## Duplicate Functionality (2) ### HTTP client [MEDIUM] Multiple packages for HTTP client: axios, node-fetch
2. Manual Code Review
Complement automated analysis with manual review for issues that require human judgment.
Review Focus Areas
**Architectural Debt:**
- Tight coupling between components
- Missing abstractions
- Poor separation of concerns
- Circular dependencies
**Test Debt:**
- Missing test coverage for critical paths
- Fragile tests coupled to implementation
- No integration or E2E tests
- Slow test execution
**Documentation Debt:**
- Missing README or setup instructions
- No architecture documentation
- Outdated API docs
- Missing ADRs for major decisions
**Performance Debt:**
- N+1 query problems
- Inefficient algorithms
- Memory leaks
- Large bundle sizes
**Security Debt:**
- Missing input validation
- No authentication/authorization
- SQL injection vulnerabilities
- XSS vulnerabilities
- Exposed secrets
3. Categorize and Assess
Organize findings using the standardized debt categories.
Debt Categories
Refer to `references/debt_categories.md` for comprehensive details on:
1. **Code Quality Debt:** Code smells, complexity, duplication 2. **Architectural Debt:** Structure, coupling, abstractions 3. **Test Debt:** Coverage gaps, fragile tests 4. **Documentation Debt:** Missing or outdated docs 5. **Dependency Debt:** Outdated or problematic dependencies 6. **Performance Debt:** Inefficiencies and bottlenecks 7. **Security Debt:** Vulnerabilities and weaknesses 8. **Infrastructure Debt:** DevOps and deployment issues 9. **Design Debt:** UI/UX inconsistencies
Severity Assessment
Assign severity based on impact and urgency:
**Critical:**
- Security vulnerabilities
- Production-breaking issues
- Data loss risks
- **Action:** Immediate fix required
**High:**
- Significant performance problems
- Architectural issues blocking features
- High-risk untested code
- **Action:** Fix within current/next sprint
**Medium:**
- Code quality issues in frequently changed files
- Missing documentation
- Outdated dependencies (non-security)
- **Action:** Address within quarter
**Low:**
- Minor code smells
- Optimization opportunities
- Nice-to-have improvements
- **Action:** Address when convenient
Priority Matrix
| Impact / Effort | Low Effort | Medium Effort | High Effort | |----------------|-----------|---------------|-------------| | High Impact | Do First | Do Second | Plan & Do | | Medium Impact | Do Second | Plan & Do | Consider | | Low Impact | Quick Win | Consider | Avoid |
4. Document Findings
Create comprehensive documentation of technical debt.
Technical Debt Register
Use the provided template to maintain a debt register:
**Template Location:** `assets/DEBT_REGISTER_TEMPLATE.md`
**Structure:**
## DEBT-001: Complex UserService with 847 lines **Category:** Code Quality **Severity:** High **Location:** src/services/UserService.ts **Description:** UserService has grown to 847 lines with multiple responsibilities including authentication, profile management, and notification handling. **Impact:** - Business: Slows down feature development by 30% - Technical: Difficult to test, high bug rate - Risk: Changes frequently break unrelated functionality **Proposed Solution:** Split into separate services: - AuthenticationService - UserProfileService - NotificationServ
🧠 A collection of reusable "skills" for Claude AI and developer tooling. Each skill is a focused, modular package that brings automation to your dev workflows — from SEO analysis to document parsing, CI/CD generation, Docker automation, and more.
Repo: ailabs-393/ai-labs-claude-skills
Other skills on ai-labs-claude-skills.
- /brand-analyzer
This skill should be used when the user requests brand analysis, brand guidelines creation, brand audits, or establishing brand identity and consistency standards. It provides comprehensive frameworks for analyzing brand elements and creating actionable brand guidelines based on
Open skill - /business-analytics-reporter
This skill should be used when analyzing business sales and revenue data from CSV files to identify weak areas, generate statistical insights, and provide strategic improvement recommendations. Use when the user requests a business performance report, asks to analyze sales data,
Open skill - /business-document-generator
This skill should be used when the user requests to create professional business documents (proposals, business plans, or budgets) from templates. It provides PDF templates and a Python script for generating filled documents from user data.
Open skill - /cicd-pipeline-generator
This skill should be used when creating or configuring CI/CD pipeline files for automated testing, building, and deployment. Use this for generating GitHub Actions workflows, GitLab CI configs, CircleCI configs, or other CI/CD platform configurations. Ideal for setting up
Open skill - /codebase-documenter
This skill should be used when writing documentation for codebases, including README files, architecture documentation, code comments, and API documentation. Use this skill when users request help documenting their code, creating getting-started guides, explaining project
Open skill - /csv-data-visualizer
This skill should be used when working with CSV files to create interactive data visualizations, generate statistical plots, analyze data distributions, create dashboards, or perform automatic data profiling. It provides comprehensive tools for exploratory data analysis using
Open skill

