用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/bdarbaz/claude-stack-plugin --skill s-cookies命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | s-cookies |
| description | Import browser cookies for authenticated testing - detects installed browsers and imports sessions |
Import cookies from installed browsers to enable authenticated testing with /s:browse and /s:qa. Allows testing logged-in states without manual authentication flows.
These rules are non-negotiable:
.gitignore contains the entry before saving..gitignore does not contain .claude-stack/cookies.json, add it before proceeding..gitignore is missing entirely.Scan for installed browsers by checking these paths:
| Browser | Profile Path |
|---|---|
| Chrome | ~/Library/Application Support/Google/Chrome/ |
| Chrome Canary | ~/Library/Application Support/Google/Chrome Canary/ |
| Arc | ~/Library/Application Support/Arc/ |
| Brave | ~/Library/Application Support/BraveSoftware/Brave-Browser/ |
| Edge | ~/Library/Application Support/Microsoft Edge/ |
| Firefox | ~/Library/Application Support/Firefox/ |
| Safari | Not supported (sandboxed keychain access) |
Check each path with a directory existence test. Build a list of detected browsers.
Platform note: These paths are macOS-specific. On Linux, Chrome cookies are typically at ~/.config/google-chrome/. On Windows, %LOCALAPPDATA%\Google\Chrome\User Data\. Inform the user if running on a non-macOS platform and provide the expected paths.
Show the user which browsers were found:
Detected browsers:
1. Chrome (~/Library/Application Support/Google/Chrome/)
2. Arc (~/Library/Application Support/Arc/)
3. Brave (~/Library/Application Support/BraveSoftware/Brave-Browser/)
Which browser do you want to import cookies from? (number or name)
If no browsers are detected, inform the user and exit.
Ask the user which domain(s) to import cookies for:
Which domain(s) should I import cookies for?
Examples: localhost, myapp.com, *.example.com
(comma-separated for multiple)
For Chromium-based browsers (Chrome, Arc, Brave, Edge):
{profile_path}/Default/Cookies (SQLite)SELECT host_key, name, path, expires_utc, is_secure, is_httponly FROM cookies WHERE host_key LIKE '%{domain}%'security find-generic-password -s "Chrome Safe Storage" -w for the decryption key.For Firefox:
{profile_path}/Profiles/{profile}/cookies.sqliteprofiles.ini.SELECT host, name, path, expiry, isSecure, isHttpOnly FROM moz_cookies WHERE host LIKE '%{domain}%'Store extracted cookies at ~/.claude-stack/cookies.json:
{
"source": "Chrome",
"imported_at": "2026-03-16T12:00:00Z",
"domains": ["localhost", "myapp.com"],
"cookies": [
{
"name": "session_id",
"domain": "localhost",
"path": "/",
"secure": false,
"httpOnly": true,
"expires": 1742000000
}
]
}
Ensure the directory exists: mkdir -p ~/.claude-stack
Verify .gitignore includes .claude-stack/ or .claude-stack/cookies.json before writing. If not, add it.
Make a test request using the imported cookies against the target domain:
curl with the cookie jar or the browser tool.Accept these subcommands:
| Command | Description |
|---|---|
/s:cookies | Default: detect browsers and import flow |
/s:cookies list | Show active imported sessions (domains + expiry, NOT values) |
/s:cookies clear | Delete ~/.claude-stack/cookies.json |
/s:cookies refresh | Re-import from same browser and domains as last import |
/s:cookies verify | Test if current cookies are still valid |
Active Cookie Sessions:
Domain: localhost (3 cookies, expires: 2026-03-17)
Domain: myapp.com (5 cookies, expires: 2026-04-01)
Source: Chrome
Imported: 2026-03-16 12:00 UTC
Before clearing, confirm with the user:
"This will delete all imported cookie sessions. You will need to re-import for authenticated testing. Proceed? (y/n)"
/s:browse automatically loads cookies from ~/.claude-stack/cookies.json if the file exists./s:qa and /s:qa-only use the same cookie file for authenticated route testing./s:cookies refresh to update your session."/s:cookies refresh."