container/skills/post-test-cleanup/SKILL.md
测试完成后的扫尾清理流程。在向某个工作区发送测试指令(如长篇文章生成、耗时任务)后,用此流程彻底清除测试痕迹,防止测试消息残留在会话上下文中持续消耗 token 额度。
npx skillsauth add riba2534/happyclaw post-test-cleanupInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
# 查看当前运行的容器
docker ps --format "table {{.Names}}\t{{.Status}}\t{{.RunningFor}}"
# 确认目标容器的 folder(容器名格式:happyclaw-{folder}-{timestamp})
ls data/ipc/
# 发送中断信号(优雅停止)
touch data/ipc/{folder}/input/_interrupt
sleep 5
# 若容器仍在运行,发送关闭信号
touch data/ipc/{folder}/input/_close
sleep 10
# 确认容器已停止
docker ps --format "{{.Names}}" | grep {folder关键字}
python3 -c "
import sqlite3
conn = sqlite3.connect('data/db/messages.db')
cur = conn.cursor()
# 先找到 folder 对应的 JID
cur.execute(\"SELECT jid, folder, name FROM registered_groups WHERE folder = '{folder}'\")
print('Group:', cur.fetchall())
# 查看最近消息,定位测试消息范围
cur.execute(\"\"\"
SELECT id, content, is_from_me, timestamp
FROM messages
WHERE chat_jid = '{jid}'
ORDER BY timestamp DESC LIMIT 20
\"\"\")
for r in cur.fetchall():
print(f'id={r[0]} from_me={r[2]} | {str(r[1])[:80]}')
conn.close()
"
python3 -c "
import sqlite3
conn = sqlite3.connect('data/db/messages.db')
cur = conn.cursor()
# 将需要删除的消息 ID 填入列表
test_ids = [
'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx',
# ...
]
placeholders = ','.join(['?' for _ in test_ids])
cur.execute(f'DELETE FROM messages WHERE id IN ({placeholders})', test_ids)
print(f'Deleted {cur.rowcount} messages')
conn.commit()
conn.close()
"
python3 -c "
import sqlite3, uuid
conn = sqlite3.connect('data/db/messages.db')
cur = conn.cursor()
# 生成新 session ID,下次启动时以空上下文开始
new_id = str(uuid.uuid4())
cur.execute(\"UPDATE sessions SET session_id = ? WHERE group_folder = '{folder}'\", (new_id,))
print(f'Session reset: {cur.rowcount} rows, new ID: {new_id}')
conn.commit()
conn.close()
"
git status
git diff --stat
# 应显示 "nothing to commit, working tree clean"
happyclaw-{folder}-{timestamp},可通过 ls data/ipc/ 查看所有 folderis_from_me 和内容确认,避免误删正常业务消息data/ 下,不纳入版本控制docker ps)git status 显示工作区干净tools
When a user requests to install a new skill, this skill guides you to identify the package name from various input formats and use the install_skill MCP tool. Supports skills.sh URLs, GitHub URLs, owner/repo, and owner/repo@skill formats.
development
Browse the web for any task — research topics, read articles, interact with web apps, fill forms, take screenshots, extract data, and test web pages. Use whenever a browser would be useful, not just when the user explicitly asks.
testing
Create, edit, improve, or audit AgentSkills. Use when creating a new skill from scratch or when asked to improve, review, audit, tidy up, or clean up an existing skill or SKILL.md file. Also use when editing or restructuring a skill directory (moving files to references/ or scripts/, removing stale content, validating against the AgentSkills spec). Triggers on phrases like "create a skill", "author a skill", "tidy up a skill", "improve this skill", "review the skill", "clean up the skill", "audit the skill".
testing
Host security hardening and risk-tolerance configuration for OpenClaw deployments. Use when a user asks for security audits, firewall/SSH/update hardening, risk posture, exposure review, OpenClaw cron scheduling for periodic checks, or version status checks on a machine running OpenClaw (laptop, workstation, Pi, VPS).