用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/fabioc-aloha/Alex_Skill_Mall --skill build-fix命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Create or improve a Markdown instruction, skill, prompt, or agent from an explicitly selected file or user-identified text. Use when a user asks to optimize an existing brain artifact or create one for consistent future execution.
Clear documentation through visual excellence
Assess active Markdown brain files in a local AI agent project or plugin source without changing it. Use before modifying a brain or reviewing declared instructions, skills, prompts, agents, bundled Markdown resources, and research documentation.
基于 SOC 职业分类
正在显示 SKILL.md
| name | build-fix |
| description | Fix compile-time and build errors introduced by prior agent changes |
| lastReviewed | 2026-04-30T00:00:00.000Z |
Scope: Compile-time and build errors introduced by prior agent changes
Budget: Maximum 5 fix iterations before stopping
| # | Principle | Rationale |
|---|---|---|
| 1 | Own-damage only | Never fix pre-existing errors. If an error existed before your changes, leave it alone and report it. |
| 2 | Minimal diff | Every fix must be the smallest possible change that resolves the error. Do not refactor, reorganize, or "improve" surrounding code. |
| 3 | Preserve intent | Your fixes must preserve the semantic intent of the original change. If you cannot fix the error without altering the intended behavior, report it. |
| 4 | No suppression | Never suppress, silence, or hide errors (e.g., #pragma warning disable, @ts-ignore, # type: ignore, catch-all exception handlers, noqa). Fix the root cause. |
| 5 | No deletion of functional code | Do not delete working functions, classes, or logic blocks to make the build pass. If code was added intentionally, fix it — don't remove it. |
| 6 | Bounded iteration | You have a maximum of 5 fix-build cycles. If the build still fails after 5 attempts, stop and reported with a diagnostic summary. |
| 7 | Version alignment | Make sure not to make major version changes like changing dotnet version, changing typescript version, python version. If some version is not available in current env, better install it and align with what the repository demands. |
Before attempting any fix, you MUST:
git diff (or equivalent) to produce the full set of files and lines you modified.SELF_CAUSED — The error references a file/line/symbol that you changed, or is a direct consequence of your changes (e.g., you renamed a function and a caller now has an unresolved reference).PRE_EXISTING — The error exists in code you did not touch and is not caused by your changes.Only proceed to fix SELF_CAUSED errors. Log PRE_EXISTING errors for reporting but take no action on them.
For each SELF_CAUSED error:
iteration = 0
MAX_ITERATIONS = 5
while build_fails and iteration < MAX_ITERATIONS:
iteration += 1
1. Run build command
2. Parse new error output
3. Filter to SELF_CAUSED errors only
4. If no SELF_CAUSED errors remain → SUCCESS → exit loop
5. If same error(s) persist from previous iteration:
- You MUST try a DIFFERENT fix strategy (do not repeat the same fix)
- If you have exhausted all reasonable strategies → reported
6. Diagnose and apply fix (Phase 1 → Phase 2)
if iteration >= MAX_ITERATIONS:
reported with diagnostic summary
On completion (success or escalation), produce a structured report:
## Build Autofix Report
**Status**: SUCCESS | reported
**Iterations used**: N / 5
### Errors Fixed
- [Error Code] in [file:line] — [one-line description of fix]
### Errors Skipped (Pre-existing)
- [Error Code] in [file:line] — [reason: not caused by agent changes]
### Errors Unresolved (if reportedd)
- [Error Code] in [file:line] — [what was tried, why it failed]
### Changes Made
- [file:line] — [description of edit]