一键导入
self-fix-loop
Self-learning fix loop - commit, push, monitor CI, auto-fix failures using swarm agents with skills on demand, loop until all checks pass.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Self-learning fix loop - commit, push, monitor CI, auto-fix failures using swarm agents with skills on demand, loop until all checks pass.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Retrieve semantically relevant past learnings and analysis outputs using the csm CLI (HDC encoder with hybrid BM25 retrieval)
Execute tests, analyze results, and diagnose failures across any testing framework. Use when running test suites, debugging failing tests, or configuring CI/CD testing pipelines.
Use this skill for Turso (LibSQL/Limbo) database development, including scaffolding, querying, migrations, and maintenance. Supports vector search, full-text search, CDC, MVCC, encryption, and bidirectional remote sync. Use when working with Turso SDKs for JavaScript, Rust, Python, Go, and React Native. Provides current API guidance to avoid stale "libsql" legacy knowledge.
Atomic git workflow - validates, commits, pushes, creates PR, and verifies CI with zero-warnings policy. Orchestrates complete code submission as state machine with rollback on failure.
Automated code review with PR analysis, change summaries, and quality checks. Use for reviewing pull requests, generating review comments, checking against best practices, and identifying potential issues. Includes style guide compliance, security issue detection, and review automation.
Unified atomic git workflow with GitHub integration - commits all changes, checks GitHub issues, creates PR, validates all Actions pass including pre-existing, uses swarm coordination with web research on failures. Post-merge validation of all files and docs.
| name | self-fix-loop |
| description | Self-learning fix loop - commit, push, monitor CI, auto-fix failures using swarm agents with skills on demand, loop until all checks pass. |
| version | 1.0 |
| template_version | 0.2 |
Automated self-learning cycle: commit → push → monitor → analyze failures → fix → retry until all GitHub Actions pass.
Continuous improvement loop that:
# Full loop with auto-fix
./scripts/self-fix-loop.sh
# With options
./scripts/self-fix-loop.sh --max-retries 5 --auto-research --fix-issues
# Dry run (simulate without push)
./scripts/self-fix-loop.sh --dry-run
| Argument | Description | Default |
|---|---|---|
--max-retries N | Maximum fix iterations | 5 |
--auto-research | Use web research on failures | true |
--fix-issues | Attempt automatic fixes | true |
--strict-validation | ALL checks must pass | true |
--timeout SECONDS | Per-iteration timeout | 1800 |
--poll-interval SECONDS | CI check polling | 30 |
--dry-run | Simulate without pushing | false |
--base-branch BRANCH | Target branch | main |
[Start]
↓
Phase 1: COMMIT & PUSH
- Stage all changes
- Run quality gate
- Atomic commit
- Push to feature branch
↓
Phase 2: CREATE/UPDATE PR
- Create new PR or update existing
↓
Phase 3: MONITOR CI
- Poll GitHub Actions
- Wait for all checks complete
↓
Phase 4: ANALYZE FAILURES
- Identify failed checks
- Extract error messages
- Categorize failure type
↓
Phase 5: FIX (if failures)
- Launch swarm agents
- Use relevant skills on demand
- Apply fixes
- Commit fix
↓
Phase 6: RETRY LOOP
- If retries remaining → Phase 1
- If max retries → FAIL
- If all pass → SUCCESS
| Failure Type | Skills Activated |
|---|---|
| Shell script errors | shell-script-quality |
| YAML syntax | cicd-pipeline |
| Python errors | code-quality |
| TypeScript/JS errors | code-quality |
| Markdown issues | markdownlint |
| Security warnings | security-code-auditor |
| Link/reference errors | validate-links.sh |
| Skill format issues | validate-skill-format.sh |
| Codacy blocked | codacy (triage, suppress false positives, fix real issues) |
| Vercel deployment failure | Run ./scripts/verify-deps.sh, check for breaking API changes in major dep bumps |
| Unknown errors | web-search-researcher + do-web-doc-resolver |
| CI Check | Root Cause | Fix |
|---|---|---|
| Vercel — Type error: Property does not exist | Major dependency bump changed API (e.g. react-resizable-panels v3→v4 renamed exports) | Update imports to match new API, run pnpm run build to verify |
| Vercel — TSconfig deprecated option | TypeScript major bump deprecated baseUrl or other options | Add "ignoreDeprecations": "6.0" to tsconfig.base.json |
| Codacy — Object Injection Sink | ESLint security/detect-object-injection flags OBJ[variable] bracket access | Use switch/case pattern or Object.prototype.hasOwnProperty.call() guard |
| Codacy — static-components | react-hooks/static-components flags component creation during render | Use render function returning JSX instead of assigning component variable |
| Quality Gate — lockfile mismatch | pnpm-lock.yaml out of sync after dep bump | Run pnpm install and commit updated lockfile |
On each failure:
SELF_FIX_LOOP_MAX_RETRIES=5
SELF_FIX_LOOP_TIMEOUT=1800
SELF_FIX_LOOP_POLL_INTERVAL=30
SELF_FIX_LOOP_AUTO_RESEARCH=1
SELF_FIX_LOOP_STRICT_VALIDATION=1
Loop succeeds when:
| Code | Meaning |
|---|---|
| 0 | Success - all checks passed |
| 1 | Quality gate failed |
| 2 | Git operations failed |
| 3 | Max retries exceeded |
| 4 | Timeout |
| 5 | PR operations failed |
git-github-workflow/SKILL.md - Full git workflowatomic-commit/SKILL.md - Atomic commit patternweb-search-researcher/SKILL.md - Web research skill