AgentSkillsCN

fix-bug

诊断并修复合约、后端、数据库或前端的回归问题。在测试失败、行为与规范不符,或用户反馈意外错误时使用此功能。

SKILL.md
--- frontmatter
name: fix-bug
description: >
  Diagnose and fix regressions across contract, backend, database, or frontend.
  Use when tests fail, behavior diverges from spec, or users report unexpected
  errors.
metadata:
  short-description: Reproduce, fix, and verify regressions

Fix Bug

Apply focused fixes with regression protection.

Procedure

  1. Reproduce the issue from error report, test output, or repro steps.
  2. Add a failing test first when practical (handler/service/frontend as appropriate).
  3. Implement minimal fix (no bundled refactors).
  4. If fix touches contract or schema, follow $api-contract / $db-migration workflows.
  5. Run targeted tests first, then checks by risk:
    • normal code fix: make lint && make test
    • contract/schema/generated impact: add make validate
  6. Update progress.md with root cause and fix summary.

Rules

  • One bug, one fix scope.
  • Keep changes surgical.
  • Ship with regression coverage.