skills/build-error-resolver/SKILL.md
建構與 TypeScript 錯誤修復專家。當建構失敗或出現類型錯誤時主動使用。僅修復建構/類型錯誤,最小化 diff,不做架構修改。專注於快速讓建構通過。
npx skillsauth add seikaikyo/dash-skills build-error-resolverInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
Security scan pending...
This skill is queued for security scanning. Results will appear when the scan completes.
在以下情況使用此 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 成功完成tools
Conduct comprehensive GDPR compliance assessments by evaluating data processing activities against EU Regulation 2016/679, including Article 30 records of processing, lawful basis validation, data subject rights implementation, Data Protection Impact Assessments (DPIAs) under Article 35, breach notification procedures, international transfer safeguards (SCCs, adequacy decisions), and technical/organizational measures under Article 32. Use when processing personal data of EU residents, preparing for supervisory authority audits, implementing privacy-by-design for new systems, scoping compliance gaps for M&A due diligence, assessing third-party processors, or responding to data subject access requests at scale. Incorporates 2026 guidance from ICO, EDPB, and post-Data (Use and Access) Act 2025 UK-GDPR considerations. Do not use for implementing specific Article 32 controls — use implementing-gdpr-data-protection-controls; or for DSAR automation — use implementing-gdpr-data-subject-access-request.
tools
Parse Windows forensic artifacts—$MFT/$J (MFTECmd), Prefetch (PECmd), registry hives (RECmd), shellbags, and Amcache—into normalized CSV/JSON with Eric Zimmerman's EZ Tools, then load results into Timeline Explorer for analysis. Use during DFIR/incident-response investigations, after triage collection (e.g. with KAPE), to establish program execution, file/folder access, and persistence evidence from acquired forensic images.
development
Build automated multi-turn adversarial attacks against conversational LLM targets using Microsoft PyRIT's RedTeamingOrchestrator, CrescendoOrchestrator (gradual escalation), and TreeOfAttacksWithPruningOrchestrator (adaptive branching), with scorer feedback loops and persisted conversation memory. Use when single-shot LLM scanning is insufficient and you need multi-turn, scorer-driven AI red-team campaigns against a chatbot or agent.
testing
Stand up MISP, enable and cache curated threat feeds (CIRCL, abuse.ch, Feodo Tracker), apply warninglists to suppress false positives, query indicators with PyMISP, and export attributes as auto-generated Suricata/Sigma/Wazuh detection rules. Use when maturing a MISP instance to actively drive detection, curating threat feeds with quality controls, or automating IOC-to-detection pipelines for the SIEM/IDS.