overleaf-sync

Synchronizes a local LaTeX paper directory with an Overleaf project via the Git bridge.

Updated Jul 9, 2026
One-click install
npx skills add https://github.com/Lingjie-wang/autoRL --skill overleaf-sync-lingjie-wang
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: overleaf-sync
Source: https://github.com/Lingjie-wang/autoRL/tree/main/Auto-claude-code-research-in-sleep/skills/overleaf-sync
Command: npx skills add https://github.com/Lingjie-wang/autoRL --skill overleaf-sync-lingjie-wang

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Keeping a local LaTeX paper directory and an Overleaf project in sync is error-prone: collaborators edit in the Overleaf web UI while local audit and editing pipelines run on a separate copy, causing divergence, lost changes, and leaked authentication tokens. This Skill provides a controlled two-way sync workflow with diff review, conflict handling, and token security guards. ## Core Features & Use Cases - Two-way Git bridge sync: Pull collaborator edits from Overleaf and push local changes back using the official Overleaf Git bridge, with rsync between the working paper directory and the Overleaf clone. - Per-hunk diff review protocol: Classify each pulled change (editorial fix, numerical change, new citation, half-finished sentence) and decide whether to sync it and which audit to re-run. - Token security by design: One-time interactive setup stores the Overleaf token in the OS keychain, strips it from remote URLs, and installs a pre-commit hook that blocks token patterns from being committed. - Use Case: A co-author edits your paper on Overleaf overnight; you run a pull, review the diff hunks, sync the clean changes into your local paper directory, re-run claim and citation audits on changed numbers, then push your local revisions back for the team. ## Quick Start Ask the assistant to set up Overleaf sync for your paper directory by providing your Overleaf project ID, then run the printed setup command in your own terminal.

Frequently Asked Questions about overleaf-sync

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I sync a local LaTeX project with Overleaf?

Use the Overleaf Git bridge: clone the project into a separate directory, then rsync files between it and your working paper directory. Run a status check first to detect divergence, pull remote edits with git pull --ff-only, and push local changes after reviewing the diff.

How do I connect Overleaf to a local git repository?

Overleaf Premium provides a Git bridge URL per project that you can clone like any git remote. Run the one-time setup script in your own terminal with the project ID; it authenticates via a hidden prompt and stores the token in the OS keychain.

Is it safe to store an Overleaf token in git config?

No, tokens should never appear in remote URLs, files, or chat history. The setup script reads the token via a hidden prompt, passes it to the OS keychain through git credential approve, strips it from the remote URL, and installs a pre-commit hook that blocks token patterns.

What happens when Overleaf and local edits conflict?

When git pull --ff-only fails due to true divergence, the workflow stops instead of auto-merging. It shows commits on each side with git log and asks the user to choose per file or merge manually in Overleaf, never using reset --hard or push --force.

Does Overleaf Git sync require a premium subscription?

Yes, the Overleaf Git bridge is a Premium feature, so the account owning the project needs a paid plan. Once enabled, standard git clone, pull, and push operations work against the project's bridge URL.