Refactor high-complexity React components in Dify frontend. Use when `pnpm analyze-component...
npx skills add Sounder25/Google-Antigravity-Skills-Library --skill "Failure Postmortem"
Install specific skill from multi-skill repository
# Description
Structured logging and analysis of execution failures to prevent recurrence.
# SKILL.md
name: Failure Postmortem
description: Structured logging and analysis of execution failures to prevent recurrence.
version: 1.0.0
author: Antigravity Skills Library
created: 2026-01-16
leverage_score: 5/5
SKILL-020: Failure Postmortem
Overview
Systematically captures failure data. When a tool fails or a plan is abandoned, this skill logs the event to a persistent registry (POSTMORTEMS.md), forcing an synchronous analysis of why it happened (Root Cause) and how to prevent it (Preventive Rule).
Trigger Phrases
log failurepostmortemwhy did this failrecord error
Inputs
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--Command |
string | Yes | - | The command or action that failed |
--Error |
string | Yes | - | The error message or exception trace |
--Context |
string | No | General |
What was the agent trying to do? |
Outputs
1. Log Entry
Appends to .gemini/antigravity/.forensics/POSTMORTEMS.md:
## [2026-01-16 10:00:00] Failure Analysis
**Context:** Deployment
**Command:** `npm build`
**Error:** `Heap out of memory`
### π΅οΈ Analysis
1. **Root Cause:** Node processes default to 512MB RAM.
2. **Preventive Rule:** Always set NODE_OPTIONS="--max-old-space-size=4096" for builds.
Preconditions
.forensicsdirectory exists (auto-created).- PowerShell 5.1+ or Core 7+.
Safety/QA Checks
- Persist: Ensures the log file is always writable.
- No Data Loss: Appends only, never overwrites previous logs.
Stop Conditions
| Condition | Action |
|---|---|
| Disk Full | Fail gracefully (stdout only) |
Implementation
See scripts/log_failure.ps1.
Integration with Other Skills
- Agent Catch Block: On exception -> Call
log_failure.ps1. - Agent Step: Read the output path.
- Agent Step: "Thinking" block -> Fill in the "Analysis" section mentally or in next turn.
# Supported AI Coding Agents
This skill is compatible with the SKILL.md standard and works with all major AI coding agents:
Learn more about the SKILL.md standard and how to use these skills with your preferred AI coding agent.