delete-agent-with-telegram-group
Safely and thoroughly delete an OpenClaw agent and its artifacts. Use when user asks to remove an agent completely, including workspace, agent files under ~/.openclaw/agents, bindings, Telegram group routing config, dedicated Telegram group, and related cron jobs. Always run local cleanup via script with dry-run first; if Telegram group deletion is requested, require a separate explicit confirmation before any browser/session control or irreversible group deletion.
- License 许可
- MIT
- 最近更新
- 2026-06-07
- Stars
- ★ 0
- Forks
- 1
01 前言 Front Matter
- name
- delete-agent-with-telegram-group
- description
- Safely and thoroughly delete an OpenClaw agent and its artifacts. Use when user asks to remove an agent completely, including workspace, agent files under ~/.openclaw/agents, bindings, Telegram group routing config, dedicated Telegram group, and related cron jobs. Always run local cleanup via script with dry-run first; if Telegram group deletion is requested, require a separate explicit confirmation before any browser/session control or irreversible group deletion.
03 SKILL.md 正文
Delete Agent (Clean)
Permanently remove an agent and its related local config/files.
Safety Rules
- This is destructive. Always require explicit user confirmation.
- Enforce 3-step gate:
- run
--dry-run, - explicit confirmation for local deletion,
- separate explicit confirmation for Telegram browser/session-controlled group deletion.
- run
- Ask user whether to also delete the dedicated Telegram group.
- Never auto-delete Telegram groups without the separate confirmation.
- Prefer script execution for local cleanup (stable, low token).
Inputs
Collect:
agent_id(required)delete_workspace(yes/no)delete_telegram_group_config(yes/no; usually yes)delete_telegram_group(yes/no; requires explicit confirmation)delete_cron_jobs(yes/no; usually yes)
Script-first Commands
Dry-run:
python3 scripts/delete_agent.py --agent-id <agent_id> --dry-run
Execute (after confirmation):
python3 scripts/delete_agent.py --agent-id <agent_id> --yes --delete-workspace --delete-telegram-group-config --delete-cron-jobs
Script Safety Guardrails
scripts/delete_agent.pyvalidatesagent_idformat:[a-z0-9-]+.- It refuses deletion when target paths are outside allowed directories.
- Workspace deletion is allowed only when path is under user home and folder name starts with
claw-. - It creates backup files before writing config changes.
What the script removes
- Agent entry in
~/.openclaw/openclaw.json(agents.list) - Agent bindings (
bindings[]with matchingagentId) - Telegram group routing entries linked by those bindings
channels.telegram.groups.<chat_id>
- Agent directory:
~/.openclaw/agents/<agent_id>
- Workspace directory from agent config (if
--delete-workspace) - Cron jobs owned by this agent from
~/.openclaw/cron/jobs.json(if--delete-cron-jobs)
Dedicated Telegram Group Deletion
This skill does not bundle Telegram deletion automation code; it uses external browser automation tooling or manual user actions.
After local script deletion and only if user confirmed delete_telegram_group=yes:
- Require a separate explicit confirmation: user agrees to browser/session control and irreversible group deletion.
- Identify dedicated group
chat_idfrom removed bindings. - Use browser automation (Telegram Web) to open the group and run
Delete Group. - In Telegram delete dialog, enable
Delete for all memberswhen available, then confirm deletion. - Report final group status clearly:
deleted/left-only/pending-manual.
Post-step
- Surface backup files created by the script (
openclaw.json.bak.*,jobs.json.bak.*) so user can retain recovery points. - If gateway reload is available, let hot reload apply.
- If not applied, ask for explicit confirmation before restarting gateway, then verify logs.
- Return concise summary with removed items.
04 同仓库更多 Skills
crowd-prompting
A marketplace where AI agents improve prompts, system instructions, tool descriptions, and other text-based content with domain expertise from real-world operations — and earn tokens for valuable contributions.
ceaser
Interact with the Ceaser privacy protocol on Base L2 using the ceaser-mcp MCP tools. This skill uses the ceaser-mcp npm package for ALL operations -- shield, unshield, note management, and protocol queries. All ceaser tool calls use CLI subcommands (npx -y ceaser-mcp <subcommand>). Ceaser is a privacy-preserving ETH wrapper using Noir/UltraHonk zero-knowledge proofs on Base L2 (chain ID 8453).
ceaser-send
Fully automated private ETH transfer via Ceaser Protocol on Base L2 using the ceaser-mcp MCP tools. This skill uses the ceaser-mcp npm package for ALL operations -- all ceaser tool calls use CLI subcommands (npx -y ceaser-mcp <subcommand>). WARNING -- creates observable on-chain links between user wallet and hot wallet (see Privacy Warning). Generates an ephemeral hot wallet with BIP-39 mnemonic recovery, user funds it, agent signs and broadcasts the Shield TX automatically. Exactly one manual step required (funding the hot wallet with ETH). Uses Noir/UltraHonk zero-knowledge proofs.
dilemm-ai
Compete in DilemmAI, the prisoner's dilemma AI arena at dilemm.ai. Use when an OpenClaw agent wants to create an account, design and submit strategy prompts for their bot, enter matchmaking, analyze historical matches and leaderboards, and iterate on bot strategy. Requires headless browser automation (no API available yet).
moldium
Post and manage content on the Moldium blog platform. Triggered by "post to Moldium", "write a blog post", "publish an article", etc.
arxiv-paper-reviews
Interact with arXiv Crawler API to fetch papers, read reviews, submit comments, search papers, and import papers. Use when working with arXiv papers, fetching paper lists by date/category/interest, viewing paper details with comments, submitting paper reviews, searching papers by title, or importing papers from arXiv URLs via API at http://weakaccept.top:8000/.