本文へ移動
cccskills
無料GitHub で公開

fec-debug-framework

Use when diagnosing frontend build failures, runtime errors, UI anomalies, API/data problems, white screens, request failures, or unexplained production exceptions; Chinese triggers include debugging, debug, troubleshooting, positioning, error reporting, exceptions, white screens, request failures.

インストール方法を見る

含まれるファイル(2)

  • SKILL.md5.7 KB
  • references/report-template.md1.3 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Front-end diagnostic framework

Purpose

Use an evidence-driven triage, collection, hypothesis, verification, and remediation process to locate front-end faults and avoid relying on intuition to expand the scope of changes.

Procedure

All front-end problem diagnosis follows a unified process:

Step 1: Classify

Identify problem type and scope of impact:

TypeJudgment basisDiagnosis entrance
buildCommand exit is non-zero, stderr has error→ Build module
runtimeConsole exception, white screen, function unavailable→ Runtime module
uiVisual deviation, interaction not as expected→ UI module
apiRequest status code exception, data inconsistency→ API module

Cross-type problems (such as API failure leading to UI exceptions) start with the most superficial symptoms and drill down layer by layer.

Step 2: Collect

Collect evidence by type (specific strategies for each module, see below).

Step 3: Hypothesize

Propose possible root causes based on evidence, ranked by likelihood:

  • Every hypothesis must be testable (have clear verification methods)
  • Keep at most 3 hypotheses to avoid divergence
  • Format: "Because X leads to Y, which can be verified by Z"

Step 4: Verify

Test the hypotheses one by one:

  • Start with the most likely hypothesis
  • Only change one variable at a time
  • Verification result record: confirmed / falsified / pending
  • If all assumptions are falsified, return to Step 2 and collect again.

Step 5: Fix & Validate

  • Apply minimal fixes
  • Run affected verification commands
  • Confirmed no regression
  • Output repair report

Diagnostic module

Build module

Collect: Run minimal failing commands, capture full stderr/stdout Assumptions: Grouped by error type (type error, import failure, configuration resolution, missing dependency), match known patterns Verification: Fix a type of root cause → rerun the command → confirm that errors are reduced Special handling:

  • Collect evidence for dependency version, peer dependency, ESM/CJS, and lockfile related failures first as build compatibility issues
  • Log package manager, Node version, lockfile diff, related package version and full error log
  • No longer upgrade dependencies, manually edit lockfiles when evidence is lacking, or mix dependency migrations with normal debug fixes in the same batch of changes
  • If the task goal itself is version upgrade, CVE repair or lockfile risk review, it should be transferred to the dependency upgrade workflow
  • CI exclusive failure check Node version, package manager, environment variable differences

Runtime module

Collect:

  • Recurrence path (sequence of user operations)
  • Console errors and stack
  • Component rendering tree status (check whether key components are mounted correctly)
  • Relevant store/state snapshot

Assumptions:

  • Stack reverse tracing: trace back from the exception location to the trigger source
  • State flow analysis: Check whether state changes are as expected
  • Life cycle analysis: whether uninitialized data is accessed at the wrong time

Verification:

  • Add temporary log confirmation status value
  • Add assertions on suspicious paths
  • Recurrence path verification fix

UI module

Collect:

  • Current screenshot vs desired effect
  • DOM structure check (whether the element exists and whether the level is correct)
  • Computed style checks (actual applied CSS values)
  • Responsive breakpoint testing

Assumptions:

  • CSS specificity conflict (selector weight is not enough to be overridden)
  • Component state mismatch (props/state not passed correctly)
  • Layout model problem (flex/grid configuration error)
  • Missing responsive breakpoints

Verification:

  • Browser DevTools real-time adjustment verification
  • Isolated component testing (excluding external style interference)
  • Multiple breakpoints to verify one by one

API module

Collect:

  • Request URL, method, headers, body
  • Respond to status, headers, body
  • Network waterfall timing
  • Cache data in related store/state

Assumptions:

  • Request link hop-by-hop inspection (URL → Middleware → Interceptor → Server)
  • Data conversion checks (response parsing, type mapping)
  • Cache policy check (expiration, invalidation, race condition)
  • Concurrent request race condition (race condition)

Verification:

  • curl independent reproduction (excluding front-end interference)
  • Mock layer by layer to locate the problem level
  • End-to-end request validation fixes

Detailed reference

When writing a diagnostic report, load references/report-template.md.

Constraints

  • Don't guess at root cause when evidence is lacking
  • Not "fixed" by turning off rules, removing tests, or reducing type safety
  • Change only one variable at a time to test your hypothesis
  • Do not expand the scope of changes before verification
  • The same hypothesis fails verification 3 times in a row, stops and reports blocking

Expected Output

  • The diagnostic report is saved as reports/debug-YYYY-MM-DD-HHmmss.md
  • The report includes issue type, key evidence, hypothesis verification records, root cause, fix content, verification results and remaining risk
  • Build/runtime/ui/api problems can explain the reproduction path, verification command or next blocking point

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

用于审查或改进前端无障碍、语义结构、键盘支持、焦点管理、ARIA 标签、屏幕阅读器行为、WCAG 2.2 问题、触控无障碍或辅助技术回归;中文触发词包括 无障碍、accessibility、a11y、WCAG、屏幕阅读器。

日本語の概要は準備中です。原文の説明を表示しています。

bovinphang/frontend-craft222026年9月26日 更新

Use when reviewing or improving frontend accessibility, semantic structure, keyboard support, focus management, ARIA labels, screen reader behavior, WCAG 2.2 issues, touch accessibility, or assistive-technology regressions; Chinese triggers include accessibility, accessibility, a11y, WCAG, screen reader.

日本語の概要は準備中です。原文の説明を表示しています。

bovinphang/frontend-craft222026年9月26日 更新

用于从参考系统中吸收想法、能力、工作流、架构、质量体系、生态扩展或工程实践,并通过原创的项目内重设计转化为当前项目能力,而不是复制原实现。

日本語の概要は準備中です。原文の説明を表示しています。

bovinphang/frontend-craft222026年9月26日 更新

Use when absorbing ideas, capabilities, workflows, architecture, quality systems, ecosystem extensions, or engineering practices from any reference system into the current project through original, project-native redesign rather than copying.

日本語の概要は準備中です。原文の説明を表示しています。

bovinphang/frontend-craft222026年9月26日 更新

用于设计、实现或审查前后端 API 集成、类型化 API client、REST/tRPC/OpenAPI 客户端选型、认证刷新、API 错误映射、上传流程、SSE/WebSocket/轮询选择、CORS 相关前端行为或跨边界 loading/error 状态。不要用于纯后端服务架构或仅 TanStack Query 缓存策略;中文触发词包括 API 集成、前后端联调、typed API client、接口错误处理、SSE、WebSocket。

日本語の概要は準備中です。原文の説明を表示しています。

bovinphang/frontend-craft222026年9月26日 更新

Use when designing, implementing, or reviewing frontend-to-backend API integration, typed API clients, REST/tRPC/OpenAPI client choices, auth refresh, API error mapping, upload flows, SSE/WebSocket/polling choices, CORS-facing frontend behavior, or cross-boundary loading/error states. Do not use for backend-only service architecture or TanStack Query cache policy alone; Chinese triggers include API integration, front-end and back-end joint debugging, typed API client, Interface error handling, SSE, WebSocket.

日本語の概要は準備中です。原文の説明を表示しています。

bovinphang/frontend-craft222026年9月26日 更新

bovinphang のスキルをすべて見る

このスキルの問題を報告する