/SKILL.md
This skill should be used when the user asks to "写 Loon 插件", "做 Loon 去广告插件", "写 Loon 脚本模板", "配置 Loon Argument 参数", or needs Loon plugin/script authoring and debugging.
npx skillsauth add cxq93/loon-plugin-authoring loon-plugin-authoringInstall 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.
本技能聚焦 Loon 插件落地:从插件骨架、参数化配置、脚本模板到验证排障,优先提供可复制、可运行、可回滚的最小方案。
loon-ios-manual 处理总体架构,再回到本技能落地插件细节[Script]、[Rewrite]、[MITM]、[Argument]argument=[{...}],避免硬编码按需给出以下模板并替换占位值:
#!name= 示例插件
#!desc= 一个可参数化的 Loon 插件模板
#!author= your-name
#!homepage= https://example.com
#!icon= https://example.com/icon.png
#!loon_version= 3.2.1(733)
#!system = iOS,iPadOS,tvOS,macOS
#!tag = 工具,脚本
[Argument]
targetHost = input,"api.example.com",tag=目标域名,desc=脚本匹配域名
enableRewrite = switch,true,tag=启用复写,desc=控制复写规则是否开启
cronExpr = input,"0 */6 * * *",tag=Cron表达式,desc=定时脚本执行周期
mode = select,"safe","strict",tag=运行模式,desc=脚本处理策略
[Script]
http-response ^https?:\/\/.* script-path=https://example.com/script/response.js, requires-body=true, timeout=30, tag=响应处理, enable={enableRewrite}, argument=[{targetHost},{mode}]
cron "{cronExpr}" script-path=https://example.com/script/cron.js, timeout=30, tag=定时任务, argument=[{targetHost},{mode}]
[Rewrite]
^https?:\/\/ads\.example\.com\/.* - reject
[MITM]
hostname = api.example.com,ads.example.com
const args = typeof $argument === "object" && $argument !== null ? $argument : {};
const targetHost = String(args.targetHost || "");
const mode = String(args.mode || "safe");
function done(result) {
$done(result);
}
try {
const reqUrl = $request && $request.url ? String($request.url) : "";
if (targetHost && !reqUrl.includes(targetHost)) {
done({});
} else {
const body = $response && typeof $response.body === "string" ? $response.body : "";
let nextBody = body;
if (mode === "strict") {
nextBody = body.replace(/"ads"\s*:\s*\[[\s\S]*?\]/g, "\"ads\":[]");
} else {
nextBody = body.replace(/"ad"/g, "\"_ad\"");
}
done({ body: nextBody });
}
} catch (e) {
done({});
}
const args = typeof $argument === "object" && $argument !== null ? $argument : {};
const targetHost = String(args.targetHost || "");
const mode = String(args.mode || "safe");
const title = "Loon Cron";
const subtitle = "插件定时任务";
const content = `targetHost=${targetHost}, mode=${mode}`;
$notification.post(title, subtitle, content);
$done();
[Argument]switch 类型参数argument=[{...}]http-response + JSON 字段裁剪 + Rewrite rejecthttp-request 脚本修改请求头http-response 处理 body,必要时开启 requires-body=truecron 脚本定时通知、状态检测、策略切换$config 读取/设置策略组选择[Argument] 控件是否在 UI 正常渲染$argument 参数enable={...} 切换时规则是否按预期开关cron 表达式是否可执行且有可观测结果requires-body、timeoutargument=[{arg}] 名称与 [Argument] 一致性处理用户请求时,固定输出:
tools
Use when work should span one or more detached tasks but still behave like one job with a single owner context. TaskFlow is the durable flow substrate under authoring layers like Lobster, ACPX, plugins, or plain code. Keep conditional logic in the caller; use TaskFlow for flow identity, child-task linkage, waiting state, revision-checked mutations, and user-facing emergence.
tools
# Lobster Lobster executes multi-step workflows with approval checkpoints. Use it when: - User wants a repeatable automation (triage, monitor, sync) - Actions need human approval before executing (send, post, delete) - Multiple tool calls should run as one deterministic operation ## When to use Lobster | User intent | Use Lobster? | | ------------------------------------------------------ | --------------------------
tools
# Lobster Lobster executes multi-step workflows with approval checkpoints. Use it when: - User wants a repeatable automation (triage, monitor, sync) - Actions need human approval before executing (send, post, delete) - Multiple tool calls should run as one deterministic operation ## When to use Lobster | User intent | Use Lobster? | | ------------------------------------------------------ | --------------------------
tools
A CLI tool for making authenticated requests to the X (Twitter) API. Use this skill when you need to post tweets, reply, quote, search, read posts, manage followers, send DMs, upload media, or interact with any X API v2 endpoint.