agentleFS
sumuligesumulige/sumulige-claude/.claude/skills/quick-fix/SKILL.md

quick-fix

Skill2 starsChanged 10 months agoMITView on GitHub

快速修复者 - 优化版 build-error-resolver 快速修复常见的开发问题: 轻量 + 快速 + 最小变更 使用 haiku 模型,确保响应快速,成本低。 原则:快速、最小、安全。不确定的修复不要做。

14 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use security-review.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • SentrySkill

    security-review

    Finds exploitable application security vulnerabilities in code changes. Use for Warden security scans, appsec review, OWASP-style checks, authentication or authorization bugs, injection, XSS, SSRF, path traversal, secrets, unsafe crypto, webhook verification, open redirects, or sensitive data exposure.

    Also in 3 projects that use this

The file

Files
SKILL.md

Quick Fix

快速修复者 - 优化版 build-error-resolver

核心职责

快速修复常见的开发问题:

  1. 构建错误 - TypeScript 编译错误
  2. Lint 错误 - ESLint/Prettier 问题
  3. 类型错误 - 类型不匹配、缺少类型

设计理念

轻量 + 快速 + 最小变更

使用 haiku 模型,确保响应快速,成本低。

工作流程

1. 错误捕获

# 获取构建错误
npm run build 2>&1 | head -100

# 获取类型错误
npx tsc --noEmit 2>&1 | head -50

# 获取 lint 错误
npx eslint . --format json 2>&1 | head -100

2. 错误分类

类型示例处理策略
类型错误TS2345: Argument of type...添加类型断言或修复类型
导入错误Cannot find module...检查路径或安装依赖
语法错误Unexpected token...修复语法
Lint 错误no-unused-vars删除或使用变量

3. 增量修复

原则:每次只修复一个错误
流程:
1. 读取第一个错误
2. 定位问题文件和行号
3. 应用最小修复
4. 重新编译验证
5. 如果仍有错误,重复步骤 1

常见修复模式

类型错误

// 错误: Type 'string | undefined' is not assignable to type 'string'
// 修复 1: 非空断言
const value = maybeString!

// 修复 2: 默认值
const value = maybeString ?? ''

// 修复 3: 类型守卫
if (maybeString) {
  const value = maybeString
}

导入错误

// 错误: Cannot find module './utils'
// 检查 1: 文件是否存在
// 检查 2: 路径是否正确
// 检查 3: 扩展名是否需要

// 修复: 更正路径
import { helper } from './utils/helpers'

Lint 错误

// 错误: 'foo' is defined but never used
// 修复 1: 删除未使用的变量
// 修复 2: 如果需要保留,使用 _ 前缀
const _foo = unused

输出格式

# Quick Fix Report

## Errors Found: X
## Fixed: Y
## Remaining: Z

## Fixes Applied
| File | Line | Error | Fix |
|------|------|-------|-----|
| src/app.ts | 42 | TS2345 | Added type assertion |
| src/utils.ts | 15 | no-unused-vars | Removed unused import |

## Build Status
✅ SUCCESS / ❌ FAILED (X errors remaining)

使用方式

# 修复构建错误
/fix --build

# 修复 lint 错误
/fix --lint

# 修复类型错误
/fix --type

# 自动修复所有
/fix --all

限制

  • 不处理复杂的架构问题
  • 不重构代码
  • 仅做最小必要的修改
  • 如果错误过于复杂,建议使用 /plan 先规划

原则:快速、最小、安全。不确定的修复不要做。

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.