본문으로 건너뛰기
cccskills
무료GitHub에 공개

pick

Pick an element from the browser by clicking it (starts the dev server if needed) and get back its CSS selector, tag, classes, and text. Manual only.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

연동 도구Playwright
설치 방법 보기

포함된 파일(2)

  • SKILL.md5.4 KB
  • picker.js4.5 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

pick

Context

  • Current working directory: !pwd
  • Package.json dev script (if exists): !cat package.json 2>/dev/null | grep -E '"dev":|"start":' | head -2 || echo "No dev/start script"
  • Dev host/port hint (from CLAUDE.md, if any): !grep -rhoE 'https?://[a-zA-Z0-9.-]+:[0-9]+' CLAUDE.md .claude/CLAUDE.md 2>/dev/null | sort -u | head -3 || echo "No CLAUDE.md dev URL hint"
  • LISTEN ports (candidate dev servers): !{ ss -tlnH 2>/dev/null | awk '{print $4}' || lsof -nP -iTCP -sTCP:LISTEN 2>/dev/null | awk 'NR>1{print $9}'; } | grep -oE ':[0-9]+$' | tr -d ':' | sort -un | grep -vE '^(22|53|631)$' | head -10 || echo "none"
  • Debuggable browser on :9222 (Chrome OR Edge — both CDP): !curl -s --max-time 1 http://localhost:9222/json/version 2>/dev/null | grep -oE '"Browser": *"[^"]*"' || echo "nothing on :9222"

Your task

Help the user pick an element from the browser. playwright-cli attaches to any Chromium browser over CDP (Chrome, Edge, Electron) — there is no native picker, so we inject a JS overlay and poll for the result.

Every command below runs in the named session -s=pick (the flag goes before the command), so it never touches the user's other playwright-cli sessions.

Step 0: Preflight

${CLAUDE_PLUGIN_ROOT}/skills/playwright-cli/check.sh

If it fails, stop and relay its message to the user — it says what to install.

Step 1: Get a debuggable browser

  • Reuse what's already on :9222 if the context shows one (the user's normal Chrome/Edge — best, keeps logged-in sessions). Skip to Step 1b.
  • Else launch a fresh Chrome. Must be detached (nohup … &) or it dies when the command returns. --ignore-certificate-errors --test-type handles flaky dev TLS (e.g. self-signed *.local hosts). 9222 is often taken by Edge/Teams, so use a free port. The binary name differs per OS: google-chrome (Linux), "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" (macOS), chrome.exe or msedge.exe (Windows) — Edge takes the same flags.
    nohup google-chrome --remote-debugging-port=9223 \
      --user-data-dir="$HOME/.chrome-debug-profile" \
      --ignore-certificate-errors --test-type "<start-url>" \
      </dev/null >/dev/null 2>&1 &
    until curl -s http://localhost:9223/json/version >/dev/null 2>&1; do sleep 0.3; done
    

Step 1b: Attach + select the tab

Attach to the browser, list its tabs, and select the one showing the app. Tab selection is explicit and sticky: every later eval hits that tab.

PORT=9222   # or 9223 if you launched fresh
playwright-cli -s=pick close 2>/dev/null   # drop a stale pick session, if any
playwright-cli -s=pick attach --cdp=http://localhost:$PORT
playwright-cli -s=pick tab-list                 # "- 1: (current) [Title](url)"
playwright-cli -s=pick tab-select <n>
playwright-cli -s=pick --raw eval 'location.href + " | " + document.title'   # confirm right tab

Step 2: Find the page to pick from

  • Prefer the dev URL hint from CLAUDE.md (context above) — it carries the right host (some apps key locale/routing off the Host header, so localhost ≠ the project hostname).
  • Else pick the dev server from the LISTEN ports above (ignore system ports).
  • If nothing is listening, start the app the way this project starts it: a run skill for the project if one is available, else whatever CLAUDE.md or the README prescribes, else the repo's own package manager and dev script. Background it and wait until its port is LISTEN.

Step 3: Navigate

playwright-cli -s=pick goto "<dev-url>"
playwright-cli -s=pick --raw eval 'location.href + " | " + document.title'   # confirm

Step 4: Arm the picker overlay, then poll

Inject the overlay (multi-select via Ctrl/Cmd+click, Enter finishes, single click resolves one, ESC cancels):

playwright-cli -s=pick --raw eval "$(cat "${CLAUDE_SKILL_DIR}/picker.js")"

The overlay lives in picker.js next to this file: it highlights whatever the cursor is over, and on click leaves the pick (selector, text, truncated HTML, attributes) on window.__picked with window.__pickerDone set. Returns "armed", or "already-armed" if it is on the page already.

Then poll (eval is one-shot, so loop). --raw eval prints the value as JSON, so returning the object itself gives clean, parseable output:

for i in $(seq 1 120); do
  r=$(playwright-cli -s=pick --raw eval 'window.__pickerDone ? window.__picked : null' 2>/dev/null)
  [ -n "$r" ] && [ "$r" != "null" ] && { echo "$r"; break; }
  sleep 1
done
[ -z "$r" ] || [ "$r" = "null" ] && echo "TIMEOUT: no element picked in 120s"

Use the user's prompt below to tell the user what to click before you start polling.

Step 5: Return results

  • If cancelled, report the user cancelled.
  • For a single pick or each multi entry, show tag / id / classes / text and the ready-to-use CSS selector.
  • Detach so the user's browser stays up: playwright-cli -s=pick detach.

User prompt (if any)

$ARGUMENTS

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Structure AI work artifacts under .aiwork/{YYYY-MM-DD}_{slug}/ folders using the project's protocol (intent, triage, research, spec, prd, areas, plan, review, notes, docs/). Use when the user asks to plan, capture an intent, make a spec, triage, research a task, write a report, code review, summarize findings, save the work, document decisions, record this, write that down, persist findings, or references any path under .aiwork/. Also use when starting a non-trivial task that needs a plan or spec before implementation, or when finishing one and capturing notes.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

lttr/claude-marketplace22026년 10월 22일 업데이트

Use this skill when the user asks to test, verify, interact with, or automate web pages and browsers. Trigger for requests involving Chrome automation, browser testing, web scraping, screenshot capture, element selection, or checking web applications. Also trigger when user mentions "browser tools" explicitly.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

lttr/claude-marketplace22026년 10월 22일 업데이트

changelog

무료

Show recent Claude Code changes personalized to user's setup. Trigger when user asks about changelog, "what's new", "cc changelog", "claude code updates", "recent changes", or wants to know what changed in Claude Code.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

lttr/claude-marketplace22026년 10월 22일 업데이트

Review code changes from current branch, an Azure DevOps PR, a git ref, or a diff/patch file. Trigger when user says "review this", "code review", "/df:code-review", or provides a PR id/URL, ticket URL, git ref, or diff path. Read-only — never posts comments.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

lttr/claude-marketplace22026년 10월 22일 업데이트

Review code changes from the current branch, staged changes, a git ref, or a diff/patch file. Pure git-native — no platform/PR awareness. Trigger when user says "review this", "review diff", "/aiwork:code-review-diff", or provides a git ref or diff path. Read-only — never posts comments.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

lttr/claude-marketplace22026년 10월 22일 업데이트

Czech typography rules for web development. Use when building web pages in Czech language, writing Czech content, or fixing typography issues in Czech text. Covers punctuation, dashes, quotes, numbers, units, non-breaking spaces, and HTML entities.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

lttr/claude-marketplace22026년 10월 22일 업데이트

lttr의 스킬 모두 보기

이 스킬의 문제 신고