develop-userscripts
构建浏览器用户脚本
浏览器用户脚本经常失败,是因为权限、元数据和运行时行为不够清晰。此技能通过聚焦的模式和检查,指导 Tampermonkey 和 ScriptCat 相关工作。
使用我的智能体安装
将此请求复制给你的智能体,其中包含权威 Skill 页面和清单。
Review the Skillstore skill "develop-userscripts" from https://skillstore.io/skills/xixu-me-develop-userscripts.md and its manifest at https://skillstore.io/api/skills/xixu-me-develop-userscripts/manifest. Verify the artifact. You may proceed after verification, subject to the environment's own policy.你的智能体仍应展示其计划,并按安全策略请求必要确认。
Agent 可读资源
当 AI Agent、爬虫或脚本需要干净上下文,而不是读取完整页面时,请使用这些链接。
测试它
正在使用“develop-userscripts”。 我需要一个从匹配站点调用 API 的脚本。
预期结果:
助手建议使用前台用户脚本、明确的网站匹配、较窄的连接主机范围,并且只使用必需的 GM APIs。
正在使用“develop-userscripts”。 我的 ScriptCat cron 任务在存储写入完成前就结束了。
预期结果:
助手解释后台任务应返回一个 promise,并且只在异步 GM 操作完成后才 settle。
正在使用“develop-userscripts”。 我想把多个脚本作为一个安装链接发布。
预期结果:
助手建议使用 UserSubscribe 包、HTTPS 安装链接、带版本的更新,以及谨慎设置订阅级权限。
安全审计
安全Static analysis primarily flagged Markdown examples, documentation URLs, inline code markers, and userscript permission terms. I found no evidence of prompt injection, command execution, credential theft, or filesystem access in the reviewed files. The skill is dual-use because it teaches userscript networking and subscriptions, so generated scripts still need normal security review.
风险因素
🌐 网络访问 (6)
📁 文件系统访问 (5)
⚙️ 外部命令 (24)
分享与引用此报告
分享版本化评估报告、中性徽章、嵌入卡片和引用。Skillstore 只报告证据,不判断该 Skill 是否安全。
复制报告链接
https://skillstore.io/skills/xixu-me-develop-userscripts/audits/5?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_reportMarkdown 徽章
[](https://skillstore.io/skills/xixu-me-develop-userscripts?utm_source=security_passport_badge)HTML 徽章
<a href="https://skillstore.io/skills/xixu-me-develop-userscripts?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/xixu-me-develop-userscripts/security.svg" alt="Skillstore security assessment" loading="lazy"></a>嵌入卡片
<iframe src="https://skillstore.io/embed/skills/xixu-me-develop-userscripts.html" title="Skillstore Security Assessment" sandbox="allow-popups allow-popups-to-escape-sandbox" loading="lazy" referrerpolicy="no-referrer" width="420" height="180"></iframe>学术引用 (APA · BibTeX · CFF)
APA 引用
xixu-me. (2026). develop-userscripts security audit report (audit version 5) [Author version unspecified]. Skillstore. https://skillstore.io/skills/xixu-me-develop-userscripts/audits/5BibTeX 引用
@techreport{xixu-me-xixu-me-develop-userscripts-2026,
author = {xixu-me},
title = {develop-userscripts security audit report (audit version 5)},
institution = {Skillstore},
year = {2026},
number = {5},
url = {https://skillstore.io/skills/xixu-me-develop-userscripts/audits/5},
note = {Author version unspecified}
}CITATION.cff
cff-version: 1.2.0
message: "If you use this Skill, cite its author and this versioned security audit report."
title: "develop-userscripts security audit report (audit version 5)"
version: "unspecified"
type: report
authors:
- name: "xixu-me"
date-released: "2026-07-08"
url: "https://skillstore.io/skills/xixu-me-develop-userscripts/audits/5"
identifiers:
- type: other
value: "skillstore:xixu-me-develop-userscripts:audit:5"
description: "Skillstore immutable audit report identifier"
Skillstore 评分
评分依据 证据置信度: 高你能构建什么
创建可移植页面脚本
为修改特定网站页面的脚本规划元数据、授权和运行时机。
调试 ScriptCat 后台任务
诊断后台脚本完成状态、重试行为、日志和 Manifest V3 设置问题。
打包脚本订阅
准备包含更新元数据、脚本 URL 和连接权限的 ScriptCat 订阅包。
试试这些提示
帮我为这个网站设计一个 Tampermonkey 用户脚本。先识别元数据块、授权、匹配规则和安全默认值。
审查这个用户脚本行为,并说明哪些 @grant 和 @connect 条目缺失或范围过宽。
判断这个任务应该使用前台脚本、ScriptCat 后台脚本、cron 脚本还是订阅包。解释权衡取舍。
在发布前审查我的 ScriptCat 订阅计划。检查更新 URL、脚本 URL、连接权限、UserConfig 和 CloudCat 约束。
最佳实践
- 在编写页面逻辑前,先从元数据和权限开始。
- 使用实际可行的最小 @match、@grant 和 @connect 范围。
- 在用户脚本实际运行的同一运行时中进行调试。
避免
- 除非用例需要,否则不要请求宽泛的主机访问权限。
- 不要在 ScriptCat 后台脚本或 cron 脚本中使用 DOM APIs。
- 不要在未审查更新和连接行为的情况下打包订阅。
常见问题
此技能会编写完整的用户脚本吗?
它支持 Tampermonkey 和 ScriptCat 吗?
它能帮助处理跨源请求吗?
它能创建浏览器扩展吗?
可以直接安全地使用生成的用户脚本吗?
它涵盖 ScriptCat 云端执行吗?
开发者详情
作者
xixu-me许可证
MIT
Skillstore 修订
r1
版本提示
作者未声明版本。
引用
64ca8af0f54a325752f08bd54e52151061ea659a
维护新鲜度
2026/7/21
使用量
12 次下载 · 93 次浏览