get-cookies
Skill4 starsChanged 5 months agoApache-2.0View on GitHub
Use when a site under review requires authentication and you need to import cookies from a real browser session into your local browser automation helper. Trigger on "get-cookies", cookie import, browser session reuse, authenticated QA, or protected pages behind login.
In this repository38 other files it gives its agents.
- skills/supabase-postgres-best-practices/AGENTS.mdAGENTS.md
- skills/vercel-react-best-practices/AGENTS.mdAGENTS.md
- skills/supabase-postgres-best-practices/CLAUDE.mdCLAUDE.md
- ai-app-security-auditSkill
- ai-slide-templatesSkill
- backlog-ready-specSkill
- check-compiler-errorsSkill
- clawpackerSkill
- deslopSkill
- devex-reviewSkill
- fix-ciSkill
- fix-merge-conflictsSkill
- founder-office-hoursSkill
- get-pr-commentsSkill
- gh-issue-priority-handoffSkill
- image2-with-codexSkill
- investigateSkill
- local-ultra-reviewSkill
- loop-on-ciSkill
- loop-on-pr-review-and-fixSkill
- new-branch-and-prSkill
- npm-release-pipelineSkill
- peer-reviewSkill
- plan-devex-reviewSkill
- planmode-ceoSkill
- planmode-engineerSkill
- qa-onlySkill
- review-and-shipSkill
- run-smoke-testsSkill
- security-best-practicesSkill
- site-design-auditSkill
- site-design-fixSkill
- slow-is-fastSkill
- supabase-postgres-best-practicesSkill
- vercel-react-best-practicesSkill
- xianyu-api-client-skillSkill
- xianyu-automation-skillSkill
- xianyu-product-manager-skillSkill
The file
We split this skill into the rules it gives an agent
12 rules. About 0 are common, 7 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 12
When this skill says AskUserQuestion, use the platform's question or confirmation tool if available.
- Distinctive: line 37
Import logged-in sessions from your real Chromium browser into the headless browse session.
- Distinctive: line 42
Check whether the current automation session is already attached to a real browser profile
- Very specific: line 43
Run cookie-import-browser to detect installed browsers and open the picker UI
- Very specific: line 68
If the user provides a path, export it as COGINE_BROWSE_BIN for the current session and continue.
- Distinctive: line 72
If the browser automation helper is already connected to a real browser profile through CDP or an equivalent "use my existing browser" …
- Distinctive: line 78
If the status output indicates an attached real browser profile, tell the user: "This session already appears to be using your real browser …
- Very specific: line 80
If the helper has no status command or the output is inconclusive, continue to cookie import.
- Very specific: line 99
If the user specifies a domain directly (e.g., /get-cookies github.com), skip the UI:
- Distinctive: line 109
After the user confirms they're done:
- Distinctive: line 122
Only domain names and cookie counts are shown in the UI — no cookie values are exposed.
- Distinctive: line 123
Do not print cookie values, raw SQLite rows, decrypted secrets, or Keychain/libsecret output.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
get-cookies
Cogine internal skill for importing cookies from a real browser session into local browser automation.
Cross-Platform Notes
- When this skill says
AskUserQuestion, use the platform's question or confirmation tool if available; otherwise ask the user directly and wait. - Ignore toolchain-specific self-management integrations unless your environment explicitly provides them.
- This skill assumes your environment has a browser automation helper that supports cookie import. If it does not, stop and ask the user which local browser tool to use.
Preamble (run first)
_BRANCH=$(git branch --show-current 2>/dev/null || echo "unknown")
echo "BRANCH: $_BRANCH"AskUserQuestion Format
ALWAYS follow this structure for every AskUserQuestion call:
- Re-ground: State the project, the current branch (use the
_BRANCHvalue printed by the preamble — NOT any branch from conversation history or gitStatus), and the current plan/task. (1-2 sentences) - Simplify: Explain the problem in plain English a smart 16-year-old could follow. No raw function names, no internal jargon, no implementation details. Use concrete examples and analogies. Say what it DOES, not what it's called.
- Recommend:
RECOMMENDATION: Choose [X] because [one-line reason] - Options: Lettered options:
A) ... B) ... C) ...
Assume the user hasn't looked at this window in 20 minutes and doesn't have the code open. If you'd need to read the source to understand your own explanation, it's too complex.
Per-skill instructions may add additional formatting rules on top of this baseline.
Setup Browser Cookies
Import logged-in sessions from your real Chromium browser into the headless browse session.
How it works
- Find the browse binary
- Check whether the current automation session is already attached to a real browser profile
- Run
cookie-import-browserto detect installed browsers and open the picker UI - User selects which cookie domains to import in their browser
- Cookies are decrypted and loaded into the Playwright session
Steps
1. Find the browse binary
SETUP (run this check BEFORE any browse command)
_ROOT=$(git rev-parse --show-toplevel 2>/dev/null)
B="${COGINE_BROWSE_BIN:-}"
[ -z "$B" ] && [ -n "$_ROOT" ] && [ -x "$_ROOT/.cogine/tools/browse" ] && B="$_ROOT/.cogine/tools/browse"
[ -z "$B" ] && [ -x "$HOME/.cogine/tools/browse" ] && B="$HOME/.cogine/tools/browse"
[ -z "$B" ] && command -v browse >/dev/null 2>&1 && B="$(command -v browse)"
if [ -n "$B" ] && [ -x "$B" ]; then
echo "READY: $B"
else
echo "NEEDS_SETUP"
fiIf NEEDS_SETUP:
- Tell the user: "Cogine browser tooling is not configured on this machine. Point me to the browser helper binary or tell me which browser automation stack to use." Then STOP and wait.
- If the user provides a path, export it as
COGINE_BROWSE_BINfor the current session and continue.
2. Check for real-browser / CDP mode
If the browser automation helper is already connected to a real browser profile through CDP or an equivalent "use my existing browser" mode, cookie import is usually unnecessary. Verify before opening the picker:
"$B" status 2>/dev/null || trueIf the status output indicates an attached real browser profile, tell the user: "This session already appears to be using your real browser profile, so cookie import is not needed unless a specific domain still fails authentication." Then continue with the authenticated QA task.
If the helper has no status command or the output is inconclusive, continue to cookie import.
3. Open the cookie picker
$B cookie-import-browserThis auto-detects installed Chromium browsers (Comet, Chrome, Arc, Brave, Edge) and opens an interactive picker UI in your default browser where you can:
- Switch between installed browsers
- Search domains
- Click "+" to import a domain's cookies
- Click trash to remove imported cookies
Tell the user: "Cookie picker opened — select the domains you want to import in your browser, then tell me when you're done."
4. Direct import (alternative)
If the user specifies a domain directly (e.g., /get-cookies github.com), skip the UI:
$B cookie-import-browser comet --domain github.comReplace comet with the appropriate browser if specified.
5. Verify
After the user confirms they're done:
$B cookiesShow the user a summary of imported cookies (domain counts).
Notes
- First import per browser may trigger a macOS Keychain dialog — click "Allow" / "Always Allow".
- On Linux, Chromium cookie decryption may depend on libsecret/Secret Service and the browser's current cookie storage version. If imports fail on Linux, report only a redacted error summary or error code and ask whether to use an already-authenticated CDP session instead.
- Cookie picker is served on the same port as the browse server (no extra process)
- Only domain names and cookie counts are shown in the UI — no cookie values are exposed.
- Do not print cookie values, raw SQLite rows, decrypted secrets, or Keychain/libsecret output.
- The importer should read browser cookie stores through a temporary read-only copy and avoid writing plaintext cookies to disk outside the automation session.
- The browse session persists cookies between commands, so imported cookies work immediately.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

