AgentSkillsCN

propose_fix

针对各类缺陷进行深入分析,并在尽量减少副作用的前提下提出全面的修复方案

SKILL.md
--- frontmatter
name: propose_fix
description: Analyze bugs and propose comprehensive fixes with minimal side effects
category: qa
agent_affinity: debugger_qa

Propose Fix Skill

Fix Proposal Template

Bug Analysis

  • Root Cause: [What is the underlying issue?]
  • Impact: [Who is affected? How critical?]
  • Affected Components: [Which files/modules involved?]

Proposed Solution

  • Approach: [How to fix it?]
  • Files to Change: [List of files]
  • Estimated Complexity: [Low/Medium/High]

Implementation Steps

  1. [Step 1]
  2. [Step 2]
  3. [Step 3]

Testing Plan

  • Unit tests added/updated
  • Integration tests
  • Manual testing steps
  • Regression testing

Risks & Considerations

  • [Any potential side effects?]
  • [Breaking changes?]
  • [Performance impact?]

Example Proposal

Bug: Users can't login with valid credentials

Root Cause: JWT verification using wrong secret after recent deployment

Proposed Solution:

  • Update JWT verification to use correct environment variable
  • Add validation to ensure JWT_SECRET is set on startup

Files to Change:

  • src/middleware/auth.ts
  • src/config/env.ts

Implementation:

  1. Update auth.ts to use process.env.JWT_SECRET
  2. Add validation in env.ts to check JWT_SECRET exists
  3. Add unit test for JWT verification

Testing:

  • Unit test: Verify token validation with correct secret
  • Integration test: Login flow end-to-end
  • Manual: Login with test user

Risks: None, this is a critical bug fix


Assignment: Backend_Core should implement this fix

Related Skills

  • analyze_error_logs - Analyze logs before proposing fix