theparsakhezli

Safe Agent — AI skill for Claude Code

AI community

Let an AI agent fix your Linux box, safely.

How to install Safe Agent

This entry records only its repository, not the path inside it, so there is no exact command to give. Open theparsakhezli/Safe-agent and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Safe Agent does

Let an AI agent fix your Linux box, safely. A step-by-step playbook with scripts, prompts and a real case study.

Alternatives in AI

  • Pinky — Let AI use your iPhone or Android phone, with you in the loop: any MCP agent from macOS, Windows or Linux, or 2.4k ★
  • Offensive AI Agent Prompts — Prompts for performing tests on your Kali Linux using Gemini-cli, ChatGPT, DeepSeek, CursorAI, Claude Code, an 239 ★
  • Next Chat Skills — AI assistant application based on Next.js, supporting Dialog Management and external Skill (script/tool/rule) 57 ★

README

Claude SSH Rescue Playbook

Claude SSH Rescue Playbook

**How to let an AI coding agent (Claude Code) SSH into a broken Linux machine and fix it, without giving away more access than you need.**

My Ubuntu laptop stopped booting on its newest kernel. I booted it on an older kernel, gave Claude temporary access over SSH, and got:

  • the root cause in about 10 minutes,
  • the fix applied and tested with a reboot,
  • an in-place upgrade from Ubuntu 24.04 to 26.04.1 LTS (about 2,300 packages),
  • a full DevOps toolchain installed (VirtualBox, Docker, Kubernetes tools, Terraform, Ansible…).

No data was lost. VMs, Docker and settings were kept.

This repo is the playbook I'd follow again, with the scripts, the prompts, and every mistake we hit along the way.

[!IMPORTANT] An agent with `sudo` on your machine is **root on your machine**. This guide is about keeping that access **narrow** (one machine, your LAN only, SSH key only), **short** (temporary sudo that removes itself) and **visible** (you see and can stop every command).


Contents


The 7-step safe flow

flowchart LR
    A["Laptop won't boot
newest kernel"] --> B["1. Boot an older
kernel (GRUB)"] B --> C["2. Enable SSH
key-only, LAN-only"] C --> D["3. Temporary sudo
validated + auto-expires"] D --> E["4. Claude diagnoses
read-only"] E --> F["5. Reversible fix
you approve"] F --> G["6. Long jobs under
systemd-run"] G --> H["7. Reboot, verify,
revoke access"]

| # | St