setup
This skill should be used when user asks to "set up overleaf", "configure overleaf cookie", "overleaf auth failed", "overleaf 401", "overleaf session expired", "overleaf unauthorized", or needs to install or refresh their Overleaf session cookie for the overleaf-skills plugin.
Unsigned, install at your own risk
UnverifiedThis skill has no cryptographic signature attached. We can't verify the contents match what the publisher intended.
Install this skill
No account required. Pick your tool, or use the command that detects it for you.
Run in your terminal. It detects your AI tool.
npx @skills-hub-ai/cli install claude-codex-settings-overleaf-skills-setupManual setup by platform
Claude Code
~/.claude/skills/claude-codex-settings-overleaf-skills-setup/SKILL.md
Instructions
Overleaf Skills Setup
Make sure overleaf.py can authenticate. It tries OVERLEAF_COOKIE, then ~/.claude/overleaf-skills/cookie, then reads overleaf_session2 from a logged-in Chrome through agent-browser and saves it to the cookie file. The Chrome is the local one, or the one on the SSH host named by OVERLEAF_CHROME_SSH_HOST when this machine has no Chrome. Pasting a cookie by hand is the last resort.
Commands use ${CLAUDE_PLUGIN_ROOT}, this plugin's root. Claude Code fills it in. Codex and Antigravity leave it as written, so replace it with the absolute path two directories above this SKILL.md.
Step 1: Status check
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/overleaf.py --check-auth
- If
OK <email>: report "Configured, logged in as ." Done. - If it exits non-zero with the refresh hint: ask the user to log into overleaf.com in Chrome (on the
OVERLEAF_CHROME_SSH_HOSTmachine when set), then rerun the check. If it still fails, or the user has no Chrome withagent-browseraccess, continue to Step 2.
Step 2: Show browser guide
Tell the user to grab the cookie from their browser. Give all three branches; pick none for them:
Chrome / Edge / Brave / Arc: Cmd+Option+I (mac) or F12 → Application tab → Storage → Cookies → https://www.overleaf.com → row where Name = overleaf_session2 → double-click Value cell → Cmd+A → Cmd+C.
Firefox: F12 → Storage tab (enable in DevTools settings if hidden) → Cookies → https://www.overleaf.com → click overleaf_session2 row → right-click → Copy Value.
Safari: Enable Develop menu (Settings → Advanced → Show features for web developers), then Cmd+Option+I → Storage → Cookies → www.overleaf.com → click overleaf_session2 row → copy from right-hand detail pane.
Add three warnings at the bottom:
- The row name is
overleaf_session2(UNDERSCORE). A row namedoverleaf.session2(DOT) is a stale legacy cookie that will not authenticate. - The cookie is
HttpOnly—document.cookiein the JS console returns empty for it. The storage panel is the only path. - The value should start with
s%3Aand be ~80+ chars. If it starts withs%3Ac%3A1%3A, you're logged out — log into overleaf.com and re-grab.
Step 3: Capture
Use AskUserQuestion: "Do you have your overleaf_session2 cookie value ready?" with options "Yes, paste it now" and "Skip for now". The user pastes via the "Other" free-text field.
Step 4: Validate
Normalize the input: strip whitespace; if it does NOT start with overleaf_session2=, prepend it (accept bare value).
Reject (re-prompt with reason):
- Starts with
overleaf.session2=→ "Overleaf renamed this cookie tooverleaf_session2(underscore). Re-grab the underscore row." - Value (after the
=) starts withs%3Ac%3A1%3A→ "That's an anonymous-visitor cookie. Log into overleaf.com first, then re-grab." - Value does not start with
s%3Aafter the=→ "Doesn't look like an Overleaf session cookie. Confirm you copied from theoverleaf_session2row on www.overleaf.com." - Total length under 80 chars → "Cookie looks truncated. Re-copy with
Cmd+Ainside the Value cell." - Contains newlines or quotes → "Strip the surrounding quotes/newlines."
Step 5: Write
mkdir -p ~/.claude/overleaf-skills
[ -f ~/.claude/overleaf-skills/cookie ] && cp ~/.claude/overleaf-skills/cookie ~/.claude/overleaf-skills/cookie.backup
# Write the normalized value (one line, no trailing newline beyond what's natural)
printf '%s\n' "<normalized-cookie>" > ~/.claude/overleaf-skills/cookie
chmod 600 ~/.claude/overleaf-skills/cookie
Step 6: Verify
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/overleaf.py --check-auth
- If
OK <email>: report "Configured. Logged in as ." Done. - If it exits non-zero: restore from
cookie.backupif it exists (mv ~/.claude/overleaf-skills/cookie.backup ~/.claude/overleaf-skills/cookie), tell user the new cookie did not authenticate, loop back to Step 2.
Security
Reviews (0)
Related skills
Browse all →More from claude-codex-settings
View source →More Build skills
Browse category →Frequently asked questions about setup
What does the setup skill do?
This skill should be used when user asks to "set up overleaf", "configure overleaf cookie", "overleaf auth failed", "overleaf 401", "overleaf session expired", "overleaf unauthorized", or needs to install or refresh their Overleaf session cookie for the overleaf-skills plugin. It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.
How do I install the setup skill?
Run `npx @skills-hub-ai/cli install claude-codex-settings-overleaf-skills-setup` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/claude-codex-settings-overleaf-skills-setup/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.
Which AI tools does setup work with?
setup runs in Claude Code. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.
Is the setup skill free?
Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.
How do I use setup after installing it?
In Claude Code, type `/claude-codex-settings-overleaf-skills-setup` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.
Can I share the setup skill with my team?
Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.