Audits technical debt across PHP/Laravel (MySQL) and Node/TypeScript/React projects, producing a ranked ledger by effort × impact across 10 debt categories.
Ships in asyrafhussin-agent-skills-1. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Technical debt audit and prioritization framework for PHP/Laravel (MySQL) and Node/TypeScript/React projects. Contains 42 rules across 10 categories covering code, security, design, dependency, test, performance, data, documentation, infrastructure, and process debt. Produces a ranked ledger (effort × impact) so teams know what to fix first, not just what's broken. Supports both coding reference and audit mode with PASS/FAIL/N/A output.
When the user asks to "audit technical debt", "find tech debt", or "what should we refactor first" — run the checklist below against their codebase and produce a ranked debt ledger.
$ARGUMENTS): audit only those paths or modulesInspect composer.json and package.json to determine which of the supported stacks (PHP/Laravel, Node/TypeScript/React, or both) is in use. Tooling commands (composer outdated, npm outdated, phpstan, eslint, knip, etc.) are chosen based on this detection.
Work through every item below. For each, output:
file:line (or command output), description of the debt, effort estimate (S/M/L), and impact (LOW/MED/HIGH/CRITICAL)npm audit / composer audit at HIGH or CRITICALpackage.json / composer.jsonRoute::get() deprecations)TODO/FIXME/HACK comments older than 6 months without owner or ticket@deprecated markers without a removal date or replacementEnd the audit with a prioritized table:
## Technical Debt Ledger
| # | Category | Item | File / Location | Effort | Impact | Priority |
|---|----------|------|-----------------|--------|--------|----------|
| 1 | deps | jQuery 1.12 (8y old, 3 CVEs) | package.json:14 | L | CRITICAL | P0 |
| 2 | code | OrderService god class (820 lines) | app/Services/OrderService.php | M | HIGH | P1 |
| 3 | test | 12 disabled tests in auth/ | tests/Feature/Auth/* | S | HIGH | P1 |
...
## Summary
- **PASS:** X checks
- **FAIL:** Y checks
- **N/A:** Z checks
- **Top 3 to pay down first:** (list highest-priority items with rationale)
Priority formula: P0 = CRITICAL impact, P1 = HIGH impact, P2 = MED, P3 = LOW. Within a priority, sort by ascending effort (cheap wins first).
Effort scale:
Reference these guidelines when:
Always detect the stack before running tooling. This skill targets PHP / Laravel (with MySQL) and Node / TypeScript / React projects; detection commands below assume one or both are present.
| Signal | Stack | Tooling |
|---|---|---|
composer.json present | PHP / Laravel | composer outdated, composer audit, phpstan, phpcs, phpmd, deptrac |
package.json present | Node / JS / TS / React | npm outdated, npm audit, eslint, tsc --noEmit, knip, madge |
| MySQL connection available | Database | EXPLAIN, sys.schema_tables_with_full_table_scans, sys.schema_unused_indexes, sys.statement_analysis |
| any repo | Secrets scan | gitleaks git, trufflehog |
If both stacks are present (e.g., Laravel + Inertia + React), run audits for each.
| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | Code Debt | CRITICAL | code- |
| 2 | Security Debt | CRITICAL | security- |
| 3 | Design Debt | HIGH | design- |
| 4 | Dependency Debt | HIGH | deps- |
| 5 | Test Debt | HIGH | test- |
| 6 | Performance Debt | HIGH | perf- |
| 7 | Data Debt | HIGH | data- |
| 8 | Documentation Debt | MEDIUM | docs- |
| 9 | Infrastructure Debt | MEDIUM | infra- |
| 10 | Process Debt | MEDIUM | process- |
code-duplication — Detect and consolidate duplicated logiccode-complexity — Cyclomatic and cognitive complexity thresholdscode-long-functions — Function and method length limitscode-god-classes — Class size and responsibility limitscode-dead-code — Unused code, unreachable branches, commented blockscode-magic-numbers — Hardcoded literals in business logiccode-long-parameter-lists — Functions with too many positional paramssecurity-secrets-in-code — API keys, passwords, tokens in source / historysecurity-input-validation — Endpoints accepting untrusted input without schemassecurity-auth-hardening — Outdated auth, missing MFA, missing security headersdesign-tight-coupling — Excessive direct dependencies between modulesdesign-circular-deps — Cyclic imports / requiresdesign-leaky-abstractions — Framework types crossing layer boundariesdesign-shotgun-surgery — Changes that touch many files at oncedeps-outdated-versions — Major versions behind on dependenciesdeps-abandoned-packages — Unmaintained / abandoned librariesdeps-security-advisories — Known CVEs in installed dependenciesdeps-unused-deps — Declared but unused packagestest-coverage-gaps — Critical paths without teststest-flaky-tests — Tests with non-deterministic outcomestest-disabled-tests — Skipped tests left in the suitetest-slow-tests — Tests blocking fast feedbackperf-n-plus-one — Linear request → quadratic database loadperf-missing-pagination — Unbounded result setsperf-bundle-bloat — Heavy / unsplit frontend bundlesperf-no-caching — Missing cache layers on read-heavy pathsdata-schema-drift — Production schema diverges from migrationsdata-missing-indexes — Hot queries doing sequential scansdata-orphaned-records — Referential integrity gapsdocs-stale-comments — Comments contradicting current behaviordocs-outdated-architecture — README/architecture docs out of datedocs-undocumented-api — Public APIs without docblocks or typesinfra-runtime-versions — EOL or near-EOL language/runtime versionsinfra-deprecated-apis — Framework deprecations still in useinfra-build-warnings — Build/compile warnings ignoredinfra-secrets-management — Long-lived credentials, plain env files, leaked logsinfra-monitoring-gaps — Missing logs, metrics, traces, alerts, or SLOsprocess-todo-fixme-aging — Aging TODO/FIXME/HACK commentsprocess-deprecated-markers — @deprecated without removal planprocess-debt-tracking — Debt visible in a register / backlogprocess-ownership-gaps — Code without an owning team (CODEOWNERS)process-feature-flags-lingering — Stale feature flags polluting code paths| # | Category | Item | Location | Effort | Impact | Priority |
|---|----------|-------------------------------|-----------------------|--------|----------|----------|
| 1 | deps | guzzle 6.x (5y behind) | composer.json:18 | M | HIGH | P1 |
| 2 | code | InvoiceService dup logic | app/Services/Invoice* | S | MEDIUM | P2 |
| 3 | test | 8 skipped tests in checkout/ | tests/Feature/Checkout| S | HIGH | P1 |
LOW MEDIUM HIGH CRITICAL
S (<1d) → P3 P2 P1 P0
M (1-5d) → P3 P2 P1 P0
L (>1w) → P3 P3 P2 P1 (break down)
Cheap + high-impact items go first. Expensive items always get broken down before scheduling.
# PHP / Laravel
composer outdated --direct # list outdated direct deps
composer audit # known CVEs
vendor/bin/phpstan analyse # static analysis
vendor/bin/phpmd app text cleancode # mess detector
# Node / TS
npm outdated # list outdated deps
npm audit # known CVEs
npx depcheck # unused deps
npx tsc --noEmit # type errors
npx eslint . --max-warnings 0 # lint warnings
# Cross-language
git log --since="6 months ago" --diff-filter=A -p | grep -E "TODO|FIXME|HACK"
cloc . # lines of code per language
Read individual rule files for detailed explanations and code examples:
rules/code-duplication.md
rules/design-circular-deps.md
rules/deps-outdated-versions.md
rules/test-flaky-tests.md
rules/process-todo-fixme-aging.md
Each rule file contains:
For the complete guide with all rules expanded: AGENTS.md
AGENTS.md (opens in a new tab)README.md (opens in a new tab)metadata.json (opens in a new tab)rules/_sections.md (opens in a new tab)rules/_template.md (opens in a new tab)rules/code-complexity.md (opens in a new tab)rules/code-dead-code.md (opens in a new tab)rules/code-duplication.md (opens in a new tab)rules/code-god-classes.md (opens in a new tab)rules/code-long-functions.md (opens in a new tab)rules/code-long-parameter-lists.md (opens in a new tab)rules/code-magic-numbers.md (opens in a new tab)rules/data-missing-indexes.md (opens in a new tab)rules/data-orphaned-records.md (opens in a new tab)rules/data-schema-drift.md (opens in a new tab)rules/deps-abandoned-packages.md (opens in a new tab)rules/deps-outdated-versions.md (opens in a new tab)rules/deps-security-advisories.md (opens in a new tab)rules/deps-unused-deps.md (opens in a new tab)rules/design-circular-deps.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/asyrafhussin-agent-skills-1:technical-debtfrom asyrafhussin-agent-skills-1
asyrafhussin-agent-skills-1@cascade-code-languages-misc-1 is listed by joshuarweaver/cascade-code-languages-misc-1 — review the source before installing
npx claudepluginhub joshuarweaver/cascade-code-languages-misc-1 --plugin asyrafhussin-agent-skills-124 skills in this plugin
/api-design-patternsRESTful API design, error handling, versioning, and best practices. Use when designing APIs, reviewing endpoints, implementing error responses, or setting up API structure. Triggers on "design API", "review API", "REST best practices", or "API patterns"./clean-code-principlesSOLID principles, design patterns, DRY, KISS, and clean code fundamentals. Use when reviewing architecture, checking code quality, refactoring, or discussing design decisions. Triggers on "review architecture", "check code quality", "SOLID principles", "design patterns", or "clean code"./code-slopDetect AI-generated code patterns ("slop") in PHP/Laravel and TypeScript/React source — comment narration, generic naming, premature interfaces, defensive overdose, mock-everything tests, and the absence of human "scars". Use when reviewing AI-assisted PRs, auditing code for taste/quality (not metrics — that's technical-debt), or hardening a code-review checklist. Triggers on "review for AI slop", "find AI patterns", "check code feels human", "audit code-quality taste".Other plugins' skills for the same job