用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/seikaikyo/dash-skills --skill build-error-resolver命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Use when reviewing code for security vulnerabilities, implementing authentication/authorization, handling user input, or discussing web application security. Covers OWASP Top 10:2025, ASVS 5.0, LLM Top 10 (2025), and Agentic AI security (2026).
Guides authoring of high-quality YARA-X detection rules for malware identification. Use when writing, reviewing, or optimizing YARA rules. Covers naming conventions, string selection, performance optimization, migration from legacy YARA, and false positive reduction. Triggers on: YARA, YARA-X, malware detection, threat hunting, IOC, signature, crx module, dex module.
Throwaway HTML mockups: 2-3 design variants to compare.
正在显示 SKILL.md
基于 SOC 职业分类
| name | build-error-resolver |
| description | 建構與 TypeScript 錯誤修復專家。當建構失敗或出現類型錯誤時主動使用。僅修復建構/類型錯誤,最小化 diff,不做架構修改。專注於快速讓建構通過。 |
| source | everything-claude-code (MIT License) |
| original_author | affaan-m |
| updated | "2026-01-22T00:00:00.000Z" |
在以下情況使用此 Skill:
npm run build 失敗npx tsc --noEmit 顯示錯誤# TypeScript 類型檢查 (無輸出)
npx tsc --noEmit
# 顯示所有錯誤
npx tsc --noEmit --pretty --incremental false
# 檢查特定檔案
npx tsc --noEmit path/to/file.ts
# Next.js 建構
npm run build
# ESLint 檢查
npx eslint . --ext .ts,.tsx,.js,.jsx
npx tsc --noEmit --pretty
// 錯誤: Parameter 'x' implicitly has an 'any' type
function add(x, y) { return x + y }
// 修復: 加上類型註解
function add(x: number, y: number): number { return x + y }
// 錯誤: Object is possibly 'undefined'
const name = user.name.toUpperCase()
// 修復: Optional chaining
const name = user?.name?.toUpperCase()
// 或: Null check
const name = user && user.name ? user.name.toUpperCase() : ''
// 錯誤: Property 'age' does not exist on type 'User'
interface User { name: string }
const user: User = { name: 'John', age: 30 }
// 修復: 新增屬性到 interface
interface User {
name: string
age?: number
}
// 錯誤: Cannot find module '@/lib/utils'
// 修復 1: 檢查 tsconfig paths
{
"compilerOptions": {
"paths": { "@/*": ["./src/*"] }
}
}
// 修復 2: 使用相對路徑
import { formatDate } from '../lib/utils'
// 修復 3: 安裝缺少的套件
npm install @/lib/utils
// 錯誤: Type 'string' is not assignable to type 'number'
const age: number = "30"
// 修復: 轉型
const age: number = parseInt("30", 10)
// 錯誤: Type 'T' is not assignable to type 'string'
function getLength<T>(item: T): number {
return item.length
}
// 修復: 加上限制
function getLength<T extends { length: number }>(item: T): number {
return item.length
}
// 錯誤: React Hook cannot be called conditionally
function MyComponent() {
if (condition) {
const [state, setState] = useState(0) // 錯誤!
}
}
// 修復: Hook 移到頂層
function MyComponent() {
const [state, setState] = useState(0)
if (!condition) return null
// 使用 state
}
// 錯誤: 'await' only allowed within async functions
function fetchData() {
const data = await fetch('/api/data')
}
// 修復: 加上 async
async function fetchData() {
const data = await fetch('/api/data')
}
// 錯誤: Cannot find module 'react'
// 修復: 安裝依賴
npm install react
npm install --save-dev @types/react
# 建構錯誤修復報告
**日期:** YYYY-MM-DD
**建構目標:** Next.js Production / TypeScript Check
**初始錯誤:** X
**已修復錯誤:** Y
**建構狀態:** 通過 / 失敗
## 已修復錯誤
### 1. [錯誤類別]
**位置:** `src/components/Card.tsx:45`
**錯誤訊息:**
Parameter 'market' implicitly has an 'any' type.
**修復:**
+function formatMarket(market: Market) {
-function formatMarket(market) {
**修改行數:** 1
## 驗證步驟
1. TypeScript 檢查通過: `npx tsc --noEmit`
2. Next.js 建構成功: `npm run build`
3. 無新錯誤產生
# 檢查錯誤
npx tsc --noEmit
# 清除快取重建
rm -rf .next node_modules/.cache
npm run build
# 安裝缺少的依賴
npm install
# 自動修復 ESLint
npx eslint . --fix
# 驗證 node_modules
rm -rf node_modules package-lock.json
npm install
npx tsc --noEmit 回傳 code 0npm run build 成功完成