chrome-cdp
Interact with local Chrome browser session (only on explicit user approval after being asked to inspect, debug, or interact with a page open in Chrome)
What this skill does
# Chrome CDP Lightweight Chrome DevTools Protocol CLI. Connects directly via WebSocket — no Puppeteer, works with 100+ tabs, instant connection. ## Setup Uses Playwright's Chromium with a persistent profile at `~/.chromium-cdp` (retains logins/cookies across restarts). ### Launch Chromium (if not already running) ```bash scripts/launch-chromium.sh ``` ### Environment All `cdp.mjs` commands MUST be prefixed with the port file env var: ```bash CDP_PORT_FILE=~/.chromium-cdp/DevToolsActivePort scripts/cdp.mjs <command> ``` ## Commands All commands use `scripts/cdp.mjs`. The `<target>` is a **unique** targetId prefix from `list`; copy the full prefix shown in the `list` output (for example `6BE827FA`). The CLI rejects ambiguous prefixes. ### List open pages ```bash CDP_PORT_FILE=~/.chromium-cdp/DevToolsActivePort scripts/cdp.mjs list ``` ### Take a screenshot ```bash scripts/cdp.mjs shot <target> [file] # default: screenshot-<target>.png in runtime dir ``` Captures the **viewport only**. Scroll first with `eval` if you need content below the fold. Output includes the page's DPR and coordinate conversion hint (see **Coordinates** below). ### Accessibility tree snapshot ```bash scripts/cdp.mjs snap <target> ``` ### Evaluate JavaScript ```bash scripts/cdp.mjs eval <target> <expr> ``` > **Watch out:** avoid index-based selection (`querySelectorAll(...)[i]`) across multiple `eval` calls when the DOM can change between them (e.g. after clicking Ignore, card indices shift). Collect all data in one `eval` or use stable selectors. ### Other commands ```bash scripts/cdp.mjs html <target> [selector] # full page or element HTML scripts/cdp.mjs nav <target> <url> # navigate and wait for load scripts/cdp.mjs net <target> # resource timing entries scripts/cdp.mjs click <target> <selector> # click element by CSS selector scripts/cdp.mjs clickxy <target> <x> <y> # click at CSS pixel coords scripts/cdp.mjs type <target> <text> # Input.insertText at current focus; works in cross-origin iframes unlike eval scripts/cdp.mjs loadall <target> <selector> [ms] # click "load more" until gone (default 1500ms between clicks) scripts/cdp.mjs evalraw <target> <method> [json] # raw CDP command passthrough scripts/cdp.mjs open [url] # open new tab (each triggers Allow prompt) scripts/cdp.mjs stop [target] # stop daemon(s) ``` ## Coordinates `shot` saves an image at native resolution: image pixels = CSS pixels × DPR. CDP Input events (`clickxy` etc.) take **CSS pixels**. ``` CSS px = screenshot image px / DPR ``` `shot` prints the DPR for the current page. Typical Retina (DPR=2): divide screenshot coords by 2. ## Tips - Prefer `snap --compact` over `html` for page structure. - Use `type` (not eval) to enter text in cross-origin iframes — `click`/`clickxy` to focus first, then `type`. - Chrome shows an "Allow debugging" modal once per tab on first access. A background daemon keeps the session alive so subsequent commands need no further approval. Daemons auto-exit after 20 minutes of inactivity.
Related in Code Review
gstack
IncludedFast headless browser for QA testing and site dogfooding. Navigate pages, interact with elements, verify state, diff before/after, take annotated screenshots, test responsive layouts, forms, uploads, dialogs, and capture bug evidence. Use when asked to open or test a site, verify a deployment, dogfood a user flow, or file a bug with screenshots. (gstack)
startup-due-diligence
IncludedLegal due diligence review for seed-stage and Series A startups (US, Delaware C-Corp focus). Supports both investor and founder perspectives. Capabilities include: (1) Interactive document review and issue spotting; (2) Document request list generation; (3) Cap table and SAFE/convertible note analysis; (4) Red flag identification with severity ratings; (5) Diligence report generation. TRIGGERS: due diligence, DD, startup investment, cap table review, Series A, seed round, investor diligence, legal review startup, SAFE analysis, convertible note, 409A, founder vesting.
interview-master
IncludedThis skill should be used when the user asks to "generate interview questions", "prepare for interview", "optimize resume", "conduct mock interview", "analyze git commits for resume", "generate resume from code", "review my resume", or mentions interview preparation, career assistance, or extracting project experience from git history. Provides comprehensive interview and career development guidance for both job seekers and interviewers.
fix-issue
IncludedFixes GitHub issues using parallel analysis agents for root cause investigation, code exploration, and regression detection. Reads issue context from gh CLI, searches codebase and memory for related patterns, generates a fix with tests, and links the resolution back to the issue via PR. Includes prevention analysis to avoid recurrence. Use when debugging errors, resolving regressions, fixing bugs, or triaging issues.
sf-apex
IncludedGenerates and reviews Salesforce Apex code with 150-point scoring. TRIGGER when: user writes, reviews, or fixes Apex classes, triggers, test classes, batch/queueable/schedulable jobs, or touches .cls/.trigger files. DO NOT TRIGGER when: LWC JavaScript (use sf-lwc), Flow XML (use sf-flow), SOQL-only queries (use sf-soql), or non-Salesforce code.
swift-development
IncludedComprehensive Swift development for building, testing, and deploying iOS/macOS applications. Use when Claude needs to: (1) Build Swift packages or Xcode projects from command line, (2) Run tests with XCTest or Swift Testing framework, (3) Manage iOS simulators with simctl, (4) Handle code signing, provisioning profiles, and app distribution, (5) Format or lint Swift code with SwiftFormat/SwiftLint, (6) Work with Swift Package Manager (SPM), (7) Implement Swift 6 concurrency patterns (async/await, actors, Sendable), (8) Create SwiftUI views with MVVM architecture, (9) Set up Core Data or SwiftData persistence, or any other Swift/iOS/macOS development tasks.