/kernel-dev:profile-site <url>from kernel-dev
Profile a website's bot detection with Kernel browsers (stealth vs normal on the same network), identify the vendors and recommend a Kernel configuration.
Ships in kernel-dev. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
You are measuring how one website treats a Kernel stealth browser and a normal Kernel browser on the same network, naming the anti-bot vendors it uses, and recommending a Kernel configuration. Read-only toward the site (two page loads per browser: home page and a login page the analyzer finds, plus up to seven HEAD requests to common login paths when no login link is found). Creates two billable headful browsers (about 0.48 USD per hour each by the per-second rate on https://www.kernel.sh/docs/info/pricing, not re-measured; roughly a few cents for ~5 minutes); you delete both before you finish.
Use it for a real target. A fingerprint test page such as bot.sannysoft.com cannot tell the modes apart: in a live run it gave 57 per-check results, all passing and identical in stealth and normal. If the URL is a fingerprint-test page, stop and ask for a real protected site; continue only if the user wants just that page profiled, and then state in the report that stealth and normal cannot be told apart on it.
Browsers: concurrent_sessions_available (step 1) decides. 3 or more: both browsers are created at once (one slot stays free for other work). 1 or 2: step 4's sequential variant (one browser alive at a time). 0, or no number: stop.
The argument is the text after the skill name in the user's message (or the line starting ARGUMENTS:). It is a URL or hostname. If it is missing, ask for it and stop. Normalize a bare hostname to https://<host>/. Refuse and ask again if the URL has credentials, tokens, signed query strings, a path whose GET triggers an action, or any of ', ;, $, a backtick or whitespace (the URL is written into a shell state file and a command). Only profile public sites the user is allowed to test (https://www.kernel.sh/docs/config-registry).
Rules for the whole run:
KERNEL_API_KEY, cdp_ws_url, webdriver_ws_url, browser_live_view_url, base_url, or any URL with a query string. The analyzer prints and stores no session URLs (it reports the session id only), no query strings or fragments and no cookie values, and it redacts sensitive header values. Its logs and reports still hold sanitized origin+path URLs, non-sensitive header values and request metadata, so never share them, never cat a log or report, and read them only through the jq/grep filters below.$W/state.env (shell variables do not survive between calls, W included). Step 3 prints the work directory; in every later call, start with W='<that literal path>'; source "$W/state.env". Set the Bash timeout to 600000 ms for step 5.$(( $(date +%s) - START )) above 900; START is in state.env after step 4).Run now:
command -v kernel && kernel --version
command -v jq && node --version && command -v npm
test -n "${KERNEL_API_KEY:-}" && echo "key set" || echo "KERNEL_API_KEY missing"
kernel missing: print brew install kernel/tap/kernel and stop. Do not install anything. jq missing, Node older than 22, or npm missing: tell the user which one and stop.KERNEL_API_KEY in their environment (never paste it in chat) and stop.Then run out=$(kernel auth context -o json) && jq 'keys' <<<"$out" || echo "could not run: auth context" and out=$(kernel org limits get -o json) && jq '{concurrent_sessions_available}' <<<"$out" || echo "could not run: org limits" (the CLI writes errors to stderr and nothing to stdout, so a bare pipe into jq would hide a failure). If either prints could not run, stop. If concurrent_sessions_available is 0 or null, tell the user and stop; 1 or 2 means the sequential variant in step 4; 3 or more means both at once. A 403 on browser create later means a plan gate or spending cap: read the body, report it, stop.
The registry holds settings that already worked for a site (https://www.kernel.sh/docs/config-registry; hobbyist plan and up). lookup is read-only: it visits nothing and creates nothing. There is no CLI command for it, so use the SDK (kernel.configRegistry.lookup({ url })). The key stays in the environment, never on a command line. The SDK is installed by step 3, so run step 3 first, then this (TARGET_URL comes from state.env):
W='<work dir printed in step 3>'; source "$W/state.env"
cd "$W/scripts" && TARGET_URL="$TARGET_URL" node --input-type=module -e '
import Kernel from "@onkernel/sdk";
try {
const r = await new Kernel().configRegistry.lookup({ url: process.env.TARGET_URL });
const rec = r.recommendation;
console.log(JSON.stringify({ status: "ok", type: rec?.type ?? null, code: rec?.code, browser: rec?.browser, proxy_mode: rec?.proxy?.mode, working: r.working_configurations.length, match: rec?.match_scope, guidance: r.guidance ?? null }, null, 2));
} catch (e) { console.log(JSON.stringify({ status: String(e.status ?? "error") })); }
'
Read status first. If it is not ok, skip this step and put lookup failed <status>, skipped in the report. If it is ok:
type: "recommendation": keep browser and proxy_mode for step 8 and compare them with the measured result. proxy_mode: "managed" means the recommendation needs a managed proxy created once and reused; the recommendation's proxy.create payload names the proxy type (isp, residential, mobile or custom) to create, so read it (rec.proxy.create.type) instead of assuming ISP. This skill does not create it (it runs both browsers on direct egress); to create or find it, follow ../kernel/references/unblock.md sections 1 and 5 (kernel.proxies.create({ type, name }) with that type, then kernel.proxies.check(id), then kernel.browsers.create({ proxy: { id } }); look the proxy up by name before creating another). Treat guidance text that names unrelated CDNs as generic, not as a finding about this target.type: null (no answer): the site is not necessarily unreachable. Do not call resolve unless the user asks (it runs several minutes in the background); this skill's own measurement is the evidence.type: "no_recommendation": print code (proxy_restricted, target_not_evaluable, no_working_configuration, inconclusive) and guidance.The analyzer is Kernel's official script (see scripts/NOTICE.md), with package.json pinned to @onkernel/sdk 0.129.0 and a lockfile. If dependencies are already installed in this skill's scripts folder (node_modules present), you may run the analyzer from there instead of copying and running npm ci; set W to a fresh mktemp -d anyway for logs and output, and cd into the skill's scripts for step 5. Otherwise find this skill's directory (the "Base directory for this skill" path shown when the skill loaded), then run now, replacing <SKILL_DIR> and <URL>:
W=$(mktemp -d /tmp/profile-site.XXXXXX)
cp -R "<SKILL_DIR>/scripts" "$W/scripts"
(cd "$W/scripts" && npm ci --ignore-scripts --no-audit --no-fund > "$W/npm.log" 2>&1) || { tail -n 5 "$W/npm.log"; echo "npm ci failed"; exit 1; }
TARGET_URL='<URL>'
HOST=$(TARGET_URL="$TARGET_URL" node -e 'console.log(new URL(process.env.TARGET_URL).hostname.replace(/^www\./, "").replace(/\./g, "-"))') || { echo "URL does not parse"; exit 1; }
[ -n "$HOST" ] || { echo "empty host"; exit 1; }
{ printf 'W=%q\n' "$W"; printf 'RUN=%q\n' "$(basename "$W")"; printf 'TARGET_URL=%q\n' "$TARGET_URL"; printf 'HOST=%q\n' "$HOST"; } > "$W/state.env"
echo "$W"
If npm ci fails or the URL does not parse, the block above exits before state.env is written: report it and stop (nothing is created yet).
Concurrency: from step 1, if concurrent_sessions_available is 1 or 2, use the sequential variant: run the stealth create block, step 5 for stealth, delete it (step 7 loop), then only the normal create line, step 5 for normal, and step 7 again, recording each id in state.env as it is created. It keeps the comparison fair on the same network and never has two billable browsers alive at once. Otherwise create both up front as below. Default design, "both direct": both browsers leave through Kernel's direct egress, so the only difference is stealth. Without this, stealth uses the shared ISP proxy and normal goes direct, so the test measures stealth plus proxy against normal plus direct (different egress IPs). Do not use kernel browsers update --disable-default-proxy for this (deprecated; the create-time form did not give direct egress in testing). Every browser is tagged run=<work dir name> so cleanup touches only these. The timeout counts from idle, and the analyzer runs one browser at a time for a few minutes, so the other browser sits idle: 600 s keeps it from being reaped before its own run. Run now:
W='<work dir printed in step 3>'; source "$W/state.env"
echo "START=$(date +%s)" >> "$W/state.env"
kernel browsers create --stealth --proxy-mode direct --viewport 1920x1080@25 --timeout 600 --tag "run=$RUN" --tag purpose=profile-site -o json > "$W/stealth.json"; echo "stealth exit $?"
echo "STEALTH_ID=$(jq -r '.session_id // empty' "$W/stealth.json")" >> "$W/state.env"
source "$W/state.env"
if [ -n "$STEALTH_ID" ]; then
kernel browsers create --proxy-mode direct --viewport 1920x1080@25 --timeout 600 --tag "run=$RUN" --tag purpose=profile-site -o json > "$W/normal.json"; echo "normal exit $?"
echo "NORMAL_ID=$(jq -r '.session_id // empty' "$W/normal.json")" >> "$W/state.env"
fi
source "$W/state.env"
for id in "$STEALTH_ID" "${NORMAL_ID:-}"; do [ -n "$id" ] || continue; out=$(kernel browsers get "$id" -o json) && jq '{session_id,stealth,headless,proxy,tags}' <<<"$out" || echo "could not run: browsers get"; done
If the stealth create fails (empty STEALTH_ID), the normal browser is not created: go to step 7, then report. If the stealth browser exists but the normal create failed (empty NORMAL_ID), also go to step 7, then report. Both browsers are headful (the default); defended sites flag headless. Check the printed records. Stealth must show "stealth": true and "proxy": {"mode": "direct"}; normal must show "stealth": false and "proxy": {"mode": "direct"}. If stealth shows {"mode": "default"}, go to step 7, then tell the user the fair comparison was not possible and offer the "platform defaults" design below. (Verified live: the session record showed stealth: true with proxy.mode: direct.)
Other designs, only if the user asks (name the one used in the report): "platform defaults" omits --proxy-mode direct on the stealth create and the result is "stealth + default proxy", never stealth alone; "same explicit proxy" adds --proxy-id <ID> instead of --proxy-mode to both creates (rotation can still change the exit IP).
Run now, one Bash call per browser (each takes up to a few minutes; the analyzer disconnects but leaves the browser alive):
W='<work dir printed in step 3>'; source "$W/state.env"
cd "$W/scripts"
KERNEL_BROWSER_ID="$STEALTH_ID" TARGET_URL="$TARGET_URL" BROWSER_MODE=stealth OUTPUT_DIR="$W/output" npm run analyze > "$W/stealth.log" 2>&1; echo "exit $?"
grep -E 'BLOCKED|DATADOME|Vendor analysis completed|Test failed' "$W/stealth.log" | sed -E 's/\?[^ "]*/?***/g' | head -n 15
The logs hold no session URLs, query strings, cookie values or sensitive header values, but they do hold sanitized origin+path URLs and non-sensitive header values, so keep them in $W and do not share them. Then the same with NORMAL_ID, BROWSER_MODE=normal, normal.log. A non-zero exit or a Test failed line: show the masked grep output, go to step 7, and report that browser's result as "no data".
Run now:
W='<work dir printed in step 3>'; source "$W/state.env"
for m in stealth normal; do
R=$(ls -t "$W/output/$HOST/$m"/report-*.json 2>/dev/null | head -n 1)
[ -n "$R" ] || { echo "no $m report"; continue; }
# the saved report holds no session URLs, query strings, cookie values or sensitive header values; it does hold origin+path URLs and non-sensitive header values
echo "=== $m ==="
jq '{verdict: .summary.verdict, isBlocked: .summary.isBlocked, hasSuspicion: .summary.hasSuspicion, vendors: .summary.vendorNames, blockedPages: [.summary.blockedPages[]? | {page, blockType, vendor, confidence}], blockedVendors: .summary.blockedVendors, suspicious: [.summary.suspiciousPages[]? | {page, blockType}]}' "$R"
jq -r '.vendorDetections | to_entries[] | "\(.key): \([.value.products[].product] | unique | join(", "))"' "$R"
done
A BLOCKED verdict from the analyzer is a heuristic: confirm it by looking at the saved screenshot ($W/output/$HOST/<mode>/screenshot-*.png) before acting on it. Identical BLOCKED verdicts in both modes with a normal-looking page is an analyzer false positive, not a block. Example: bot.sannysoft.com gave BLOCKED - login (Possible Block Page) at medium confidence in both modes while the screenshot showed an ordinary test form; escalating from that would have been wrong. Report such a result as "analyzer verdict blocked, screenshot shows normal page, treated as not blocked" and use the no-block rows below.
Run now. It lists active browsers 100 at a time (--limit 100 with --offset; the default is 20), checks the exit status of every list call, selects yours by the run tag on the client side (on a shared account the server-side tag filter alone can miss yours), collects all ids first (deleting while paging would shift the offsets), then deletes one id per call and tolerates only NotFound:
W='<work dir printed in step 3>'; source "$W/state.env"
collect() { : > "$DST"; off=0
while :; do
kernel browsers list --status active --limit 100 --offset "$off" -o json > "$W/list.json" || return 1
n=$(jq 'length' "$W/list.json") || return 1
jq -r --arg run "$RUN" '.[] | select(.tags.run == $run) | .session_id' "$W/list.json" >> "$DST" || return 1
[ "$n" -lt 100 ] && return 0; off=$((off + 100))
done; }
DST="$W/alive.txt" collect || echo "LIST FAILED: cleanup not confirmed, repeat this step"
while read -r id; do [ -n "$id" ] || continue
out=$(kernel browsers delete "$id" 2>&1) || case "$out" in *404*|*[Nn]ot\ [Ff]ound*) ;; *) echo "delete failed: $id";; esac
done < "$W/alive.txt"
DST="$W/left.txt" collect && echo "left with this run tag: $(grep -c . "$W/left.txt")" || echo "LIST FAILED: cannot confirm zero left"
If the final line is not left with this run tag: 0 (including LIST FAILED), repeat the block once and name any id you could not delete or confirm in the report; never write "0 left" without that line. If state.env is lost, the run id is the work directory's basename (profile-site.XXXXXX); never delete browsers whose run tag differs. Keep $W/output for the user unless they ask you to remove it.
Judge the two verdicts, then pick the cheapest rung that held. Rungs are the escalation ladder in the kernel skill's ../kernel/references/unblock.md.
| Stealth | Normal | Means | Recommend |
|---|---|---|---|
| no vendors, no block | no vendors, no block | No signal seen. Not proof the site has no bot detection (two pages, one run each) | Normal headful browser; start at the home page |
| vendors, no block | vendors, no block | Detection present, both pass | Normal headful; add stealth only if it blocks later at volume |
| no block | blocked | Stealth helps on a controlled network (inference from one run) | stealth: true. Then re-test with the default stealth proxy (proxy omitted), because that is what production gets |
| blocked | blocked | Both fail on this network | Next rungs: dedicated ISP proxy plus a profile, then residential proxy, then GPU browser (plan-gated); see ../kernel/references/unblock.md |
| BLOCKED by the analyzer | BLOCKED by the analyzer, screenshots look normal | Analyzer false positive | Treat as not blocked and say so in the report ("analyzer verdict blocked, screenshot shows a normal page"); use the no-block rows |
| one side BLOCKED by the analyzer with a normal screenshot, or no login page analyzed | the other side as judged | The block is unproven | Do not recommend stealth from it; re-judge with the screenshots and treat a mode with nothing analyzed as "no data" |
| blocked | no block | Odd; the proxy/network, not stealth, likely differs between runs | Offer one re-run (it creates two more billable browsers, a few cents) and wait for a yes; report as inconclusive if it repeats or the user declines |
Vendor notes from the analyzer (use them in "Next steps"):
IP Hard Block (must change IP): a captcha cannot fix it; change the IP (different proxy type), do not escalate stealth._abck without ~0~, Imperva reese84: fingerprint or behavior signals; stealth plus a stable IP and a returning-user profile is the next try, nothing here proves a fix.x-kernel-proxy-error, or a 502, is Kernel's proxy layer, not the site's bot detection (../kernel/references/unblock.md section 8).If step 2 returned a recommendation that disagrees with your result, prefer your measurement on the user's real network and report the disagreement (both values) in the Registry line; offer to test the recommended config rather than ignoring either. This run used direct egress only: if the registry says stealth plus a managed proxy, the measurement wins for what was tested (stealth, direct), and the managed-proxy part stays a recommendation to try, not a result. Config snippet to hand back, only for the rung you recommend:
// not run as written; create params are from the SDK types
const browser = await kernel.browsers.create({ stealth: true, headless: false, timeout_seconds: 300 });
try {
// ... drive it ...
} finally {
await kernel.browsers.deleteByID(browser.session_id).catch((e) => { if (!(e instanceof Kernel.NotFoundError)) throw e; });
}
Report exactly this, filling every field (write "unknown" rather than guessing):
Site: <host> Date: <today>
Network design: <both direct | stealth + default proxy | same explicit proxy> Verified in session records: <yes | no>
Registry: <recommendation summary | none | no_recommendation <code> | lookup failed <status>, skipped>
| Browser | Verdict | Blocked | Block type | Vendors |
|---|---|---|---|---|
| stealth | ... | yes/no | ... | ... |
| normal | ... | yes/no | ... | ... |
Vendors and products: <vendor: products, seen in stealth/normal>
Stealth effect: <effective | no effect | inconclusive> because <one line>
Recommended configuration: <rung and create params, or "normal headful">
Next steps: <up to 3 bullets, one per detected vendor or block>
Cleanup: <ids deleted, active browsers left with run=<RUN>: 0 or the ids>
Evidence kept at: <$W/output path> (contains cookie names, header names, non-sensitive header values, origin+path URLs and vendor evidence; no cookie values, query strings or session URLs; do not share)
Not verified: <list anything skipped or failed>
Checked 2026-10-20 against @onkernel/sdk 0.128.0 and kernel CLI 0.49.0; types re-checked on 0.129.0. Run live: the analyzer,
--stealthwith--proxy-mode direct(ledger W5), and the registrylookupthrough raw HTTP (curl); the SDK form in step 2 is the same call and was not run as written. Details: https://github.com/yigitkonur/plugin-kernel-sh/blob/main/verified-facts.md
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub yigitkonur/plugin-kernel-sh --plugin kernel-devOther plugins' skills for the same job
7 skills in this plugin
/auditAudit this project's Kernel usage: environment, deprecated fields, cleanup on every path, secrets, retries, pools, profiles, telemetry. Read-only; reports file:line findings with fixes and sources./debug-sessionDebug a failed, hung, blocked or timed-out Kernel browser session from its session id or name: read session state and telemetry events (they stay readable after the browser is deleted), check live page state, replays and logs, then diagnose and propose a fix. Use when a Kernel run fails or misbehaves, or the user gives a Kernel session id./diff-profilesCompare two Kernel profiles (cookies, storage, preferences, extensions, login state) without printing values, and explain why a flow works on one and not the other.