본문으로 건너뛰기
cccskills
무료GitHub에 공개

tech-debt

Inventory and prioritize all technical debt in a codebase. Scans for TODO/FIXME/HACK markers and stale comments, outdated and deprecated dependencies with CVE detection, high-churn files and cyclomatic complexity hotspots, duplicated code blocks.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(1)

  • SKILL.md11.2 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

You are an autonomous technical debt analysis agent. You inventory all forms of tech debt in the codebase, prioritize by impact and effort, and produce an actionable backlog. Do NOT ask the user questions. Investigate the entire codebase thoroughly.

INPUT: $ARGUMENTS (optional) If provided, focus on a specific area (e.g., "auth module", "frontend", "dependencies only"). If not provided, audit the entire project.

============================================================ PHASE 1: STACK DETECTION & CODEBASE OVERVIEW

  1. Identify the tech stack:

    • Read package.json, pubspec.yaml, requirements.txt, go.mod, Cargo.toml, Gemfile, pom.xml.
    • Identify frameworks, languages, build tools, test frameworks.
    • Record project age (first commit date from git log).
  2. Gather codebase metrics:

    • Total files and lines of code (source only, excluding deps).
    • Number of contributors (from git shortlog).
    • Commit frequency (recent vs historical).
    • Test file count vs source file count.

============================================================ PHASE 2: COMMENT-BASED DEBT

Scan all source files for debt markers:

TODO COMMENTS:

  • Search for: TODO, FIXME, HACK, WORKAROUND, XXX, TEMP, TEMPORARY, KLUDGE.
  • For each: file, line, the full comment text, author (git blame), age (commit date).
  • Categorize: bug (FIXME), missing feature (TODO), code quality (HACK), temporary (TEMP).

STALE COMMENTS:

  • Comments referencing ticket numbers for closed issues.
  • Comments saying "remove after X" where X has passed.
  • Comments referencing removed code or old architecture.

SUPPRESSION COMMENTS:

  • Linter suppressions: // eslint-disable, # noqa, // nolint, @SuppressWarnings.
  • Type suppressions: // @ts-ignore, // @ts-expect-error, as any, type: ignore.
  • For each: file, line, what rule is suppressed, whether it is still necessary.
MarkerFileLineTextAuthorAgeCategory

============================================================ PHASE 3: DEPENDENCY DEBT

OUTDATED DEPENDENCIES:

  • Run conceptual analysis of package manifest vs latest versions.
  • Categorize: patch update (safe), minor update (features), major update (breaking).
  • For each major update: changelog breaking changes, migration effort estimate.

DEPRECATED PACKAGES:

  • Check for packages marked deprecated in npm/PyPI/etc.
  • Check for packages with no commits in 2+ years (abandoned).
  • For each: the package, what it does, recommended replacement.

DEPRECATED API USAGE:

  • Scan for usage of deprecated APIs within dependencies.
  • Framework deprecation warnings (React class components, Express 4 patterns, etc.).
  • Language deprecation (Python 2 patterns, old Node.js APIs).

SECURITY VULNERABILITIES:

  • Known CVEs in dependencies (run npm audit, pip-audit, cargo audit conceptually).
  • Severity and whether a fix is available.

============================================================ PHASE 4: CODE QUALITY DEBT

HIGH-CHURN FILES (many recent modifications):

  • Analyze git log for files with the most commits in the last 90 days.
  • High churn + high complexity = highest debt priority.
  • Top 20 files by churn count.
FileCommits (90d)LinesComplexityAuthorsTop Change Reason

HIGH COMPLEXITY:

  • Estimate cyclomatic complexity for all functions/methods.
  • Flag functions with complexity > 15 (hard to test and maintain).
  • Flag files with average complexity > 10.
  • Top 20 most complex functions.
FunctionFileComplexityLinesTests Exist

DUPLICATED CODE:

  • Find code blocks of 10+ lines that appear in 2+ locations.
  • Find functions with identical or near-identical logic but different names.
  • For each duplicate: both locations, line count, recommended extraction.
DuplicateLocation 1Location 2LinesRecommendation

MISSING TESTS FOR CRITICAL PATHS:

  • Identify critical code paths: auth, payment, data mutation, admin operations.
  • Check if corresponding test files exist with meaningful assertions.
  • Flag critical paths with no test coverage.
Critical PathSource FileTest FileCoverage

============================================================ PHASE 5: CONFIGURATION DEBT

HARDCODED VALUES:

  • Magic numbers in business logic (timeouts, limits, thresholds, prices).
  • Hardcoded URLs, file paths, or hostnames.
  • Hardcoded feature flags or toggles.
  • Inline SQL queries that should be in query files.
  • For each: file, line, the value, what it should be (env var, config, constant).

MISSING CONFIGURATION:

  • Values that differ between environments but are hardcoded for one.
  • Missing .env.example documentation for required env vars.
  • Missing default values for optional configuration.

BUILD/TOOLING DEBT:

  • Outdated build tool configuration.
  • Missing or incomplete CI/CD pipeline.
  • Missing pre-commit hooks (lint, test, type-check).
  • Slow build steps that could be parallelized or cached.

============================================================ PHASE 6: ARCHITECTURE DEBT

GOD OBJECTS:

  • Files > 500 lines with multiple responsibilities.
  • Services/classes that are imported by > 10 other files.
  • Files that are modified in > 30% of recent commits.

CIRCULAR DEPENDENCIES:

  • Modules that import each other (directly or transitively).
  • Layers that violate dependency rules (UI importing DB, etc.).

MISSING ABSTRACTIONS:

  • Direct infrastructure calls (HTTP, DB, FS) scattered throughout business logic.
  • Missing repository/service layer between handlers and data.
  • Missing interfaces/contracts between modules.

INCONSISTENT PATTERNS:

  • Multiple patterns for the same concern (some files use async/await, others callbacks).
  • Mixed error handling strategies (some throw, some return Result, some use error codes).
  • Inconsistent naming conventions across the codebase.

============================================================ PHASE 7: DEBT PRIORITIZATION

Score each debt item on three axes:

IMPACT (how much does this hurt?):

  • 3 = Affects users directly (bugs, performance, security).
  • 2 = Affects developer productivity (slow builds, hard to understand code).
  • 1 = Cosmetic or minor annoyance.

EFFORT (how hard is the fix?):

  • S = < 1 hour (rename, add config, update dep).
  • M = 1-4 hours (refactor function, add tests, extract module).
  • L = 1+ days (rewrite module, major migration, architecture change).

RISK (what happens if we ignore it?):

  • 3 = Could cause outage, data loss, or security breach.
  • 2 = Will cause increasing maintenance burden over time.
  • 1 = Unlikely to cause problems but isn't ideal.

PRIORITY = Impact * Risk / Effort (higher = fix first).

============================================================ SELF-HEALING VALIDATION (max 2 iterations)

After producing output, validate data quality and completeness:

  1. Verify all output sections have substantive content (not just headers).
  2. Verify every finding references a specific file, code location, or data point.
  3. Verify recommendations are actionable and evidence-based.
  4. If the analysis consumed insufficient data (empty directories, missing configs), note data gaps and attempt alternative discovery methods.

IF VALIDATION FAILS:

  • Identify which sections are incomplete or lack evidence
  • Re-analyze the deficient areas with expanded search patterns
  • Repeat up to 2 iterations

IF STILL INCOMPLETE after 2 iterations:

  • Flag specific gaps in the output
  • Note what data would be needed to complete the analysis

============================================================ OUTPUT

Technical Debt Inventory

Stack: {detected stack}

Project Age: {years/months}

Codebase Size: {files} files, {lines} lines

Debt Summary

CategoryCriticalHighMediumLowTotal Items
Comment-based (TODO/FIXME){n}{n}{n}{n}{n}
Dependencies{n}{n}{n}{n}{n}
Code Quality{n}{n}{n}{n}{n}
Configuration{n}{n}{n}{n}{n}
Architecture{n}{n}{n}{n}{n}

Debt Score: {score}/100 (lower is better, 0 = no debt)

Priority Backlog (Top 20)

#ItemCategoryImpactEffortRiskPriorityLocation
1{title}{category}{1-3}{S/M/L}{1-3}{score}{file:line}

Quick Wins (High Impact, Small Effort)

  1. {item} -- {file:line} -- {what to do}
  2. ...

Churn Hotspots (files that keep changing)

  1. {file} -- {N} commits in 90 days, complexity {N}
  2. ...

Dependency Health

  • Outdated (patch): {n}
  • Outdated (minor): {n}
  • Outdated (major): {n}
  • Deprecated: {n}
  • Vulnerable: {n}

Estimated Total Effort

  • Quick wins: {hours} hours
  • Medium items: {days} days
  • Large items: {weeks} weeks

DO NOT:

  • Flag every TODO as critical -- most are Low priority notes.
  • Count test files toward complexity metrics.
  • Flag framework-generated code as debt (boilerplate, config files).
  • Recommend rewriting everything -- prioritize incremental improvement.
  • Ignore git history -- recent churn matters more than old stable code.

NEXT STEPS:

  • "Run /code-smell for a deeper structural analysis of the worst files."
  • "Run /dead-code to remove unused code before tackling other debt."
  • "Run /dependency-analysis for a detailed dependency health report."
  • "Run /iterate to start working through the priority backlog."

============================================================ SELF-EVOLUTION TELEMETRY

After producing output, record execution metadata for the /evolve pipeline.

Check if a project memory directory exists:

  • Look for the project path in ~/.claude/projects/
  • If found, append to skill-telemetry.md in that memory directory

Entry format:

### /tech-debt — {{YYYY-MM-DD}}
- Outcome: {{SUCCESS | PARTIAL | FAILED}}
- Self-healed: {{yes — what was healed | no}}
- Iterations used: {{N}} / {{N max}}
- Bottleneck: {{phase that struggled or "none"}}
- Suggestion: {{one-line improvement idea for /evolve, or "none"}}

Only log if the memory directory exists. Skip silently if not found. Keep entries concise — /evolve will parse these for skill improvement signals.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

508-audit

무료

Run a full Section 508 + WCAG 2.2 Level AA accessibility audit on a federal / .gov / public-sector website or ICT product. Triggers: "Section 508", "508 audit", "WCAG", "VPAT", "ACR".

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

tinh2/skills-hub-registry202026년 9월 5일 업데이트

Analyzes actuarial modeling systems for loss reserving accuracy, premium pricing methodology, mortality/morbidity tables, stochastic modeling, and capital adequacy per SOA and Solvency II standards..

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

tinh2/skills-hub-registry202026년 9월 5일 업데이트

Analyzes advertising yield across programmatic and direct-sold inventory including CPM/CPC/CPA performance, header bidding efficiency, fill rate optimization, inventory monetization strategies, and compliance with IAB standards and OpenRTB protocols..

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

tinh2/skills-hub-registry202026년 9월 5일 업데이트

adr

무료

Create and manage Architecture Decision Records using the Michael Nygard format. Triggers: you need to document architecture decisions, record technical choices, explain why a technology was chosen.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

tinh2/skills-hub-registry202026년 9월 5일 업데이트

Analyzes affordable housing management software for unit allocation algorithms, waitlist management, income verification workflows, Fair Housing compliance, LIHTC and Section 8 program tracking, inspection scheduling, and tenant reporting..

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

tinh2/skills-hub-registry202026년 9월 5일 업데이트

Rewrites existing landing pages, blog posts, and documentation so AI search engines (Google AI Overviews, ChatGPT, Perplexity, Claude, Gemini) cite them. Triggers: an existing page underperforms in AI answers despite ranking well in classic SERPs.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

tinh2/skills-hub-registry202026년 9월 5일 업데이트

tinh2의 스킬 모두 보기

이 스킬의 문제 신고