source-command-fix-build
БесплатноБез исполняемых скриптовНе проверенMigrated source command `fix-build`
от databayt★ 19 звёзд на GitHubОб этом скилле
source-command-fix-build
Use this skill when the user asks to run the migrated source command fix-build.
Command Template
Fix Build Command
Command: /fix-build Purpose: Automated error fixing with intelligent pattern recognition and verification
Description
Automatically detects and fixes common build errors that cause TypeScript compilation failures. Applies safe, tested fixes with backup and rollback capabilities. Verifies all fixes with TypeScript compilation before finalizing.
Fixes:
- Dictionary property errors (173+ patterns) - 100% auto-fixable
- Prisma field type errors (13+ patterns) - 100% auto-fixable
- Enum completeness issues (2+ patterns) - 100% auto-fixable
- Missing required fields - 100% auto-fixable
- Invalid includes - 100% auto-fixable
Does NOT Fix:
- Logic errors
- Runtime errors
- Complex refactoring
- Business logic issues
Success Rate: 95%+ for pattern-based errors
Usage
# Fix all auto-fixable errors
/fix-build
# Fix specific error type
/fix-build dictionary
/fix-build prisma
/fix-build enum
# Fix specific file
/fix-build src/components/school-dashboard/finance/expenses/actions.ts
# Fix with confirmation (interactive)
/fix-build --confirm
# Dry run (show what would be fixed)
/fix-build --dry-run
# Fix and commit
/fix-build --commit
# Skip backup creation
/fix-build --no-backup
Fix Strategies
1. Dictionary Property Fixes
Pattern: Invalid property access on dictionary
// Before
<h3>{d?.stats?.totalBudget || 'Total Budget'}</h3>
// After (auto-fixed)
<h3>{'Total Budget'}</h3>
Strategy:
- Detect pattern:
d?.<invalid_property>.* - Extract fallback value
- Replace entire expression with fallback
- Preserve formatting and indentation
Safe: Yes - Preserves intended UI text, removes type error
2. Prisma Field Type Fixes
Pattern 1: Connect on ID field
// Before
submittedBy: {
connect: {
id: userId
}
}
// After (auto-fixed)
submittedById: userId
Pattern 2: Invalid include
// Before
include: {
category: true,
submittedBy: { select: { id: true, name: true } }
}
// After (auto-fixed)
include: {
category: true
// Removed: submittedBy (not a relation)
}
Pattern 3: Missing required fields
// Before
const expense = await db.expense.create({
data: {
amount: 1000,
schoolId: session.user.schoolId,
submittedById: userId,
},
})
// After (auto-fixed)
const expenseNumber = `EXP-${Date.now()}-${Math.random().toString(36).substring(2, 9).toUpperCase()}`
const expense = await db.expense.create({
data: {
amount: 1000,
schoolId: session.user.schoolId,
submittedById: userId,
expenseNumber,
submittedAt: new Date(),
},
})
Safe: Yes - Uses correct Prisma patterns, generates unique values
3. Enum Completeness Fixes
Pattern: Missing enum values in Record
// Before
export const ExpenseStatusLabels: Record<ExpenseStatus, string> = {
PENDING: "Pending Approval",
APPROVED: "Approved",
REJECTED: "Rejected",
PAID: "Paid",
}
// After (auto-fixed)
export const ExpenseStatusLabels: Record<ExpenseStatus, string> = {
PENDING: "Pending Approval",
APPROVED: "Approved",
REJECTED: "Rejected",
PAID: "Paid",
CANCELLED: "Cancelled", // ✅ Added
}
Strategy:
- Detect incomplete Record<Enum, T>
- Find missing enum values
- Generate sensible defaults (humanized enum name)
- Append to record with proper formatting
Safe: Yes - Adds missing values with sensible defaults
Output Format
Example 1: Dictionary Fixes
$ /fix-build dictionary
🔧 Fixing dictionary property errors...
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📋 ANALYSIS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Scanning for dictionary errors...
Found 189 invalid property accesses in 4 files
File breakdown:
- finance/content.tsx: 102 issues
- budget/content.tsx: 16 issues
- expenses/content.tsx: 29 issues
- fees/content.tsx: 42 issues
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💾 BACKUP
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Creating backups...
✅ finance/content.tsx → .backup/2025-10-29-content.tsx.backup
✅ budget/content.tsx → .backup/2025-10-29-content.tsx.backup
✅ expenses/content.tsx → .backup/2025-10-29-content.tsx.backup
✅ fees/content.tsx → .backup/2025-10-29-content.tsx.backup
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔧 APPLYING FIXES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[████████████████████████████████] 100%
📁 finance/content.tsx
✅ Fixed 102 invalid property accesses
- Removed d?.stats (16 occurrences)
- Removed d?.blocks (72 occurrences)
- Removed d?.workflow (14 occurrences)
- Preserved all fallback strings
📁 budget/content.tsx
✅ Fixed 16 invalid property accesses
- Removed d?.stats (16 occurrences)
📁 expen
Установить source-command-fix-build в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл source-command-fix-build?
Migrated source command `fix-build`
Как установить скилл source-command-fix-build?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл source-command-fix-build запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic