Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

Back to skills

Restore Ship

ASecurity

Restores a ship to a healthy state for testing. Clears the `destroyed_at` flag, restocks fighters/shields/warp power to max values from the ship definition, re-adds corporation ships to `corporation_ships` if missing, and recreates the pseudo-character record for corp ships so tasks can be issued. No events are emitted — this is a database-only operation.

419 stars
0 votes
0 copies
0 views
Added 9/20/2026
businessgobashtestingapidatabase

Works with

cliapi

Security Analysis

A100/100

Scanned 9/20/2026

Install to Claude Code

$npx -y skills add pipecat-ai/gradient-bang --skill restore-ship --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Restore Ship?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Restore Ship
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/pipecat-ai-restore-ship/badge)](https://www.skillsdirectory.com/skills/pipecat-ai-restore-ship)

More formats (shields.io, HTML) on the badges page.

Download Zip
Files
SKILL.md
# Restore Ship

Restores a ship to a healthy state for testing. Clears the `destroyed_at` flag, restocks fighters/shields/warp power to max values from the ship definition, re-adds corporation ships to `corporation_ships` if missing, and recreates the pseudo-character record for corp ships so tasks can be issued.

No events are emitted — this is a database-only operation.

## Parameters

Ask the user for:
- **ship_id**: UUID of the ship to restore (required)

## Steps

### 1. Source environment variables

```bash
set -a && source .env.supabase && set +a
```

### 2. Look up the ship

Fetch the ship from `ship_instances` (including destroyed ships).

```bash
curl -s "${SUPABASE_URL}/rest/v1/ship_instances?ship_id=eq.<ship_id>&select=ship_id,ship_type,ship_name,current_sector,owner_type,owner_corporation_id,destroyed_at" \
  -H "apikey: ${SUPABASE_SERVICE_ROLE_KEY}" \
  -H "Authorization: Bearer ${SUPABASE_SERVICE_ROLE_KEY}"
```

If the result is empty, the ship doesn't exist. Report this and stop.

Save the `ship_type`, `owner_type`, `owner_corporation_id`, and `current_sector` for subsequent steps.

### 3. Look up ship definition

Get the max values for fighters, shields, and warp power from `ship_definitions`.

```bash
curl -s "${SUPABASE_URL}/rest/v1/ship_definitions?ship_type=eq.<ship_type>&select=ship_type,fighters,shields,warp_power_capacity" \
  -H "apikey: ${SUPABASE_SERVICE_ROLE_KEY}" \
  -H "Authorization: Bearer ${SUPABASE_SERVICE_ROLE_KEY}"
```

### 4. Restore ship instance

Update the ship to clear destroyed state and restock to full capacity.

```bash
curl -s -X PATCH "${SUPABASE_URL}/rest/v1/ship_instances?ship_id=eq.<ship_id>" \
  -H "apikey: ${SUPABASE_SERVICE_ROLE_KEY}" \
  -H "Authorization: Bearer ${SUPABASE_SERVICE_ROLE_KEY}" \
  -H "Content-Type: application/json" \
  -H "Prefer: return=representation" \
  -d '{
    "destroyed_at": null,
    "current_fighters": <fighters_from_definition>,
    "current_shields": <shields_from_definition>,
    "current_warp_power": <warp_power_capacity_from_definition>
  }'
```

### 5. Re-add to corporation_ships (corp ships only)

If the ship is corporation-owned (`owner_type = "corporation"`), check if it's in `corporation_ships` and re-add if missing.

```bash
curl -s "${SUPABASE_URL}/rest/v1/corporation_ships?ship_id=eq.<ship_id>&select=ship_id" \
  -H "apikey: ${SUPABASE_SERVICE_ROLE_KEY}" \
  -H "Authorization: Bearer ${SUPABASE_SERVICE_ROLE_KEY}"
```

If the result is empty, re-insert:

```bash
curl -s -X POST "${SUPABASE_URL}/rest/v1/corporation_ships" \
  -H "apikey: ${SUPABASE_SERVICE_ROLE_KEY}" \
  -H "Authorization: Bearer ${SUPABASE_SERVICE_ROLE_KEY}" \
  -H "Content-Type: application/json" \
  -H "Prefer: return=representation" \
  -d '{
    "corp_id": "<owner_corporation_id>",
    "ship_id": "<ship_id>"
  }'
```

### 6. Recreate pseudo-character record (corp ships only)

If the ship is corporation-owned (`owner_type = "corporation"`), check if the pseudo-character record exists. Combat finalization deletes this record when a corp ship is destroyed, and without it `current_ship_id` is null so no tasks can be issued.

```bash
curl -s "${SUPABASE_URL}/rest/v1/characters?character_id=eq.<ship_id>&select=character_id,current_ship_id" \
  -H "apikey: ${SUPABASE_SERVICE_ROLE_KEY}" \
  -H "Authorization: Bearer ${SUPABASE_SERVICE_ROLE_KEY}"
```

If the result is empty, recreate the pseudo-character. Use the first 6 hex chars of ship_id as the name suffix:

```bash
curl -s -X POST "${SUPABASE_URL}/rest/v1/characters" \
  -H "apikey: ${SUPABASE_SERVICE_ROLE_KEY}" \
  -H "Authorization: Bearer ${SUPABASE_SERVICE_ROLE_KEY}" \
  -H "Content-Type: application/json" \
  -H "Prefer: return=representation" \
  -d '{
    "character_id": "<ship_id>",
    "name": "Corp Ship [<first_6_hex_of_ship_id>]",
    "current_ship_id": "<ship_id>",
    "credits_in_megabank": 0,
    "map_knowledge": {
      "total_sectors_visited": 0,
      "sectors_visited": {},
      "current_sector": <current_sector>,
      "last_update": "<now_iso_timestamp>"
    },
    "player_metadata": {
      "player_type": "corporation_ship",
      "owner_corp_id": "<owner_corporation_id>"
    },
    "is_npc": true,
    "first_visit": "<now_iso_timestamp>",
    "last_active": "<now_iso_timestamp>",
    "created_at": "<now_iso_timestamp>",
    "corporation_id": "<owner_corporation_id>",
    "corporation_joined_at": "<now_iso_timestamp>"
  }'
```

If the pseudo-character exists but `current_ship_id` is null, update it:

```bash
curl -s -X PATCH "${SUPABASE_URL}/rest/v1/characters?character_id=eq.<ship_id>" \
  -H "apikey: ${SUPABASE_SERVICE_ROLE_KEY}" \
  -H "Authorization: Bearer ${SUPABASE_SERVICE_ROLE_KEY}" \
  -H "Content-Type: application/json" \
  -H "Prefer: return=representation" \
  -d '{
    "current_ship_id": "<ship_id>"
  }'
```

### 7. Report the result

Show the user:
- Ship details: ship_id, ship_type, ship_name, sector
- Whether `destroyed_at` was cleared
- Restored stats: fighters, shields, warp power
- Whether it was re-added to `corporation_ships`
- Whether the pseudo-character was recreated or its `current_ship_id` was fixed

## Important notes

- This is a database-only operation — no events are emitted to clients
- Connected clients will NOT see the ship reappear until they refresh or receive another event
- The ship's cargo, credits, and other state are not modified — only combat-related stats are restored

Attribution

pipecat-aipipecat-ai
View sourceMore from pipecat-ai →
SSkills DirectorySkills Directory

Your tool, in front of Claude Code builders.

3 founder slots · $299/mo · GSC-verified traffic · sponsors can never buy grades.

See placements

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

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Your tool, in front of Claude Code builders.

3 founder slots · $299/mo · GSC-verified traffic · sponsors can never buy grades.

See placements

Related Skills

Solution Architect

Designs system architecture, component specifications, and technical integration strategy. Use when: designing solutions, system architecture, technology stack, or integration approaches.

192 votes

Akorchak:Venture Assessment

Generate a comprehensive VC investment assessment report for a company

72 votes

Stock Analysis

Analyze stocks and cryptocurrencies using Yahoo Finance data. Supports portfolio management (create, add, remove assets), crypto analysis (Top 20 by market cap), and periodic performance reports (daily/weekly/monthly/quarterly/yearly). 8 analysis dimensions for stocks, 3 for crypto. Use for stock analysis, portfolio tracking, earnings reactions, or crypto monitoring.

6511 votes

Just Fucking Cancel

Find and cancel unwanted subscriptions by analyzing bank transactions. Detects recurring charges, calculates annual waste, and helps you cancel with direct URLs and browser automation. Use when: 'cancel subscriptions', 'audit subscriptions', 'find recurring charges', 'what am I paying for', 'save money', 'subscription cleanup', 'stop wasting money'. Supports CSV import (Apple Card, Chase, Amex, Citi, Bank of America, Capital One, Mint, Copilot) OR Plaid API for automatic transaction pull. Out...

6511 votes

Telegram Compose

Compose rich, readable Telegram messages using HTML formatting via direct Telegram API. Use when: (1) Sending any Telegram message beyond a simple one-line reply, (2) Creating structured messages with sections, lists, or status updates, (3) Need formatting unavailable via Clawdbot's Markdown conversion (underline, spoilers, expandable blockquotes, user mentions by ID), (4) Sending alerts, reports, summaries, or notifications to Telegram, (5) Want professional, scannable message formatting wit...

6511 votes
View all in business →