当前位置: 首页 > Skill >

Silmaril Ranger

Silmaril Ranger

1.0.2 2026.11.25 浏览:965
获取Skill文件查看使用说明
作者:苏禾许可证:
本文目录展开

Silmaril CDP

Use this skill to operate the local Silmaril toolkit from PowerShell.

Locate the toolkit

  • Prefer D:silmairl cdpsilmaril.cmd in this environment.
  • If that path is missing, look for silmaril.cmd on PATH or in a nearby checkout.
  • Invoke from PowerShell with & 'D:silmairl cdpsilmaril.cmd' ....

Install the toolkit if missing

Use this setup on Windows when the toolkit is not already present:

Only clone or copy the toolkit after the user explicitly approves fetching or installing remote code.

  1. Clone or copy the repository:

    git clone https://github.com/Malac12/CDP-tools.git "D:silmairl cdp"

  2. Ensure Chrome, Chromium, or Edge is installed.

    The toolkit checks standard Windows install paths and falls back to chrome.exe on PATH.

  3. Run the toolkit from PowerShell:

    & 'D:silmairl cdpsilmaril.cmd' openbrowser --json & 'D:silmairl cdpsilmaril.cmd' openUrl 'https://example.com' --json & 'D:silmairl cdpsilmaril.cmd' get-text 'body' --json

This is sufficient for the core CDP workflow. No machine-wide PowerShell execution policy change is required because silmaril.cmd invokes PowerShell with ExecutionPolicy Bypass.

Default workflow

  1. Start or attach a CDP browser with openbrowser.
  2. Navigate with openUrl.
  3. Read page state with exists, get-text, query, or get-dom.
  4. Mutate only after validating selectors.
  5. Wait on one clear synchronization signal after each action.
  6. Prefer run for short repeatable flows.

Operating rules

  • Prefer --json for almost every command so later steps can parse structured output.
  • Prefer live DOM commands over get-source when choosing selectors or checking rendered state.
  • Prefer stable selectors such as data-test, data-testid, semantic IDs, and meaningful attributes.
  • Use either --target-id or --url-match when multiple tabs exist; never use both together.
  • Pass --yes for page actions and mutations such as click, type, set-text, set-html, and eval-js.
  • Treat eval-js, proxy-override, proxy-switch, and openurl-proxy as high-risk commands.
  • Use --allow-unsafe-js for eval-js, or set SILMARIL_ALLOW_UNSAFE_JS=1 only for a trusted local session.
  • Use --allow-mitm for proxy commands, or set SILMARIL_ALLOW_MITM=1 only for a trusted local session.
  • Keep proxy listeners on loopback addresses unless the user explicitly requests --allow-nonlocal-bind.
  • Put long JavaScript in a file and use eval-js --file instead of pasting large inline expressions.
  • Avoid fixed sleeps when a wait command can express the intended state.

Command selection

  • Use get-text for a single text value.
  • Use query for structured multi-row extraction.
  • Use get-dom to debug selector or markup issues.
  • Use get-source only when raw response HTML matters more than the rendered DOM.
  • Use wait-for, wait-for-any, wait-for-gone, wait-until-js, or wait-for-mutation to synchronize.

References

  • Read references/command-patterns.md for common command shapes and PowerShell-safe examples.
  • Read references/flows.md before building or editing a run flow.
  • Read references/proxy.md when working with openurl-proxy, proxy-override, or proxy-switch.

推荐文章

更多
PHP时间戳与日期字符串相互转换方法详解

本文介绍PHP中时间数值(Unix时间戳)与日期字符串之间的相互转换方法。通过strtotime和date函数,实现将当前时间、指定日期转换为时间戳,以及将时间戳格式化为可读的日期时间字符串,并提供相关在线计算工具推荐。

2025.11.30 1,034
PHP日期转时间戳时区偏差怎么解决

在 PHP 中将日期字符串转换为时间戳时,若未显式指定时区,默认使用脚本配置的 date.timezone 或系统时区。当服务器时区与业务逻辑预期(如 UTC )不一致时,会产生偏差。解决核心是确保输入字符串携带明确时区信息,或在转换前统一设置时区上下文。

2026.10.24 1,031
PHP跨域配置:怎么安全地允许指定域名而非使用通配符

在 PHP 中安全地允许指定域名跨域,核心是解析请求头中的 Origin ,验证其是否在白名单内,然后动态设置 Access-Control-Allow-Origin 响应头。不要使用通配符 * ,也不要硬编码单一域名。

2025.03.29 1,018
JavaScript中利用replace结合正则实现replaceAll效果

JavaScript原生仅支持replace()进行单次或全局替换,缺乏类似Java的replaceAll()便捷方法。本文总结四种在JS中实现全量替换的方案:使用带g标志的正则、带gm标志的正则、扩展String原型以及split后join。通过对比代码示例,展示各方法的实现细节与适用场景,帮助开发者根据需求选择最优解。

2025.04.29 1,017
OpenAI的Jalapeno芯片未落地,教你分辨300兆瓦算力消息

OpenAI计划在SB Energy租赁的数据中心部署约300兆瓦自研Jalapeno推理芯片,但目前双方仍处于洽谈阶段,交易细节与上线时间表均未公布。本文带你按报道原文核实项目所处阶段,厘清芯片发布、电力功率与实际推理算力的边界,并将融资意向与签约、开工、投运节点分开追踪,避免误将规划容量计入现有算力。

2026.12.02 1,013
PHP实现基础文件上传:HTML表单与$_FILES处理流程

在 HTML 表单中设置 enctype="multipart/form-data" ,并在 PHP 后端通过 $_FILES 数组接收文件,调用 move_uploaded_file() 将临时文件移动到目标目录即可完成上传。

2026.09.07 1,013
Skill 文件

相关 Skill

更多
Browsertrix Crawler High-Fidelity Web Archiving and QA Crawler Browsertrix Crawler High-Fidelity Web Archiving and QA Crawler Browsertrix Crawler 是 Webrecorder 推出的基于浏览器的爬取系统,用于高保真网站捕获、QA 回放分析和可配置的爬取行为。它在单个 Docker 容器中运行复杂的爬取任务,并在底层使用 Puppeteer 加上 Chrome DevTools Protocol。
CDP浏览器大师 CDP浏览器大师 CDP浏览器大师:通过Chrome DevTools Protocol驱动已登录浏览器实现自动化任务,解决反爬封号、选择器失效、SPA路由难导航、固定sleep不准四大痛点。核心能力包括UA伪装、WebGL/Canvas指纹混淆、智能等待、动态选择器以及可视化调试。
browser-use-init browser-use-init 初始化并启动 Chrome DevTools Protocol (CDP) 模式,支持使用 Playwright 和 browser-use Agent 远程控制真实 Chrome 浏览器。解决 Chrome 145+ App-Bound Encryption 限制,自动复制 Profile 到非默认路径以启用 CDP。
UI-Agent UI-Agent 通用 UI 自动化,支持浏览器和桌面应用。基于 Chrome DevTools 协议和原生 API,已通过 15/15 项验证测试。
Nodriver 异步无检测 Chrome 浏览器自动化 Python Nodriver 异步无检测 Chrome 浏览器自动化 Python Nodriver是Undetected-Chromedriver的官方继承者,提供异步浏览器自动化功能,可直接与Chrome DevTools Protocol通信,无需Selenium或WebDriver依赖。专为规避反机器人系统(包括Cloudflare和Imperva)的隐蔽网络自动化而构建。