# Skill hardening from incidents

> Skill hardening from incidents is an open-source agent skill for developer tools. Turns incident reports and repeated failures into durable, verifiable agent skill rules. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/ruan-cat/monorepo/tree/main/.agents/skills/skill-hardening-from-incidents
- **Repository:** https://github.com/ruan-cat/monorepo
- **GitHub stars:** 5
- **License:** MIT
- **Skill name:** skill-hardening-from-incidents
- **Collection:** https://github.com/ruan-cat/monorepo
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-04

## About

This skill guides an agent through upgrading an existing skill, or creating a new one, from post-incident reviews, historical lessons, and feedback from agent teams. It pushes the agent to distill each lesson into a future-facing rule with a stated root cause and a way to verify it, rather than retelling the incident.

The workflow covers defining the write scope, recording a baseline before edits, reading evidence without pulling in archived history by default, migrating still-valid rules into reference files before trimming the main document, and running an independent review of the staged and unstaged diffs. It also covers coordinating an editor and a verifier in an agent team, and checking that a skill distributed on its own still works outside the source repository.

The skill is written in Chinese and ships as a folder of reference markdown files, with no scripts. It does not declare allowed tools. It expects a git repository to work with, since the steps rely on diffs and commits.

## When your agent uses it

> Use when upgrading, hardening, or creating skills from reports, incident reviews, historical lessons, agent-team feedback, or repeated workflow failures

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/ruan-cat/monorepo/tree/HEAD/.agents/skills/skill-hardening-from-incidents)
- [License: MIT](https://github.com/ruan-cat/monorepo/tree/HEAD/.agents/skills/skill-hardening-from-incidents)

## Features

- **Incident-to-rule distillation:** Converts a postmortem into an actionable rule following a symptom, cause, trigger, future rule and verification sequence.
- **Knowledge retention gates:** Requires that any removed current rule be migrated into reference files and historical snapshots be archived and logged.
- **Minimal diff discipline:** Limits edits to patches that directly address the requested change and checks staged and unstaged diffs before finishing.
- **Self-contained distribution check:** Verifies that a distributed skill still carries its required rules and design context when copied into a fresh project.
- **Agent team review loop:** Defines how a lead agent, editing subagents and verifying subagents share responsibilities and evidence.
- **Plugin marketplace hardening:** Maps each supported client to install-time verification for both maintainer and user entry points.

## Good for

- Update a skill after a repeated workflow failure
- Turn a postmortem review into checklist rules for a skill
- Create a new skill from historical lessons and agent feedback
- Check that an exported skill works when installed in a clean project
- Remove duplicated or conflicting rules across several skills

## Install

### Claude Code

Copy the skill folder to `~/.claude/skills/skill-hardening-from-incidents` to use it in all your projects:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ruan-cat/monorepo.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/skill-hardening-from-incidents &&
cp -R "$tmp/.agents/skills/skill-hardening-from-incidents" ~/.claude/skills/skill-hardening-from-incidents &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/skill-hardening-from-incidents` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/skill-hardening-from-incidents` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ruan-cat/monorepo.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/skill-hardening-from-incidents &&
cp -R "$tmp/.agents/skills/skill-hardening-from-incidents" ~/.agents/skills/skill-hardening-from-incidents &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/skill-hardening-from-incidents` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/skill-hardening-from-incidents` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ruan-cat/monorepo.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/skill-hardening-from-incidents &&
cp -R "$tmp/.agents/skills/skill-hardening-from-incidents" ~/.cursor/skills/skill-hardening-from-incidents &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/skill-hardening-from-incidents` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/ruan-cat/monorepo.git --path .agents/skills/skill-hardening-from-incidents
```

Or copy the folder to `~/.gemini/skills/skill-hardening-from-incidents` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/skill-hardening-from-incidents`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ruan-cat/monorepo.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/skill-hardening-from-incidents &&
cp -R "$tmp/.agents/skills/skill-hardening-from-incidents" ~/.copilot/skills/skill-hardening-from-incidents &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/skill-hardening-from-incidents` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/ruan-cat/monorepo.git
```

Then copy `monorepo/.agents/skills/skill-hardening-from-incidents` into your agent's skills folder as `skill-hardening-from-incidents`. Agents that support SKILL.md read one folder per skill.

## FAQ

### When should Skill hardening from incidents be used?

When upgrading, hardening or creating skills from reports, incident reviews, historical lessons, agent-team feedback or repeated workflow failures. It should not be used while an incident is still under investigation or for plain bug fixes.

### Does Skill hardening from incidents run any scripts?

No. The skill ships as reference markdown files and does not include scripts.

### Does Skill hardening from incidents read archived material during normal runs?

No. The skill says archived snapshots are non-normative and should only be read for retention audits or migration tracing.

### What is the license?

The repository is published under the MIT license.

### How do I install Skill hardening from incidents in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/skill-hardening-from-incidents to use it in all your projects, or to .claude/skills/skill-hardening-from-incidents in one project.

### Does Skill hardening from incidents run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Skill hardening from incidents?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Skill hardening from incidents?

The closest alternatives to Skill hardening from incidents are Skill creator, Agentsmd optimize, Skill author, Write skill and Skill authoring.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Skill creator](https://ai-powered.com/skills/skill-creator): Skill creator is a free agent skill for ai models and llm tooling.
- [Agentsmd optimize](https://ai-powered.com/skills/agentsmd-optimize): Agentsmd optimize is an open-source agent skill for developer tools.
- [Skill author](https://ai-powered.com/skills/skill-author): Skill author is an open-source agent skill for developer tools.
- [Write skill](https://ai-powered.com/skills/write-skill): Write skill is an open-source agent skill for developer tools.
- [Skill authoring](https://ai-powered.com/skills/skill-authoring): Skill authoring is an open-source agent skill for developer tools.
- [Skill creator](https://ai-powered.com/skills/skill-creator-melandlabs): Skill creator is an open-source agent skill for developer tools.
- [Agent skills](https://ai-powered.com/skills/agent-skills): Agent skills is an open-source agent skill for developer tools.
- [Skill writer](https://ai-powered.com/skills/skill-writer): Skill writer is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/skill-hardening-from-incidents
