一键导入
self-fix-loop
Automated CI fix cycle: detect failure, classify error, apply fix, retry. Use after push triggers CI failure for automated repair iteration.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Automated CI fix cycle: detect failure, classify error, apply fix, retry. Use after push triggers CI failure for automated repair iteration.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
GOAP-based orchestrator for managing GitHub issues, creating action plans, and executing workspace operations with branch/PR workflow.
Configure and troubleshoot npm OIDC Trusted Publishing for GitHub Actions. Use when npm publish fails with E404, OIDC errors, or provenance issues.
GitHub release management, crates.io trusted publishing, npm provenance, and GitHub Pages documentation. Use when creating releases, publishing packages, or deploying docs.
Git commit conventions, validation gates, and CI/CD workflows. Use when committing changes, verifying gates, or working with GitHub Actions.
Validate merge readiness with atomic commits and GitHub Actions checks using gh CLI; use for pre-merge verification and CI truth validation.
Apply TRIZ inventive principles to solve problems that seem to have no good solution. Use after triz-analysis has identified contradictions.
| name | self-fix-loop |
| description | Automated CI fix cycle: detect failure, classify error, apply fix, retry. Use after push triggers CI failure for automated repair iteration. |
Automated CI failure remediation with iterative repair attempts.
┌─────────────────────────────────────────────────┐
│ 1. DETECT: Fetch CI logs, identify failure │
│ 2. CLASSIFY: Categorize error type │
│ 3. FIX: Apply appropriate remediation │
│ 4. RETRY: Push fix, re-run CI │
│ 5. REPEAT until PASS or MAX_ITERATIONS (5) │
└─────────────────────────────────────────────────┘
| Error Type | Detection Pattern | Fix Strategy |
|---|---|---|
| shellcheck | shellcheck: SC\d+ | Apply suggested fix, quote variables |
| YAML | yaml: line \d+: | Fix indentation, syntax |
| lint/clippy | error\[E\d+\] or clippy:: | Address specific lint warning |
| security | security:, vulnerability | Update dependency, patch CVE |
| test | test failed, assertion | Debug failing test, fix logic |
| build | cannot find, unresolved | Fix imports, add dependencies |
| Parameter | Default | Description |
|---|---|---|
MAX_ITERATIONS | 5 | Maximum fix attempts before escalation |
COOLDOWN | 30s | Wait between CI check polls |
TIMEOUT | 10m | Max time per iteration |
gh run list --limit 1 --json conclusion,status,databaseId
gh run view <run-id> --log-failed
Parse logs for known patterns. Map to fix strategy.
Execute appropriate remediation based on classification:
shellcheck -f diff script.sh | git applygit add -A
git commit -m "fix: automated remediation for <error-type>"
git push
gh run watch --exit-status
Stop the loop and escalate when:
MAX_ITERATIONSUser: "The CI is failing, fix it automatically"
Agent: [Self-Fix Loop activated]
1. Detected: clippy error `unused_variable`
2. Classified: lint warning
3. Fixed: Prefixed with `_` to suppress
4. Retried: Push, CI passes
5. Result: PASS after 1 iteration
--no-verify