Skip to content
Back to skills

Shutdown Gracefulness

ASecurity

Shutdown gracefulness analyzer: check if shutdown hooks actually drain, flush, and complete in-flight work. Read-only. Trigger: /shutdown

  • 30 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added November 8, 2026
ai-agentsshell

Security analysis

A100/100

Scanned November 8, 2026

npx -y skills add majiayu000/claude-skill-registry-data --skill shutdown-gracefulness --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Shutdown Gracefulness?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Shutdown Gracefulness
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-shutdown-gracefulness/badge)](https://www.skillsdirectory.com/skills/majiayu000-shutdown-gracefulness)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: shutdown-gracefulness
description: "Shutdown gracefulness analyzer: check if shutdown hooks actually drain, flush, and complete in-flight work. Read-only. Trigger: /shutdown"
trigger: /shutdown
---
# /shutdown

A pod is killed. What happens to in-flight requests, open transactions, half-written files? This skill checks shutdown implementation detail.

## What this is for

- Signal handlers that call process.exit(0) immediately (drops in-flight)
- DB connection pools without drain in shutdown (queries interrupted)
- File writers without flush (data loss)
- **Read-only skill.** No code changes.


## PROTECTION RULE - never ~/.claude/

Read-only skill. Guard required if write mode added later.

## What You Must Do When Invoked
During analysis, assign a confidence level to each finding: proven (confirmed by evidence), likely (strong signal, needs review), or suspected (weak signal).

If `/shutdown -help` or `/shutdown -h` (without further arguments)
is invoked: output the `## Usage` section unchanged and stop.

Otherwise follow these steps in order, skipping none.

### Step 1 - Help check
If invoked with `-help` or `-h`, output the `## Usage` section unchanged and stop.

### Step 2 - Clarify target

Clarify `-ProjectDir`. Get confirmation.

### Step 3 - Scan

```powershell
& "<SKILL_DIR>/scripts/shutdown-detail-scan.ps1" -ProjectDir "<path>"
```

### Step 4 - Classification

Read each shutdown path:

- **Safe**: complete drain before exit
- **Mostly-safe**: drains but has timeout gaps
- **Risky**: drops in-flight work
- **Dangerous**: data corruption on termination

### Step 5 - Write report

File `shutdown-grade-report.md` in current working directory:

1. **Summary** - shutdown paths by classification.
2. **Path table** - dangerous first. Per path: process, mechanism, grace timeout, drains requests, flushes buffers, releases connections, handles errors, grade.
3. **Open questions**.

### Step 6 - Summarize

State report path, highlight processes that would corrupt data if terminated.

## Usage

```
/shutdown               # interactive
/shutdown <dir>         # scan project
/shutdown -help
```


Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.