Overleaf Sync Now banner
hanlulong hanlulong

Overleaf Sync Now

Development community

Description

Stops Claude Code and Codex CLI from silently overwriting your Overleaf web edits with a stale local Dropbox copy. PreToolUse hook + CLI + agent skill.

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

overleaf-sync-now

**Stops Claude Code and Codex CLI from silently overwriting your Overleaf web edits with a stale local Dropbox copy.**

[![CI](https://github.com/hanlulong/overleaf-sync-now/actions/workflows/ci.yml/badge.svg)](https://github.com/hanlulong/overleaf-sync-now/actions/workflows/ci.yml) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE) [![Python 3.8+](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/) [![Install: uv](https://img.shields.io/badge/install-uv-orange.svg)](https://github.com/astral-sh/uv)

The failure mode

You write a paper in Overleaf with Dropbox sync enabled. You edit on overleaf.com from another device, then come back to your laptop and ask Claude Code (or Codex CLI) to keep working on the paper. The AI agent reads the local `.tex` file — but Overleaf only pushes web edits to Dropbox **every 10–20 minutes**, so the local copy is stale. The AI proceeds to edit the stale file and saves it back, **silently overwriting your fresh web edits**. The tool call reports success. Paragraphs you wrote on the web vanish.

`overleaf-sync-now` is an **agent skill** (plus a CLI and a Claude Code PreToolUse hook) that closes this gap. Before every AI Read / Edit / Write of a `.tex` / `.bib` / `.cls` / `.sty` / `.bst` file under `Apps/Overleaf/`, it probes Overleaf's version history and pulls down anything new — without changing your existing Dropbox setup, so cross-device sync still works exactly as before.

Is this for you?

  • ✅ You write papers in Overleaf Premium with Dropbox sync enabled (Dropbox/Apps/Overleaf//)
  • ✅ You edit .tex files locally with Claude Code or Codex CLI
  • ✅ You also edit on overleaf.com sometimes — from another device, in a browser, or with collaborators

If you only ever edit locally *or* only ever edit on the web, your local copy is never stale and you don't need this. Same if you don't use Dropbox or AI agents.


Install