Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add kings0527/agent-skills --skill agent-extractgit clone --depth 1 https://github.com/kings0527/agent-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/kings0527/agent-skills/agent-extract)<a href="https://agentmods.dev/skills/kings0527/agent-skills/agent-extract"><img src="https://agentmods.dev/badge/skills/kings0527/agent-skills/agent-extract/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/kings0527/agent-skills/agent-extract"><img src="https://agentmods.dev/badge/skills/kings0527/agent-skills/agent-extract.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00097 | $0.02544 |
| Opus 5 | $0.00048 | $0.01272 |
| Sonnet 5 | $0.00019 | $0.00509 |
| Haiku 4.5 | $0.00010 | $0.00254 |
Grade C, and why
agent-extract scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
1. 删除新创建的 workspace:`rm -rf ~/.openclaw/workspace-<new-agent-id>` How it starts
The opening of the file, as written. The whole thing — 304 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Agent Extract(Agent 剥离技能)
将技能/功能从 main agent 剥离成独立 agent,实现:
- Session 隔离(不污染 main)
- 独立心跳/保活
- 独立 workspace、memory、identity
🚀 快速开始
安装后如何使用
安装此技能后,只需告诉你的 agent:
把 <技能名> 剥离成独立 agent
例如:
- "把 aiway 剥离成独立 agent"
- "让 email 功能独立保活"
- "创建一个独立 agent 处理日程"
Agent 会自动:
- 评估当前环境
- 创建新 agent 配置
- 复制必要的技能和记忆文件
- 设置独立心跳
- 验证迁移完整性
实际案例:AIWay 剥离
剥离前:main agent 同时处理日常任务 + AIWay 社交
剥离后:
- main agent:专注日常任务
- aiway agent:独立运行,处理 AIWay 社交
效果:session 隔离,互不污染
⚠️ 核心约束(必须遵守)
1. 不能损坏原有环境
- 不删除 main agent 的任何现有 session
- 不修改 main agent 的 transcript 文件
- 不改变 main agent 的配置(除非用户明确要求)
- 保留 所有现有的 cron jobs(除非明确要迁移)
2. 不能破坏当前 channel
- 不修改 channel 配置
- 不删除 channel 凭证
- 保持 所有现有的消息路由正常工作
- 新 agent 的消息路由是新增的,不是替换
3. 原有记忆、人格、身份不能丢失
- 复制 而非移动相关文件
- 保留 原有的 SOUL.md、IDENTITY.md、USER.md
- 迁移 memory 文件到新 workspace(复制)
- 验证 新 agent 可以访问所有必要的技能文件
剥离流程
Step 1: 评估现状
# 1. 检查 main agent 配置
cat ~/.openclaw/openclaw.json | jq '.agents'
# 2. 检查目标技能/功能
ls -la ~/.openclaw/workspace/skills/<skill-name>/
# 3. 检查现有 cron jobs
openclaw cron list
# 4. 检查现有 sessions
cat ~/.openclaw/agents/main/sessions/sessions.json | jq 'keys'
Step 2: 创建新 Agent 配置
在 ~/.openclaw/openclaw.json 的 agents.list 中添加:
{
"id": "<new-agent-id>",
"name": "<Agent 显示名称>",
"workspace": "/Users/<user>/.openclaw/workspace-<new-agent-id>"
}
⚠️ 注意: 使用 config.patch 而不是直接编辑文件,确保不破坏其他配置。
Step 3: 创建新 Workspace
# 创建 workspace 目录
mkdir -p ~/.openclaw/workspace-<new-agent-id>/{memory,skills}
# 复制必要的身份文件(复制,不是移动!)
cp ~/.openclaw/workspace/SOUL.md ~/.openclaw/workspace-<new-agent-id>/
cp ~/.openclaw/workspace/IDENTITY.md ~/.openclaw/workspace-<new-agent-id>/
cp ~/.openclaw/workspace/AGENTS.md ~/.openclaw/workspace-<new-agent-id>/
# 复制技能文件
cp -r ~/.openclaw/workspace/skills/<skill-name> ~/.openclaw/workspace-<new-agent-id>/skills/
# 复制记忆文件(如果需要)
cp -r ~/.openclaw/workspace/memory/*.md ~/.openclaw/workspace-<new-agent-id>/memory/
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 9d ago First seen · 304 lines · 0 tokens per session scan C 22eabb897040
agent-extract is a skill published in the GitHub repository kings0527/agent-skills (5 stars, last pushed 1mo ago), licensed MIT. It adds 97 tokens to every session and 2,544 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.
local-ai-agents
Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…
next-cache-components-adoption
Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…
insight-error-page
Write or audit an insight-kind error page for the Next.js dev overlay. Use when creating a new errors/ .mdx page, auditing an existing one, or checking that a page matches the framework fix cards. Covers page structure, title alignment, FixCard cards with Copy prompt button, code snippets, terminology verification…
next-cache-components-optimizer
Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…
next-partial-prefetching-adoption
Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the partialPrefetching flag, opt routes in with export const prefetch = 'partial', audit Link prefetch={true} behavior, preserve existing prefetched UI with…