Agent skill
rtk-rewrite
RTK rewrite plugin for OpenClaw. Intercepts exec tool calls and delegates rewrites to rtk rewrite to reduce token usage while preserving command intent.
Install this agent skill to your Project
npx add-skill https://github.com/luw2007/skills/tree/main/rtk-rewrite
SKILL.md
RTK Rewrite OpenClaw Plugin
This plugin hooks into OpenClaw's before_tool_call lifecycle:
- Intercepts only
exectool calls - Calls
rtk rewrite "<command>"to request a rewrite - Replaces the original command when a rewrite is available
- Supports optional audit logs compatible with Claude Code hook audit format
Prerequisites
rtk must be installed and available in PATH.
brew install rtk-ai/tap/rtk
Install Plugin Files
Copy plugin files to the OpenClaw extensions directory:
mkdir -p ~/.openclaw/extensions/rtk-rewrite
cp index.ts openclaw.plugin.json ~/.openclaw/extensions/rtk-rewrite/
openclaw config set plugins.entries.rtk-rewrite.enabled true
openclaw gateway restart
Configuration
enabled: Enables rewrite behavior. Defaulttrue.verbose: Prints rewrite logs to console. Defaultfalse.audit: Writes hook-style audit logs. Defaultfalse.auditDir: Optional audit directory. Falls back toRTK_AUDIT_DIRor~/.local/share/rtk.
Verification
rtk rewrite "git status"
rtk hook-audit --since 7 -v
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
octocode
AI-powered code indexer with semantic search, knowledge graphs (GraphRAG), and persistent memory system. Use when you need to (1) perform semantic code searches across large codebases, (2) analyze file relationships and dependencies through GraphRAG, (3) store and retrieve code insights with memory system. This skill uses Bash to call octocode CLI directly with automatic index management.
favorites-curator
Build and maintain a local favorites catalog from installed repositories, apps, skills, extensions, and hooks. Use when the user asks to create, refresh, curate, scan, or summarize a favorites collection, software inventory, skill inventory, or daily digest of useful local resources.
metadata-naming
Define, apply, or review a reusable metadata-based filename standard for files, folders, inventories, archives, and generated catalogs. Use when the user wants to extract a naming convention into a standard, normalize filenames, choose between human-readable and machine-friendly naming, or create naming rules for repositories, skills, software inventories, snapshots, and long-lived records.
langextract-search
集成智谱搜索、DuckDuckGo 搜索和多模型结构化提取的完整工作流。
skill-selector
通用 skill 选择器。通过 ai-skills CLI 下载候选 skill 源码到临时目录,基于 SKILL.md + 代码的深度分析构建决策树,引导用户在 1-3 轮交互内选定最合适的 skill。当用户面对多个功能相近的 skill 不知选哪个时触发。
collaborating-with-coco
Delegates coding tasks to Coco CLI (Codebase Copilot) for prototyping, debugging, and code review. Use when needing algorithm implementation, bug analysis, or code quality feedback. Supports multi-turn sessions via SESSION_ID.
Didn't find tool you were looking for?