Skip to content
cccskills
FreePublished on GitHub

tech-debt-scan

Review a codebase for maintainability problems such as duplicated logic, fragile assumptions, dead code, and confusing structure. Produce a prioritized cleanup backlog with file locations, practical risks, and suggested first steps; the scan itself does not implement fixes.

OriginalShow the original description

Research-only technical debt scan for this EspControl repository. Use when the user asks for a tech debt scan, cleanup backlog, maintainability review, messy or rushed implementation review, duplicated logic audit, fragile assumption scan, dead code review, architecture cleanup plan, or asks to identify code that works now but will be painful to maintain later.

jtenniswood/espcontrol1,120 stars(GitHub 1,120 + cccskills 0)

Run score Not tested

See how to install

Good for

  • Find code that may become difficult to maintain
  • Build a prioritized technical debt cleanup backlog
  • Review duplicated logic, dead code, or fragile assumptions

Files included (2)

  • SKILL.md5.6 KB
  • agents/openai.yaml217 B

SKILL.md (original)

Review the instructions the agent will receive before you install.

Tech Debt Scan

Perform a research-only review of the repository and turn findings into a practical cleanup backlog. Do not implement fixes during the scan unless the user separately selects a backlog item and asks for it to be fixed.

The user is technical but not development-oriented. Explain findings in plain language, with enough file detail for a future implementation task.

Guardrails

  • Treat the first pass as research only.
  • Do not change product code, firmware, docs, generated files, or tests while scanning.
  • The only allowed file change during the scan is creating or updating the cleanup backlog file.
  • If the user asks to fix an item later, use the repository branching and PR workflow from AGENTS.md.
  • Do not close issues or merge PRs as part of this skill.

Backlog File

Create or update:

.agents/tech-debt-cleanup-backlog.md

Use this file as the durable task list. Keep it concise enough to revisit after each cleanup task. If the file already exists, update it instead of replacing it blindly: preserve unresolved useful items, remove or mark completed items only when there is direct evidence, and add new findings with dates or context where helpful.

Scan Workflow

  1. Inspect repository state.

    • Check the branch and local changes.
    • Do not revert or overwrite user work.
    • Note whether the scan was run from main, a feature branch, or a PR branch.
  2. Map the project structure.

    • Identify the main firmware, device, web, docs, scripts, and generated output areas.
    • Read representative files before drawing conclusions.
    • Prefer targeted searches with rg and focused file reads.
  3. Look for these debt patterns:

    • Rushed or messy implementation.
    • Duplicated logic.
    • Inconsistent naming or folder structure.
    • Fragile assumptions, hidden coupling, or order-dependent behavior.
    • Missing error handling or weak failure messages.
    • Security, validation, or unsafe input handling issues.
    • Dead code, unused files, stale generated output, or obsolete scripts.
    • Architecture that is becoming confusing.
    • Code that works now but will be painful to maintain later.
  4. Validate each meaningful finding.

    • Name the files or folders involved.
    • Explain the observed pattern, not just the conclusion.
    • Check whether there is an existing helper, component, script, or pattern that the code should probably use instead.
    • Separate confirmed problems from areas that only need deeper inspection.
  5. Prioritize by practical impact.

    • Critical: likely to cause incorrect builds, broken firmware, unsafe input, release risk, upgrade risk, data loss, or confusing architecture around a core workflow.
    • Medium: clear maintainability cost, duplication, inconsistency, fragile assumptions, or missing validation that is not immediately dangerous.
    • Nice-to-have: polish, readability, organization, small consistency issues, or optional follow-up checks.

Backlog Format

Write the backlog file with this structure:

# Tech Debt Cleanup Backlog

Last reviewed: YYYY-MM-DD
Review scope: <branches, folders, or areas inspected>

## Critical Issues

### 1. <short action-oriented title>
- Where: `<file-or-folder>` and any related areas
- Why it matters: <plain-English risk>
- Recommended change: <practical fix direction>
- Safe to fix now?: Yes / Wait, with reason
- Suggested first step: <smallest useful next action>

## Medium Cleanup Items

### 1. <short action-oriented title>
- Where: `<file-or-folder>` and any related areas
- Why it matters: <plain-English risk>
- Recommended change: <practical fix direction>
- Safe to fix now?: Yes / Wait, with reason
- Suggested first step: <smallest useful next action>

## Nice-to-Have Polish

### 1. <short action-oriented title>
- Where: `<file-or-folder>` and any related areas
- Why it matters: <plain-English risk>
- Recommended change: <practical fix direction>
- Safe to fix now?: Yes / Wait, with reason
- Suggested first step: <smallest useful next action>

## Completed Items

- YYYY-MM-DD: <item completed and PR/branch if known>

## Scan Notes

- Checks run: <commands or review activities>
- Areas not deeply reviewed: <known gaps>

Use numbering inside each priority section so the user can choose a cleanup task by section and number, such as "Medium item 2".

Response Workflow

After creating or updating the backlog file:

  1. Show the prioritized cleanup backlog in the chat.
  2. Keep the wording approachable and focused on practical next steps.
  3. Ask the user to select the next task to work on.

After completing a selected cleanup task in a later turn:

  1. Update the backlog file to move or mark the completed item.
  2. Re-display the remaining cleanup backlog.
  3. Ask the user to select the next task.

Output Style

Use this chat format after a scan:

Created/updated: .agents/tech-debt-cleanup-backlog.md

Critical issues:
1. <title> - <one-line practical impact>

Medium cleanup items:
1. <title> - <one-line practical impact>

Nice-to-have polish:
1. <title> - <one-line practical impact>

Pick the next item by saying something like "Medium item 1".

If no critical issues are found, say that clearly and still list medium and nice-to-have items.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Preview completed Git branches and worktrees that are safe to remove, then clean them up locally. With an additional option, delete matching remote branches on GitHub. The workflow skips protected branches, open pull requests, and worktrees with uncommitted changes.

  • Removing local branches after pull requests merge
  • Tidying completed worktrees safely
  • Deleting merged GitHub branches when requested
jtenniswood/espcontrol1.1KUpdated Oct 27, 2026

Find local Git worktree folders whose branches or pull requests have merged into main, then preview which clean, inactive folders can be removed. The bundled script defaults to a dry run and requires an explicit apply option to perform cleanup.

  • Previewing merged worktree folders for cleanup
  • Tidying old feature branch directories
  • Removing merged PR worktrees while keeping branch refs
jtenniswood/espcontrol1.1KUpdated Oct 27, 2026

compile

FreeSummary

Compile ESPHome firmware for every listed device using the version pinned by the repository and Docker. When a build fails, inspect the reported YAML or configuration issue, fix its source, and retry until each device compiles.

  • Checking firmware builds before committing
  • Finding YAML or configuration errors
  • Compiling all listed devices with Docker
jtenniswood/espcontrol1.1KUpdated Oct 27, 2026

docs-review

FreeSummary

Check a code change for missing, outdated, excessive, or misplaced documentation. Identify only actionable gaps, explain who needs the information, and suggest the smallest useful update and a suitable existing documentation location.

  • Check whether a feature change needs user documentation
  • Review documentation coverage in a pull request
  • Find outdated or misplaced docs related to a code change
jtenniswood/espcontrol1.1KUpdated Oct 27, 2026

Expert Review

FreeSummary

Review a codebase and receive ranked recommendations for maintainability, consistency, reuse, quality, and safer upgrades. Findings are explained in plain language with evidence, user impact, migration approaches, risk controls, and estimated effort; the review does not make changes by default.

  • Assessing code quality and consistency
  • Finding duplication and reuse opportunities
  • Planning safer upgrades or larger refactors
jtenniswood/espcontrol1.1KUpdated Oct 27, 2026

expert-reset

FreeSummary

Review a project as if rebuilding it today while keeping its current user experience as the target. Produce evidence-based architecture and migration recommendations, explain tradeoffs in plain language, and keep the work research-only unless implementation is requested separately.

  • Exploring a from-scratch architecture for a project
  • Comparing current structure with a reset design
  • Planning a staged migration without changing code
jtenniswood/espcontrol1.1KUpdated Oct 27, 2026

See all skills by jtenniswood

Report a problem with this skill