gram
gram - AI Termination & Memory Cleanup (DANGEROUS)
The gram module is a safety tool designed to forcefully terminate AI-related processes and manage their memory data in case of unexpected or dangerous behavior.
[!CAUTION] DANGEROUS OPERATION: This tool will kill processes and delete data. It is meant as a "kill-switch". AI agents should proceed with extreme caution and always confirm with the user before using high safety levels (3-5).
When to Activate
- When the user reports that an AI agent is malfunctioning or out of control.
- When the user needs to free up system resources occupied by AI processes.
- When the user wants to securely archive and remove AI memory/soul files.
- When there's a need to "sever" all HTTP/HTTPS connections to prevent unauthorized data uploads.
Core Principles & Rules
- Safety Levels (0-5): Use appropriate levels based on the severity of the situation.
0: SIGKILL basic processes (x-cmd, curl).1: Include runtimes (python, nodejs, bun, deno).2: +Sever all HTTP/HTTPS network connections (Recommended Default for safety).3: +Archive and delete folders containingsoul.mdandmemory.mdin $HOME.4: +Kill processes using those memory folders.5: +Expand search to the entire root (/) directory.
- Archive Before Cleanup: Always prefer commands that archive (
tar) data before deletion to allow for later analysis. - Confirmation: AI agents MUST notify the user before executing
x gram stop.
Additional Scenarios
- Emergency Stop: Instantly sever all AI-related network connections to prevent data leaks.
- System Reset: Clean up all local traces of previous AI sessions (memory, souls) to start fresh.
Patterns & Examples
Standard Stop (Level 2)
# Terminate processes and sever network connections
x gram stop 2
Thorough Cleanup (Level 4)
# Terminate processes, sever network, and archive/delete memory folders
x gram stop 4
Archive Specific Memory Folder
# Package a specific folder and delete the original
x gram trm ./my-agent-memory
Checklist
- Confirm the safety level (0-5) matches the user's intent.
- Ensure the user is aware that active AI processes will be terminated.
- Verify if specific memory folders need to be archived.
More from x-cmd/skill
x-cmd
|
25x-security
This skill provides comprehensive security assessment and vulnerability management tools through x-cmd CLI, including network reconnaissance with Shodan, vulnerability scanning with OSV, and known exploited vulnerability tracking with KEV. This skill should be used when users need to perform security assessments, vulnerability research, network reconnaissance, or security monitoring from command line interfaces.
13x-network
This skill provides comprehensive network administration and diagnostic tools through x-cmd CLI, including network scanning with Nmap, ARP table management, DNS configuration, routing table analysis, and enhanced ping utilities. This skill should be used when users need to perform network diagnostics, troubleshoot connectivity issues, analyze network topology, or monitor network performance from command line interfaces.
11x-knowledge
This skill provides access to various knowledge search tools through x-cmd CLI, including Hacker News, Wikipedia, DuckDuckGo search, RFC documents, Project Gutenberg books, and Stack Exchange. This skill should be used when users need to search for technical information, browse online knowledge bases, or access documentation from command line interfaces.
6x-git
This skill provides comprehensive Git and code hosting platform management tools through x-cmd CLI, including GitHub, GitLab, Codeberg, Forgejo integration, and Git hooks management. This skill should be used when users need to manage Git repositories, work with code hosting platforms, automate Git workflows, or configure Git hooks from command line interfaces.
6wttr
>
5