Skip to content
cccskills
FreePublished on GitHub

scan-dbg

Use when: analysing a project's debug and reliability health — inline markers, logging hygiene, and error handling.

The English summary is being prepared. Showing the original description.

See how to install

Files included (1)

  • SKILL.md4.2 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Debug Perspective (DBG)

Evaluates how much latent technical debt and reliability risk exists in the production codebase. Assigns a score from 0.0 to 1.0 across five dimensions.

Dimensions

TODO/FIXME density — How much acknowledged but unresolved debt exists?

  • Score = max(0, 1 - count / 10)
  • 0 markers = 1.0, 10+ markers = 0.0
  • FIXME and BUG markers carry higher priority than TODO and HACK
  • Test files are excluded — markers in test fixtures are not production debt

Console log hygiene — Is logging disciplined?

  • Score = max(0, 1 - count / 10)
  • 0–5 console.log calls = no finding (below noise floor)
  • 6+ calls = medium-priority finding
  • Test files are excluded

Error handling hygiene — Are errors surfaced rather than silently swallowed?

  • Look for: catch {} with no logging, catch (e) {} that swallows the error, .catch(() => {}) no-ops
  • Score: 1.0 if no silent swallows, 0.5 if 1–3 found, 0.0 if 4+
  • Finding priority: high (silent swallows hide production failures)

Type-safety escapes — Are type bypasses minimised?

  • Look for: as any, // @ts-ignore, // @ts-nocheck, // eslint-disable
  • Score: max(0, 1 - count / 5)
  • Finding priority: medium

Observable failure modes — Can operators see failures from outside the module?

  • Heuristic: presence of structured logging, error event emission, or health-check endpoints
  • Score: 1.0 if at least one observable output exists per module boundary, 0.5 if partial, 0.0 if none
  • Finding priority: medium

Scoring

dbg_score = (todo_score + log_score + error_score + typesafe_score + observable_score) / 5

Score interpretation:

  • 0.9–1.0 Codebase is clean — debt is either absent or well below the noise floor
  • 0.7–0.9 Minor debt — manageable with a focused cleanup pass
  • 0.5–0.7 Significant unresolved markers — schedule debt resolution before next sprint
  • 0.0–0.5 High debt density — reliability risk is elevated

Tasks Generated

FindingPriority
TODO/FIXME markers with FIXME/BUG typehigh
TODO/FIXME markers (TODO/HACK only)medium
> 5 console.log calls in production codemedium
Silent error swallows in catch blockshigh
Type-safety escape hatches (as any, @ts-ignore)medium
No observable failure output in modulemedium

Agent Analysis Guide

When performing a manual DBG analysis:

  1. Search for TODO, FIXME, HACK, BUG, XXX in all source files (exclude test directories)
  2. Group markers by severity — FIXME/BUG are active defects or known failures, TODO are deferred work
  3. For each FIXME/BUG: determine if it is blocking user-facing functionality
  4. Search for console.log/warn/error in production source — these should be replaced by a structured logger
  5. Check error handling: look for catch blocks that silently swallow errors (catch {} with no logging, .catch(() => {}) no-ops)
  6. Look for as any, // @ts-ignore, // @ts-nocheck, or // eslint-disable — each one is a type-safety escape hatch hiding a potential bug
  7. Identify whether each module boundary has at least one observable failure output: structured logging, error event emission, or a health-check endpoint
# Structured logging — look for a logger library in use
grep -r "winston\|pino\|bunyan\|logger\." src/ --include="*.ts" --include="*.js" -l

# Error event emission — look for error events being emitted
grep -r "emit.*['\"]error['\"]" src/ --include="*.ts" --include="*.js" -l

# Health-check endpoints — look for health or ping routes
grep -r "['\"]\/health\|['\"]\/healthz\|['\"]\/ping\|healthCheck\|health_check" src/ --include="*.ts" --include="*.js" -l

Output: ranked list of debug findings — FIXME/BUG first, then TODO density by module, then silent swallows, then logging and type-safety escapes, then observability gaps.

When debugging failures are found, apply the Root Before Repair (RBR) protocol from skills/agent-foundations/SKILL.md — confirm root cause with evidence before proposing a fix.

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

Universal guardrails loaded by every agent. Defines Verify Before Reporting (VBR), Write-Ahead Log (WAL), and the security baseline. Always-on, role-independent.

The English summary is being prepared. Showing the original description.

Agistra/agistra.dev5Updated Oct 19, 2026

Use when: architecture mode, architect this, ADR, C4, PlantUML, system boundary, design decision, PRD gap, high ambiguity, multiple technical approaches, security architecture, data architecture, integration risk, implementability gap, story ticket, or epic ticket.

The English summary is being prepared. Showing the original description.

Agistra/agistra.dev5Updated Oct 19, 2026

Use when: assumptions audit, audit assumptions, check for hidden assumptions, plan/ticket has ambiguous scope edges, pre-flight before finalizing a ticket, unstated assumptions, or 'what am I assuming'. Surfaces unstated assumptions, ambiguous scope edges, and untested preconditions in a finished plan/ticket/ADR before it is handed to Builder. Optional pass — Architect judges when to apply it; not a mandatory gate on every ticket.

The English summary is being prepared. Showing the original description.

Agistra/agistra.dev5Updated Oct 19, 2026

Use when: Tester needs UI state evidence for VBR, or Builder needs to verify an integration wire is observable end-to-end. Powered by agent-browser MCP — token-efficient browser automation (200–400 tokens/page).

The English summary is being prepared. Showing the original description.

Agistra/agistra.dev5Updated Oct 19, 2026

Use when drafting a bug or defect ticket, reviewing one someone else wrote, or deciding whether a reported problem is ready to file. Keeps what the reporter actually saw separate from what the agent later found out, so a reader can tell which lines are testimony and which are collected proof. Trigger phrases: 'file a bug', 'write up this defect', 'triage this report', 'is this ticket ready to file', 'what did the reporter actually see'.

The English summary is being prepared. Showing the original description.

Agistra/agistra.dev5Updated Oct 19, 2026

Conducts multi-axis code review. Use before merging any change. Use when reviewing code written by yourself, another agent, or a human. Use when you need to assess code quality across multiple dimensions before it enters the main branch.

The English summary is being prepared. Showing the original description.

Agistra/agistra.dev5Updated Oct 19, 2026

See all skills by Agistra

Report a problem with this skill