Xpersona
S

safety-critical-patterns

CLAWHUB · Unverified

Applies NASA Power of 10 rules for safety-critical verifiable code Skill: safety-critical-patterns Owner: athola Summary: Applies NASA Power of 10 rules for safety-critical verifiable code Tags: latest:1.9.19 Version history: v1.9.19 | 2026-08-26T13:19:20.827Z | user Release v1.9.19 v1.9.17 | 2026-07-30T05:39:32.617Z | user Release v1.9.17 v1.9.16 | 2026-07-14T19:56:15.650Z | user Release v1.9.16 v1.9.14 | 2026-06-30T18:04:31.432Z | user Release v1.9.14 v1.9.13 | 2026-06-27T16:22:29

62
Rank
84
Safety
1.6k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1.6K downloads reported by the source. Last updated 10/10/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s17emme0e2m3cpf7k2jvp3a84984b8z9:nm-pensive-safety-critical-patterns
  1. Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.
  2. Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-athola-nm-pensive-safety-critical-patterns/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

66,088 characters of source documentation, loaded on request.

Extracted files

3 files captured from the source.

SKILL.md

---
name: safety-critical-patterns
description: Applies NASA Power of 10 rules for safety-critical verifiable code
version: 1.9.8
triggers:
  - safety
  - defensive-coding
  - assertions
  - NASA
  - robustness
  - verification
  - auditing financial
  - medical
  - or high-reliability system code
metadata: {"openclaw": {"homepage": "https://github.com/athola/claude-night-market/tree/master/plugins/pensive", "emoji": "\ud83e\udd9e", "requires": {"config": ["night-market.pensive:shared", "night-market.pensive:code-refinement"]}}}
source: claude-night-market
source_plugin: pensive
---

> **Night Market Skill** — ported from [claude-night-market/pensive](https://github.com/athola/claude-night-market/tree/master/plugins/pensive). For the full experience with agents, hooks, and commands, install the Claude Code plugin.


# Safety-Critical Coding Patterns

Guidelines adapted from NASA's Power of 10 rules for safety-critical software.

## When to Apply

**Full rigor**: Safety-critical systems, financial transactions, data integrity code
**Selective application**: Business logic, API handlers, core algorithms
**Light touch**: Scripts, prototypes, non-critical utilities

> "Match rigor to consequence" - The real engineering principle

## The 10 Rules (Adapted)

### 1. Restrict Control Flow
Avoid `goto`, `setjmp/longjmp`, and **limit recursion**.

**Why**: Ensures acyclic call graphs that tools can verify.
**Adaptation**: Recursion acceptable with provable termination (tail recursion, bounded depth).

### 2. Fixed Loop Bounds
All loops should have verifiable upper bounds.

```python
# Good - bound is clear
for i in range(min(len(items), MAX_ITEMS)):
    process(item)

# Risky - unbounded
while not_done:  # When does this end?
    process_next()
```

**Adaptation**: Document expected bounds; add safety limits on potentially unbounded loops.

### 3. No Dynamic Memory After Initialization
Avoid heap allocation in critical paths after startup.

**Why**: Prevents allocation failures at runtime.
**Adaptation**: Pre-allocate pools; use object reuse patterns in hot paths.

### 4. Function Length ~60 Lines
Functions should fit on one screen/page.

**Why**: Cognitive limits on comprehension remain valid.
**Adaptation**: Flexible for declarative code; strict for complex logic.

### 5. Assertion Density
Include defensive assertions documenting expectations.

```python
def transfer_funds(from_acct, to_acct, amount):
    assert from_acct != to_acct, "Cannot transfer to same account"
    assert amount > 0, "Transfer amount must be positive"
    assert from_acct.balance >= amount, "Insufficient funds"
    # ... implementation
```

**Adaptation**: Focus on boundary conditions and invariants, not arbitrary quotas.

### 6. Minimal Variable Scope
Declare variables at narrowest possible scope.

```python
# Good - scoped tightly
for item in items:
    total = calculate(item)  # Only exists in loop
    results.append(total)

# Avoid - unnecessarily broad
total = 0  # Why is this

_meta.json

{
  "ownerId": "kn7d107jg9jv602h9ytsegydq184a42s",
  "slug": "nm-pensive-safety-critical-patterns",
  "version": "1.9.19",
  "publishedAt": 1787750360827
}

skill-card.md

## Description:

Applies NASA Power of 10 rules for safety-critical verifiable code.

This skill is ready for commercial/non-commercial use.

## Publisher:

[athola](https://clawhub.ai/user/athola)

### License/Terms of Use:

MIT-0

## Use Case:

Developers and engineers use this skill to apply a NASA Power of 10 inspired checklist when reviewing safety-critical, financial, medical, data-integrity, and other high-reliability code.

### Deployment Geography for Use:

Global

## Known Risks and Mitigations:

Risk: Python assert examples may be mistaken for complete runtime validation in financial or safety-sensitive code.

Mitigation: Treat assertions as internal invariant documentation and require explicit validation for untrusted input, authorization, financial rules, and safety constraints.

Risk: Broad activation triggers may apply the skill outside the intended review context.

Mitigation: Review the generated guidance before applying it and scope use to code where safety-critical or high-reliability patterns are relevant.

Risk: The security scan verdict is suspicious.

Mitigation: Review the skill carefully before installing it for financial, medical, safety-critical, production, or other high-consequence work.

## Reference(s):

- [ClawHub skill page](https://clawhub.ai/athola/skills/nm-pensive-safety-critical-patterns)
- [Publisher profile](https://clawhub.ai/user/athola)
- [Configured homepage](https://github.com/athola/claude-night-market/tree/master/plugins/pensive)

## Skill Output:

**Output Type(s):** [guidance, markdown, code, shell commands]

**Output Format:** [Markdown with checklist guidance and inline code blocks]

**Output Parameters:** [1D]

**Other Properties Related to Output:** [Advisory review guidance; users should validate recommendations against their project requirements.]

## Skill Version(s):

1.9.19 (source: server release evidence)

## Ethical Considerations:

Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.

Sponsored

Ads related to safety-critical-patterns and adjacent AI workflows.