overleaf

overleaf is a skill for Claude Code, Codex from hanlulong/overleaf-sync-now. It costs 240 tokens per session (3,364 once invoked), scanned A, original, MIT.

A workflow for refreshing local LaTeX and bibliography files from Overleaf, a web service for collaboratively writing documents such as research papers. It checks whether the local copies are outdated before an agent edits them.

In plain words
What is it for?
Use it before editing .tex or .bib files mirrored through Dropbox, especially when the online project may have changed since the last sync.
Why use it?
It reduces the risk of changing an old local copy when Overleaf contains newer work. It also avoids downloading files when there is nothing new to import.

Skill for Claude CodeCodex

Written for Claude Code and Codex: user-invocable in frontmatter, but also reads ~/.codex or $CODEX_HOME. Also seen: reads .claude/ paths; mentions Claude Code; mentions Codex.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/hanlulong/overleaf-sync-now/overleaf_sync_now
Any agent
npx skills add hanlulong/overleaf-sync-now --skill overleaf_sync_now
Clone the repo
git clone --depth 1 https://github.com/hanlulong/overleaf-sync-now

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for overleaf

README.md
[![agentmods](https://agentmods.dev/badge/skills/hanlulong/overleaf-sync-now/overleaf_sync_now.svg)](https://agentmods.dev/skills/hanlulong/overleaf-sync-now/overleaf_sync_now)
Your own site
<a href="https://agentmods.dev/skills/hanlulong/overleaf-sync-now/overleaf_sync_now"><img src="https://agentmods.dev/badge/skills/hanlulong/overleaf-sync-now/overleaf_sync_now.svg" alt="Measured on agentmods" height="20"></a>
Per session 240 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,364 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00240 $0.03364
Opus 5 $0.00120 $0.01682
Sonnet 5 $0.00048 $0.00673
Haiku 4.5 $0.00024 $0.00336

Measured 5d ago against content hash b15e3384b4a6, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

overleaf scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (__init__.py, cli.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

src/overleaf_sync_now/SKILL.md · 140 lines

How it starts

The opening of the file, as written. The whole thing — 140 lines — stays where its author put it; the contents beside it link to each section on GitHub.

overleaf-sync-now

⚠ STOP — read this before suggesting "log in to Overleaf"

If the user is on Windows with Chrome 130 or later, logging into Overleaf in their daily browser will NOT fix auth failures. Chrome 130 added App-Bound Encryption: the cookie database AES key is wrapped a second time with a key bound to Chrome.exe itself, brokered through Windows COM. Any process that isn't Chrome.exe (and isn't running as admin) can read the encrypted bytes but can't decrypt them. So browser_cookie3 and rookiepy fail regardless of how recently the user logged in.

The proper fix is overleaf-sync-now login. It launches a controlled browser (patchright-managed Chromium since 0.3.2; vanilla Playwright fallback), the user logs in there once, and we read the cookie via Chrome DevTools Protocol — which returns plaintext because the request comes from inside the browser. The login persists in our profile for weeks.

The problem

Overleaf's Dropbox bridge polls in one direction (Overleaf → Dropbox) every 10–20 minutes, so a local Dropbox-mirrored .tex file can be stale by that long. This skill fixes it by probing Overleaf's version history (GET /project/{id}/updates) and, on an actual web-origin change, downloading the project zip (GET /project/{id}/download/zip) and extracting only the files that changed — without changing the user's existing Dropbox-bridge setup, so cross-device Dropbox sync still works as before.

How project lookup works

  • Auto-link (zero-config, preferred): if a file lives under any …/Apps/Overleaf/<project-name>/, the skill looks up <project-name> in the user's Overleaf project list (cached 24 h, projects.json v2 since 0.3.0). The cached list keeps trashed/archived/lastUpdated/ownerId, so the resolver filters out trashed and archived projects by default and refuses to guess when two living projects share a name.
  • Marker auto-write (since 0.3.0): on a successful auto-link the resolver writes a tiny .overleaf-project JSON marker into the project folder so future resolution skips the index lookup entirely. The marker carries project_id + provenance (source, linked_at, name_at_link_time).
  • Manual link (override): if the user has two living projects with the same name (or the local folder name doesn't match), the resolver refuses to guess and prints all candidates with the exact overleaf-sync-now link <id> <folder> command to copy-paste. Run that command to write the marker explicitly. Old marker files containing only {"project_id": "..."} keep working.

Read the full file on GitHub · 140 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 140 lines · 240 tokens per session scan A b15e3384b4a6

Subscribe to this mod's changes

overleaf is a skill published in the GitHub repository hanlulong/overleaf-sync-now (17 stars, last pushed 3mo ago), licensed MIT. It adds 240 tokens to every session and 3,364 once invoked, about $0.0012 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

latex

Compile one specified LaTeX document, resolve build errors, audit citations, and report build quality. Use when a .tex source must be built or a concrete compilation failure repaired. Not for corpus-wide build checks, visual polish after a clean build, or creating a project; use $latex-health-check, $latex-polish, or…

flonat/flonat-research · 74 tokens

beamer-deck

Create an academic presentation as a LaTeX Beamer source and reviewed PDF with an original theme. Use when the requested deliverable is a conference, seminar, or lecture deck in Beamer. Not for PowerPoint or RevealJS; use $pptx or $quarto-deck.

flonat/flonat-research · 63 tokens

bib-parse

Extract citations from a PDF and generate a validated .bib file. Use when the user asks to extract citations from a PDF and generate a validated .bib file. Reads the PDF, identifies referenced works, constructs BibTeX entries, and verifies metadata.

flonat/flonat-research · 54 tokens

latex-polish

Inspect a cleanly compiling LaTeX document for source pathologies and rendered visual defects by linting and viewing selected PDF pages. Use when compilation succeeds but title pages, floats, tables, figures, or layout still need publication-quality review. Not for basic compilation health; use $latex-health-check.

flonat/flonat-research · 64 tokens

latex-template

Compare a project's LaTeX preamble and conventions against the canonical working-paper template. Use when diagnosing template drift without converting venue formats or editing prose.

flonat/flonat-research · 33 tokens

bib-filter

Filter a LaTeX project's bibliography to the entries actually cited, with Overleaf-source resolution, temporary staging, validation, approval-gated canonical replacement, and compilation. Use before submission or after large revisions.

flonat/flonat-research · 44 tokens