All skills
asyrafhussin avatar

/technical-debt

@4df703d

Technical debt inventory, prioritization, and audit for PHP/Laravel (MySQL) and Node/TypeScript/React projects. Use when assessing code health, identifying refactoring candidates, planning debt paydown, or auditing a codebase for accumulated debt. Triggers on "audit technical debt", "find tech debt", "debt inventory", "what should we refactor first", or tasks involving code health, security debt, performance debt, data debt, observability debt, debt prioritization, or remediation planning.

Use this Skill: https://skilld.dev/gh/asyrafhussin/agent-skills/technical-debt

This session only. Nothing lands on disk.

rulesinfra-deprecated-apis.md

≈800 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Deprecated Framework APIs

Impact: HIGH (Deprecations become breakages on the next major upgrade)

Every deprecation warning is the framework telling you exactly what will break in the next major release. Ignoring them doesn't postpone the cost — it concentrates it on whoever does the upgrade, who is now blocked by hundreds of issues at once.

How to Detect

# Laravel
php artisan about                           # framework version
grep -rn '@deprecated' vendor/laravel/      # known deprecated APIs
# Run tests with deprecation reporting on:
APP_ENV=testing E_DEPRECATED=on php artisan test

# React
# React DevTools logs deprecations in console
# eslint-plugin-react flags many deprecated APIs:
npx eslint . --rule 'react/no-deprecated: error'

# Node
node --pending-deprecation app.js          # surface upcoming deprecations
node --throw-deprecation app.js            # treat them as errors in CI

# Generic: parse build/test logs
npm test 2>&1 | grep -iE 'deprecat|warning' | sort -u

Incorrect

// ❌ Laravel deprecated API usage left in code
use Illuminate\Support\Facades\Input;       // deprecated in Laravel 5.x; removed in 6.0
$name = Input::get('name');

// ❌ Method signature that's been overhauled
public function failed(Exception $e)        // Laravel 10+ expects ?Throwable
{
    // ...
}

// ❌ Deprecated React lifecycle method
class UserList extends React.Component {
  componentWillMount() {                    // deprecated since React 16.3
    this.fetch();
  }
}

Problems:

  • Next Laravel major: Input gone; failed(Throwable) enforced — both break at once
  • React 18 strict mode logs warnings; React 19 may remove them entirely
  • Deprecation log noise hides genuine warnings

Correct

// ✅ Use current APIs
$name = request()->input('name');

public function failed(?Throwable $e): void
{
    // ...
}
// ✅ Hooks or current lifecycle methods
function UserList() {
  useEffect(() => { fetch(); }, []);
}

Add a CI gate:

- name: No deprecation warnings
  run: |
    OUTPUT=$(npm test 2>&1 || true)
    echo "$OUTPUT" | grep -qiE 'deprecat' && { echo "Deprecations found"; exit 1; }
    exit 0

Benefits:

  • Next major upgrade is hours, not weeks
  • Test output is signal again
  • Framework authors' migration notes apply directly without rediscovery

Remediation Strategy

  • Effort: S–M per deprecation (the migration path is usually documented by the framework)
  • When to pay down:
    • Read the framework's upgrade guide when they ship a deprecation — pay down what you can immediately
    • CI gate: zero new deprecation warnings allowed; old ones whittled down per sprint
  • Order of operations: fix deprecations before attempting the major upgrade — never together

Reference: Laravel Upgrade Guide · React Strict Mode · Node Deprecations

Source: SKILL.md on GitHub

No alerts16d3 checks · Risk SAFE
  • Gen Agent Trust Hub16d

    The skill provides a comprehensive and safe framework for identifying, prioritizing, and auditing technical debt in PHP/Laravel and Node/TypeScript/React projects. No security risks or malicious behaviors were detected.

  • Socket16d

    No alerts

  • Snyk16d

    Risk: LOW · No issues

Signed by skilld at 4df703d. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub last month.

Steadyupdated 5 months ago
metadata
{
  "author": "agent-skills",
  "version": "1.0.0"
}

README badge

README badge for asyrafhussin/agent-skills/technical-debt