详细分析 ▾
运行时依赖
版本
Session Cookie Online skill initial release: - Persist and refresh website session cookies using a local SQLite database. - Store, update, and retrieve session profiles via a CLI script. - Keep cookies alive by replaying deterministic HTTP keepalive requests on a schedule. - Merge Set-Cookie responses into the database and expose cookies to other programs. - Support input and output as HTTP Cookie headers or structured JSON maps. - Designed for lightweight session management without browser automation.
安装命令 点击复制
技能文档
Overview
Use this skill when a website session must stay alive without building a full browser-automation system.
The runtime script stores named session profiles in SQLite, replays a deterministic HTTP keepalive request, merges Set-Cookie updates back into the database, and exposes the current cookies to downstream programs.
Quick Start
- Pick a database name. The default is
default, which resolves to~/.cookie_alive/default.db. - Capture the current cookie as either a
Cookieheader string or a JSON object. - Store or update a named profile with
python {baseDir}/scripts/cookie_alive.py upsert .... - Validate the stored cookie with
python {baseDir}/scripts/cookie_alive.py get --profile. - Refresh it once with
python {baseDir}/scripts/cookie_alive.py refresh --profile. - Keep it alive with
python {baseDir}/scripts/cookie_alive.py run --profile.
Workflow Rules
- Prefer a lightweight authenticated endpoint for
--refresh-url, such as/ping,/me, or a low-cost page load. Avoid heavy pages when a cheaper endpoint exists. - Store cookies with
--cookie-headerwhen the source is browser devtools or another HTTP client. Store them with--cookie-jsonwhen the source is already structured. - Use
get --format headerwhen another program needs a literalCookieheader value. - Use
get --format recordorlistwhen another program needs metadata such asinterval_seconds,last_status_code, orlast_refreshed_at. - If the target site requires JavaScript timers, WebSocket traffic, or browser-only activity to stay logged in, use external browser automation to renew the cookie and write the updated cookie back with
upsert. This skill only performs deterministic HTTP requests.
Script
scripts/cookie_alive.py
References
references/commands.md
免费技能或插件可能存在安全风险,如需更匹配、更安全的方案,建议联系付费定制