# Safety critical patterns

> Safety critical patterns is an open-source agent skill for developer tools. Applies NASA Power of 10 reliability rules to code review, scaled to failure cost. It is available on Claude Code.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code
- **Website:** https://github.com/ajyadav013/claude-kit/tree/main/skills/safety-critical-patterns
- **Repository:** https://github.com/ajyadav013/claude-kit
- **GitHub stars:** 13
- **License:** MIT
- **Skill name:** safety-critical-patterns
- **Collection:** https://github.com/ajyadav013/claude-kit
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-03

## About

This skill gives the agent a reliability-focused lens adapted from NASA JPL's Power of 10 rules, written to be language-neutral. Its central instruction is to match how strictly the rules are applied to what a failure would cost: full rigor for money movement, medical, data-integrity, authentication and irreversible changes, selective rigor for core business logic and public APIs, and light rigor for scripts and throwaway tooling.

The skill lays out ten rules covering bounded loops and recursion, assertions on preconditions and invariants, checking every return value, validating inputs, minimal variable scope, restrained metaprogramming, limited indirection, and strict compiler or linter settings. It includes short code examples for several of these, and a table of cases where individual rules can be relaxed, such as GC languages or declarative configuration. Findings are expected to cite the rule, a file and line location, and a verbatim anchor from that line.

The skill is a single SKILL.md file with no scripts. It names related skills for general code review and over-engineering checks, and points to a risk-classification rule file in the project's .claude directory, so that file should exist for the tiering to work as described.

## When your agent uses it

> High-reliability coding lens from NASA's Power of 10 — bounded loops, assertions, check every return value — rigor matched to consequence. Do NOT use as a general style pass (use code-review-and-quality).

## What it can access

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

- [Instructions only, no scripts](https://github.com/ajyadav013/claude-kit/tree/HEAD/skills/safety-critical-patterns)
- [License: MIT](https://github.com/ajyadav013/claude-kit/tree/HEAD/skills/safety-critical-patterns)

## Features

- **Consequence-based rigor tiers:** Sets how much of the rule set to apply based on whether a change is full, selective or light risk.
- **Bounded loops and recursion:** Requires explicit upper bounds on loops and provable termination for recursive calls.
- **Defensive assertions:** Guides adding assertions for preconditions, postconditions and invariants that should never fail.
- **Return value checking:** Asks the agent to handle every result that can signal failure and to validate inputs.
- **Strict compiler and linter settings:** Recommends enabling the strictest warning levels and treating warnings as errors from the start.
- **Grounded review findings:** Requires each reported violation to cite the rule, file and line, and a verbatim anchor.

## Good for

- Review a payment processing module for unchecked return values and missing input validation
- Add bounds and assertions to a data-integrity routine that updates account records
- Audit a medical data pipeline for unbounded loops and risky recursion
- Tighten lint and type-check settings for a core business logic package

## Install

### Claude Code

This skill ships in the `claude-kit` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add ajyadav013/claude-kit
/plugin install claude-kit@claude-kit
```

Or copy only this skill to `~/.claude/skills/safety-critical-patterns`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ajyadav013/claude-kit.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/safety-critical-patterns &&
cp -R "$tmp/skills/safety-critical-patterns" ~/.claude/skills/safety-critical-patterns &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/safety-critical-patterns` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/safety-critical-patterns` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ajyadav013/claude-kit.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/safety-critical-patterns &&
cp -R "$tmp/skills/safety-critical-patterns" ~/.agents/skills/safety-critical-patterns &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/safety-critical-patterns` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/safety-critical-patterns` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ajyadav013/claude-kit.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/safety-critical-patterns &&
cp -R "$tmp/skills/safety-critical-patterns" ~/.cursor/skills/safety-critical-patterns &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/safety-critical-patterns` 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/ajyadav013/claude-kit.git --path skills/safety-critical-patterns
```

Or copy the folder to `~/.gemini/skills/safety-critical-patterns` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/safety-critical-patterns`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ajyadav013/claude-kit.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/safety-critical-patterns &&
cp -R "$tmp/skills/safety-critical-patterns" ~/.copilot/skills/safety-critical-patterns &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/safety-critical-patterns` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/ajyadav013/claude-kit.git
```

Then copy `claude-kit/skills/safety-critical-patterns` into your agent's skills folder as `safety-critical-patterns`. Agents that support SKILL.md read one folder per skill.

## FAQ

### When should I use Safety critical patterns instead of a general code review?

Its description says not to use it as a general style pass. It is meant for high-consequence code, and the general code-review-and-quality skill is recommended for everything else.

### Does Safety critical patterns apply all ten rules to every change?

No. The skill tells the agent to apply the rules in proportion to failure cost and warns against forcing full rigor onto simple CRUD endpoints or scripts.

### Which languages does Safety critical patterns target?

The rules are written to be language-neutral. The examples are in Python, and the skill mentions tools such as ruff, mypy, tsc, clippy and -Wall -Werror.

### Does Safety critical patterns require any scripts or tools to run?

The skill has no scripts and does not set allowed tools. It relies on the agent's normal reading and editing abilities.

### How do I install Safety critical patterns in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/safety-critical-patterns to use it in all your projects, or to .claude/skills/safety-critical-patterns in one project. Or install the claude-kit plugin, which includes it: /plugin marketplace add ajyadav013/claude-kit, then /plugin install claude-kit@claude-kit.

### Does Safety critical patterns 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 Safety critical patterns?

Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.

### What are the best alternatives to Safety critical patterns?

The closest alternatives to Safety critical patterns are Code review, Thermo nuclear code quality review, Security and hardening, Coding and Patterns.

## Where this comes from

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

## Alternatives

- [Code review](https://ai-powered.com/skills/code-review-kripu77): Code review is an open-source agent skill for developer tools.
- [Thermo nuclear code quality review](https://ai-powered.com/skills/thermo-nuclear-code-quality-review-michael-denyer): Thermo nuclear code quality review is an open-source agent skill for developer tools.
- [Security and hardening](https://ai-powered.com/skills/security-and-hardening-ajyadav013-2): Security and hardening is an open-source agent skill for security.
- [Coding](https://ai-powered.com/skills/coding): Coding is an open-source agent skill for developer tools.
- [Patterns](https://ai-powered.com/skills/patterns-xiaolai): Patterns is an open-source agent skill for developer tools.
- [Readable code](https://ai-powered.com/skills/readable-code): Readable code is an open-source agent skill for developer tools.
- [Constraint driven development](https://ai-powered.com/skills/constraint-driven-development): Constraint driven development is an open-source agent skill for developer tools.
- [Failure codifier](https://ai-powered.com/skills/failure-codifier-chachamaru127): Failure codifier is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/safety-critical-patterns-ajyadav013
