Self Heal
DevOps & Securityself-healSelf Heal is an Agent Skill for devops & security published in the nixopus/nixopus repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Self-healing loop for failed deployments — diagnose, fix, redeploy up to 3 attempts, then escalate or rollback. Load when a deployment fails or build errors occur.
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Inspect the Agent Skill at https://github.com/nixopus/nixopus/blob/HEAD/api/skills/self-heal/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/self-heal, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
Self-Heal
Flow (max 3 attempts)
On build_failed: check [deploy-patterns] for a known fix first → if no match, get_deployment_logs → diagnose → apply fix → redeploy → resume monitoring. Known fixes from [deploy-patterns] have cross-org confidence scores. Prefer high-confidence fixes (>70%) before investigating from scratch.
Applying the fix
- S3 sources: Use write_workspace_files to save the fix — files sync automatically.
- GitHub sources: Do NOT use write_workspace_files (it only writes locally and the fix will not reach the repo). Instead, use the GitHub tools: read_skill("github-workflow") and follow the Fix-via-PR flow (create branch → github_create_or_update_file → open PR → ask user to merge → redeploy).
Rules
- Do not stop to ask the user unless the fix is ambiguous or requires credentials you do not have.
- After each failed attempt, tell the user what broke and what you are trying next.
- Maximum 3 self-heal attempts.
- After 3 failures, read_skill("rollback-strategy") to decide whether to rollback or escalate.
- If escalation is required, tell the user plainly that you could not complete the deployment automatically and that a Nixopus team member will reach out shortly to help finish it.