Main Site ↗

fix

by facebook244.3k50.5kGitHub

Use when you have lint errors, formatting issues, or before committing code to ensure it passes CI.

Loading...

Output Preview

output_preview.md

🛠️ Code Fix Report

📊 Execution Summary

| Step | Status | Details | |------|--------|---------| | Prettier Formatting | ✅ Success | Formatted 12 changed files | | Lint Check (linc) | ⚠️ Partial | Found 3 issues requiring manual fixes | | Overall Status | Needs Attention | Manual fixes required before commit |

📝 Formatted Files

// Example of formatted file: src/components/Button.js import React from 'react'; import PropTypes from 'prop-types'; const Button = ({ label, onClick, disabled = false }) => { return ( <button className={`btn ${disabled ? 'btn-disabled' : 'btn-primary'}`} onClick={onClick} disabled={disabled} > {label} </button> ); }; Button.propTypes = { label: PropTypes.string.isRequired, onClick: PropTypes.func.isRequired, disabled: PropTypes.bool, }; export default Button;

⚠️ Remaining Lint Issues

  1. src/utils/helpers.js:45

    • Issue: no-unused-vars - import { deprecatedHelper } from './legacy'
    • Fix: Remove unused import or use the imported function
  2. src/api/client.js:128

    • Issue: prefer-const - Variable apiKey is never reassigned
    • Fix: Change let apiKey = process.env.API_KEY; to const apiKey = process.env.API_KEY;
  3. tests/components/Modal.test.js:89

    • Issue: jest/no-disabled-tests - Test marked with .skip()
    • Fix: Remove .skip() or implement the test

🚀 Next Steps

  1. Manual Fixes Required: Address the 3 lint issues above
  2. Re-run Verification: Execute yarn linc after fixes
  3. Ready for Commit: Once all checks pass, proceed with git commit

💡 Recommendations

  • Consider adding a pre-commit hook to automate this process
  • Review the deprecated helper usage in src/utils/helpers.js

Report generated at: 2024-01-15T14:30:00Z

10/10Security

Low security risk, safe to use

-
Clarity
-
Practicality
-
Quality
-
Maintainability
-
Innovation
Development
Compatible Agents
Claude Code
Claude Code
~/.claude/skills/
Codex CLI
Codex CLI
~/.codex/skills/
Gemini CLI
Gemini CLI
~/.gemini/skills/
O
OpenCode
~/.opencode/skills/
O
OpenClaw
~/.openclaw/skills/
GitHub Copilot
GitHub Copilot
~/.copilot/skills/
Cursor
Cursor
~/.cursor/skills/
W
Windsurf
~/.codeium/windsurf/skills/
C
Cline
~/.cline/skills/
R
Roo Code
~/.roo/skills/
K
Kiro
~/.kiro/skills/
J
Junie
~/.junie/skills/
A
Augment Code
~/.augment/skills/
W
Warp
~/.warp/skills/
G
Goose
~/.config/goose/skills/
SKILL.md

Fix: Behavior Correction Skill

Activated when user gives feedback with "fix:" prefix. Finds the root cause of the mistake, improves rules/skills/hooks, and fixes the current issue.

Trigger

  • Messages with fix: prefix
  • Behavior correction feedback: "fix this", "correct", "why not", "why missing"

Procedure

Step 0. TaskCreate (MANDATORY — first action, no exceptions)

Before any analysis or text output, create tasks:

TaskCreate: "fix: {user feedback summary}"          ← parent task
TaskCreate: "1. Root cause analysis"
TaskCreate: "2. Root cause fix"
TaskCreate: "3. Fix current issue"
TaskCreate: "4. Completion report"

Step 0 is the first tool call after /fix activation. Text output before TaskCreate = violation.

1. Root Cause Analysis

  • Identify what went wrong from user feedback
  • Search for the responsible skill/rule/hook files (Grep/Glob)

2. Root Cause Fix (Prevent Recurrence)

Priority (check in order — stop at the first match):

PriorityTargetConditionExample
1stSkill (~/.claude/skills/, .claude/skills/)Skill is incomplete or has wrong procedureFix procedure step missing
2ndRule (~/.agent/rules/, .claude/rules/)Behavior rule is missing or insufficientAdd to failed-attempts.md
3rdHook (settings.json hooks)Automation needed for repeated mistakesAdd PostToolUse hook
4thSKILL.md docsDocumentation doesn't match actual behaviorUpdate section

When fixing:

  • Skill is 1st priority — if the problem is a skill's incomplete procedure, fix the skill. Don't skip to failed-attempts.md
  • Skill improvements must follow skill-kit upgrade procedure (direct script/topic file edits allowed)
  • Rule location must be confirmed via AskUserQuestion
  • failed-attempts.md recording is only for cases not covered by skill/rule/hook — no duplicate recording if root cause is already reflected in a skill or rule

3. Fix Current Issue + Resume Original Work

  • After root cause fix, immediately resolve the current problem
  • If unsure what to execute, AskUserQuestion — don't skip execution because you don't know the command
  • Verify fix results (build/test/run)
  • Continue the originally intended work with the corrected approach — don't just clean up wrong artifacts, complete the original task
  • Register the original task with TaskCreate and execute immediately

4. Completion Report

Fix complete:
- Root cause: {what was missing}
- Improvement: {which file was modified and how}
- Current fix: {result of fixing the current issue}

Anti-patterns

  • Repeating "already fixed" without actually fixing the root cause
  • Patching only the current issue without improving skills/rules/hooks
  • Text response without TaskCreate after /fix activation
  • Recording in failed-attempts.md when the root cause is a skill defect (skill fix is 1st priority)

Source: https://github.com/facebook/react#.claude-skills-fix

Content curated from original sources, copyright belongs to authors

Grade B
-AI Score
Best Practices
Checking...
Try this Skill

User Rating

USER RATING

0UP
0DOWN
Loading files...

WORKS WITH

Claude Code
Claude
Codex CLI
Codex
Gemini CLI
Gemini
O
OpenCode
O
OpenClaw
GitHub Copilot
Copilot
Cursor
Cursor
W
Windsurf
C
Cline
R
Roo
K
Kiro
J
Junie
A
Augment
W
Warp
G
Goose