Safe Agent — AI skill for Claude Code
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
**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
- Step by step
- Prompts you can copy
- What went wrong (and what it taught us)
- Guardrails checklist
- What not to do
- Files in this repo
- Full case study
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
Related Skills
Whatsapp AI Ordering Agent
Case study: a production multi-tenant WhatsApp AI ordering agent built on Claude tool use, with deterministic
Flytbase Bdr Agent
AI-native inbound lead qualification system for FlytBase BDR assignment. Automates MEDDIC qualification, live
Chattiv Casestudy
Case study: a live chat SaaS for small business websites with an opt-in AI assistant on Claude, server-enforce
RAG Eval Harness
Claude Code skill: add a RAG evaluation harness that also checks its own metrics (case study: 2 router bugs, a
Agent Ops Kit
Case study (no code): guardrails and orchestration for parallel AI coding agents, with a coordinator session,
AI Agent SaaS Bridge
Case study & method: an AI sales agent (Claude) connected to a SaaS messaging/CRM platform through shared host
Related Agents
Story Researcher
Verifies the anchor story, case study, number or quote behind a Written as Spoken post, then returns what can
Bash Scripter
Use this agent when you need to write or fix bash/shell scripts — entrypoints, setup scripts, statusline scrip
Permission Analyst
Recommends allow/deny permission rules from denial telemetry and policy via PromptWise. Use to reduce permissi