适用对象:日常把 OpenClaw 当作个人助理/自动化管家的同学。
一句话使用 : 按照 openclaw-workspace-clean-guide.md https://gist.github.com/luw2007/863349759b90bfd2ffeab41298a52e21 优化一下 当前 openclaw 的配置,让 workspace 目录永远“可读、可找、可回滚、可复盘”。
| # skill-dedupe | |
| pi extension — session-scoped dedupe for `/skill:xx`. | |
| ## Problem | |
| pi's `_expandSkillCommand()` (`agent-session.ts` ~line 1162) injects the full | |
| `SKILL.md` content as a `<skill name="...">` XML block into the user message | |
| every time `/skill:xx` is invoked. There is no dedup: calling `/skill:xx` | |
| twice injects the same content twice, wasting context tokens. |
| #!/bin/bash | |
| # Required parameters: | |
| # @raycast.schemaVersion 1 | |
| # @raycast.title 清理 AI tool use | |
| # @raycast.mode silent | |
| # Optional parameters: | |
| # @raycast.icon 🤖 | |
| # @raycast.packageName Clear AI Tooluse |
适用对象:日常把 OpenClaw 当作个人助理/自动化管家的同学。
一句话使用 : 按照 openclaw-workspace-clean-guide.md https://gist.github.com/luw2007/863349759b90bfd2ffeab41298a52e21 优化一下 当前 openclaw 的配置,让 workspace 目录永远“可读、可找、可回滚、可复盘”。
| #!/usr/bin/env python3 | |
| from __future__ import annotations | |
| """ | |
| clip2file.py — 将剪贴板中的长文本/富文本保存为 Markdown 文件, | |
| 并将"文件对象"写回剪贴板(可在邮件/聊天/IDE 中直接粘贴附件)。 | |
| 富文本处理策略(参考 paste-to-markdown Raycast 扩展): | |
| 1. 用 osascript 读取剪贴板的 HTML 格式(保留链接、格式信息) | |
| 2. 用内置 html.parser 将 HTML 转为 Markdown(不转义下划线等正文字符) | |
| 3. 回退:若剪贴板无 HTML,直接使用 pbpaste 纯文本 |
| package main | |
| import ( | |
| "fmt" | |
| "testing" | |
| "time" | |
| ) | |
| // WHY: | |
| // |
| package main | |
| import ( | |
| "fmt" | |
| "github.com/google/go-cmp/cmp" | |
| ) | |
| func isSpace(b byte) bool { | |
| switch b { |
| package log | |
| import ( | |
| "bytes" | |
| "path" | |
| "time" | |
| "github.com/gin-gonic/gin" | |
| "github.com/lestrrat/go-file-rotatelogs" | |
| "github.com/pkg/errors" |
| #ifndef __AE_H__ | |
| #define __AE_H__ | |
| #include <time.h> | |
| #define AE_OK 0 | |
| #define AE_ERR -1 | |
| #define AE_NONE 0 /* No events registered. */ | |
| #define AE_READABLE 1 /* Fire when descriptor is readable. */ |
| """ | |
| redis proxy | |
| 用来展示redis协议 | |
| """ | |
| import asyncio | |
| redis_addr = ('127.0.0.1', 6379) | |
| proxy_addr = ('127.0.0.1', 6380) |
| //http://www.it165.net/os/html/201308/5868.html | |
| #include <sys/socket.h> | |
| #include <sys/wait.h> | |
| #include <netinet/in.h> | |
| #include <netinet/tcp.h> | |
| #include <sys/epoll.h> | |
| #include <sys/sendfile.h> | |
| #include <sys/stat.h> | |
| #include <unistd.h> | |
| #include <stdio.h> |