Silmaril Ranger
Browser automation, DOM inspection, page mutation, wait orchestration, flow execution, and local proxy override work through the Silmaril Chrome DevTools Pro...
Description
name: silmaril-cdp description: Browser automation, DOM inspection, page mutation, wait orchestration, flow execution, and local proxy override work through the Silmaril Chrome DevTools Protocol toolkit. Use when the task requires opening Chrome with CDP, navigating pages, reading DOM or source, extracting structured data, clicking or typing into elements, evaluating JavaScript, waiting for UI state changes, running Silmaril flow JSON files, or managing mitmproxy-backed local overrides.
Silmaril CDP
Use this skill to operate the local Silmaril toolkit from PowerShell.
Locate the toolkit
- Prefer
D:\silmairl cdp\silmaril.cmdin this environment. - If that path is missing, look for
silmaril.cmdonPATHor in a nearby checkout. - Invoke from PowerShell with
& 'D:\silmairl cdp\silmaril.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.
-
Clone or copy the repository:
git clone https://github.com/Malac12/CDP-tools.git "D:\silmairl cdp" -
Ensure Chrome, Chromium, or Edge is installed.
The toolkit checks standard Windows install paths and falls back to
chrome.exeonPATH. -
Run the toolkit from PowerShell:
& 'D:\silmairl cdp\silmaril.cmd' openbrowser --json& 'D:\silmairl cdp\silmaril.cmd' openUrl 'https://example.com' --json& 'D:\silmairl cdp\silmaril.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
- Start or attach a CDP browser with
openbrowser. - Navigate with
openUrl. - Read page state with
exists,get-text,query, orget-dom. - Mutate only after validating selectors.
- Wait on one clear synchronization signal after each action.
- Prefer
runfor short repeatable flows.
Operating rules
- Prefer
--jsonfor almost every command so later steps can parse structured output. - Prefer live DOM commands over
get-sourcewhen choosing selectors or checking rendered state. - Prefer stable selectors such as
data-test,data-testid, semantic IDs, and meaningful attributes. - Use either
--target-idor--url-matchwhen multiple tabs exist; never use both together. - Pass
--yesfor page actions and mutations such asclick,type,set-text,set-html, andeval-js. - Treat
eval-js,proxy-override,proxy-switch, andopenurl-proxyas high-risk commands. - Use
--allow-unsafe-jsforeval-js, or setSILMARIL_ALLOW_UNSAFE_JS=1only for a trusted local session. - Use
--allow-mitmfor proxy commands, or setSILMARIL_ALLOW_MITM=1only 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 --fileinstead of pasting large inline expressions. - Avoid fixed sleeps when a wait command can express the intended state.
Command selection
- Use
get-textfor a single text value. - Use
queryfor structured multi-row extraction. - Use
get-domto debug selector or markup issues. - Use
get-sourceonly when raw response HTML matters more than the rendered DOM. - Use
wait-for,wait-for-any,wait-for-gone,wait-until-js, orwait-for-mutationto synchronize.
References
- Read
references/command-patterns.mdfor common command shapes and PowerShell-safe examples. - Read
references/flows.mdbefore building or editing arunflow. - Read
references/proxy.mdwhen working withopenurl-proxy,proxy-override, orproxy-switch.
Reviews (0)
No reviews yet. Be the first to review!
Comments (0)
No comments yet. Be the first to share your thoughts!