SKILL.md 1.3 KB


name: format-report-fix

description: Output format for reporting fixes.

Report Fix — Output Format

Context

When explaining fixes to the user, use a standardized format with concrete examples and causality.

Format (one fix per block)

### <number> Fix — <short title> **#<id>** — <brief description>

  • Before: what caused the problem (behavior + cause)
  • Example: real scenario showing the impact (numeric/concrete)
  • Fix: provide the concrete code/text change, ready to copy-paste, in this format:

    - **Fix**: 
    - **File**: `path/to/file.ext`
    - **Change**: 
        ```diff
        - old code/text
        + new code/text
        ```
    

Example

### 9 Fix — Explanation with examples
**#14** — Arrow onRetry recreated every render
Before: onRetry={(id) => {...}} inline in .map → new function on every render → MessageBubble (memo) re-renders even when nothing changed.
Example: 50 messages, you type a letter → 50 MessageBubbles re-render needlessly.
Fix: handleRetryDispatch with useCallback — stable across renders. Only the bubble with changed data updates.

Rules

  • Never just "fixed X" — show before, real impact example, and after.
  • The example must be numeric/concrete (e.g., "50 messages, you type a letter").
  • Concise: one fix per block, no defensive prose.